Do You PHP はてブロ

Do You PHPはてなからはてブロに移動しました

2006-09-01から1ヶ月間の記事一覧

Oracle Database 10g Express Edition 10.2.0.1

今更ながらですが、CentOS4.4に入れ替えたついでにXE(Universal版)をインストール。Oracle入れると言うことでPHPも自動的にインストールする、と。当然、oci8とpdo_oci :-) しかし、何ですね。XEだとrpmで提供されているし、デフォルトのデータベース(SID…

起動時にBind on unix socket Permission deniedが出る

CentOS4.4で、SELinux(Security-Enhanced Linux)が有効になっていると、MySQLの起動・停止が異様に遅く(timeout待ち)、仕舞いにはMySQL起動時にBind on unix socket Permission deniedが出て起動すらしなくなった。とりあえず、/etc/sysconfig/selinuxの…

Can't open privilege tables: Can't find file: './mysql/host.frm'

mysql_install_dbコマンドでDBをインストールした後、mysqld_safeしようとすると出てきたエラー。 ファイルは存在しているし何でかな〜と思っていたら、permissionがずれてた。。。orz # ll /home/user1/ndb_data/mysql/host.frm -rw-rw---- 1 root root 914…

ndb_mgmでnot connectedが出る

こっそりMySQL始めてます :-) http://journal.mycom.co.jp/special/2004/mysql/を参考に(あくまで参考)しながら、 node1 CentOS4.4 on VMware Player(172.16.1.9/16) MySQL-Max-4.1.21(glibc23) MGM+DB+API node2 CentOS4.4 on VMware Player(172.1…

exciteで翻訳するbookmarklet

どっかにありそうだけど作ってみた。とりあえず、別windowが開きます。 javascript:(function(){window.open(%22http://www.excite.co.jp/world/english/web/body/?wb_url=%22+escape(location.href)+%22&wb_submit=%2583E%2583F%2583u%2583y%2581%255B%2583…

Firefoxの個人用ツールバーフォルダ

bookmark.htmlの<DT>タグで、PERSONAL_TOOLBAR_FOLDER属性にtrueを指定したフォルダがツールバーフォルダになるようだ。 <DT><H3 LAST_MODIFIED="1159321379" PERSONAL_TOOLBAR_FOLDER="true" ID=...> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~英語版の場合、名称が「Personal Toolbar Folder」となるが、Google Browser Syncを使っている場合、いつ</h3></dt></dt>…

Zend Core for Oracle 1.5.0リリース

PHP

Web applications. It provides a seamless out-of-the-box experience delivering a stable, high performance, easy-to-install and supported PHP development and production environment fully integrated with the Oracle Database.Linux版・Windows版…

CentOS4.4とnkf

RedHat Enterprise Linux 3からnkfが廃止されたようなので、rikenからsrpmを持ってきて再buildした。 # wget http://ftp.riken.jp/pub/Linux/redhat/archive.redhat.com/redhat/linux/9/en/os/i386/SRPMS/nkf-2.01-2.src.rpm # rpm -ivh nkf-2.01-2.src.rpm …

CentOS4.4+Postfix+Spamassassinメモ

やっぱりOS入れ替えは面倒。。。 事前にインストール postfix-2.2.10-1.RHEL4.2 spamassassin-3.0.6-1.el4 chkconfig # chkconfig postfix on # chkconfig spamassassin on Postfixの設定 以下を/etc/postfix/main.cfに追加。なお、ローカル環境での利用前提…

PHPUnit3ではAnnotationを使ってテストケースの雛形を作る

PHP

確かに楽そう。ただ、テストパターンが多い場合、コードの可読性が異様に下がりそうな感じがするのは気のせいかなぁ。まあ、折り畳んで表示しちゃえば問題ないのか。 PHPUnit can help you write your tests by analyzing the code of an existing class and…

gdbを使ってコードを読む

ここでは、mb_list_encodings()を題材にどうやってphpの実装を理解していくか、そのプロセスを記述してみたい。もちろんこの方法がベストであるとか、この方法でなければいけないとか、いつでもこの方法が適用可能だなんてことを主張するつもりは一切ないが…

recent command

つられてやってみました。まあ、環境構築中なので、かな〜り偏ってますが。。。 # history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r 52 vi 35 chkconfig 33 mount 33 cd 24 service 22 ll 20 ls 13 up2date 12 less 9 umount…

CentOS4.4のXMMS

ついにデスクトップ機をVine3.xからCentOS4.4に変更。しかし、XMMSでmp3が再生できない!ということで、RPMforgeからプラグインのrpmであるxmms-mp3をダウンロード・インストール。当然RHEL4用。これで解決。ちょっとびっくりした。。。しかし、1900x1440の解…

VMwareのguest OSからのCD-R書き込み

hdx=ide-scsiを書かなくなったお陰か、guest OSからも書き込めるようになった。これで心置きなくCentOSに全面移行。 忘れないよう、環境をメモ。。。 H/W:PIONEER DVD-RW DVR-108 Host:CentOS4.4+hdx=ide-scsiなし Guest:Win2K+SP4+B's Recorder GOLD …

ide-scsi is deprecated for cd burning!

今更ながら。kernel2.4ではlilo.confやgrub.confに hdx=ide-scsiといった具合に指定していたが、kernel2.6からは何もいらないようだ。 cdrecordを使う時に、devパラメータに # cdrecord -v -speed=12 dev=/dev/cdwriter /tmp/tmp.isoと、デバイスをそのまま…

自作の宇宙船「ノバ1号」から撮った地球の写真

イギリスのケンブリッジ大学の大学院生カール・モーランドさんとロバート・フライヤーズさんの2名がたった1000ポンド(約20万円)で宇宙船を開発して、宇宙からデジカメでリアルな地球を撮影することに成功した。すっげ〜綺麗だなぁ。 オリジナルの画像を順に…

PHP_CodeSniffer

PHP_CodeSniffer is a PHP5 script that tokenises and "sniffs" PHP code to detect violations of a defined set of coding standards. It is an essential development tool that ensures that your code remains clean and consistent. It can even help…

PHP5.2.0RC4リリース

PHP

RC4がリリースされました。RC最終版のようです。正式リリースも間近ですね。 The fourth and final release candidate of PHP 5.2.0 is finally out and the source packages can be found here: http://downloads.php.net/ilia/php-5.2.0RC4.tar.bz2 (71456…

PHP6向け(?)のTODO

PHP

Paris, November 11th and 12th, 2005 Attendees: Marcus Börger (SOMABO) Wez Furlong (OmniTI) Rasmus Lerdorf (Yahoo!) Derick Rethans (eZ systems) Dmitry Stogov (Zend) Zeev Suraski (Zend) Jani Taskinen Andrei Zmievski (Yahoo!) PHPコア開発者の…

XML_RSS 0.9.10リリース

This release is a beta release in preparation for the upcoming stable release of version 1.0.0.11ヶ月ぶりのアップデート・・・止まってましたね〜。それだけ「枯れてる」ということでしょうか。 1.0.0は出るんでしょうか?

PHPでアニメーションGIF

PHP

This class can be used to generate a GIF animation from a set of individual frames in GIF image format.The class takes as input parameters the list of GIF frame image files, the animation delay between each frame, the horizontal and vertic…

郵便番号でホテルを検索

404 Blog Not Found経由で。。。これは「目的地の郵便番号を入れると、その番号の最寄のホテルを一発で表示する」ツール。出張とかで使えるかなあと。僕は「目的地からなるべく近いところに宿を取りたい主義」なので。で、そこからタクシーね。どうせ会社持…

Lightweight Language Ring(LLRing) −Blood Sweat & Code

もはやインターネットになくてはならないプログラミング言語、Lightweight Language(軽量言語)。軽量言語の祭典Lightweight Languageカンファレンスは、2003年はLL Saturday、2004年はLL Weekend、2005年はLL Day and Nightと名を変え行われてきた。本スト…

mkisofsとCD-R作成

何度やっても忘れるのでメモ。Joliet形式の場合、こんな感じ。 # mkisofs -v -J -o /path/to/created.iso /path/to/files ... # cdrecord -v speed=12 dev=0,0,0 /path/to/created.iso

PHP 5.1.6 / 4.4.4 Critical php_admin* Bypass by ini_restore()

PHP

php_admin_value and php_admin_flag Bypass When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files (e.g. httpd.conf). This options are using by a lot of ISP to set op…

WindowsXP+PHP5.1.6でstrptime

PHP

注意: この関数は Windows 環境にはまだ実装されていません。 え〜!うっそ〜!<マニュアルよく読め

Apache Filterに続く道

これからしばらく、次の順序でApacheのコードを説明します。 apr_ring (循環双方向リンクリスト。今日説明します) bucket、brigade (入出力ストリームデータの抽象化。内部でapr_ringを利用) filter (入出力bucketsの処理チェイン) HTTPリクエスト受信からレ…

Dragable RSS boxes

http://www.dhtmlgoodies.com/index.html?page=dragDrop#dragableBoxes Googleのパーソナライズドページみたいなヤツです。LGPLで提供されてます。 これぐらい動けば、個人的には充分です。これぐらいサクッと組み込めればなぁ。。。

Apache HTTPD Bug Statistics

http://people.apache.org/~erikabele/httpd/bugstats/ 毎週土曜日午後10時(PDT -07:00, Pacific Daylight Time, アメリカ太平洋夏時間)更新だそうです。 いや、だからどうってモノじゃないですが。。。

Symfonyを始める

PHP

今更ながら、WEB+DB PRESS vol.33にあるSymfonyの記事を試してみた。WEB+DB PRESS Vol.33作者: WEB+DB PRESS編集部出版社/メーカー: 技術評論社発売日: 2006/06/22メディア: 大型本 クリック: 16回この商品を含むブログ (40件) を見るインストールしたバージ…