php 5.0.4 のインストールログ 1. 展開 gtar zxvf php-5.0.4.tar.gz 2. configure と make pgsql を使い、ビルトインの gd を有効にして作成 cd php-5.0.4 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf/php --with-gd --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-zlib-dir=/usr/lib --with-tiff-dir=/usr/local/lib --with-xpm-dir=/usr/lib --enable-gd-native-ttf --enable-gd-jis-conv --enable-mbstring --enable-mbregex --with-libxml-dir=/usr/local/lib --with-pgsql=/usr/local/pgsql (apache の dynamic module として作成。libxml2 が必要だそうなので それもインストールしておく) (実は jpeg, png, tiff のライブラリは /usr/lib にあったので使えば よかったのかもしれない) make make install 3. 設定 cp php.ini-dist /usr/local/apache2/conf/php/php.ini php.ini の編集 output_buffering = On output_handler = mb_output_handler register_globals = On include_path = ".:/php/includes:/usr/local/lib/php" mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.http_input = auto mbstring.http_output = SJIS mbstring.detect_order = auto mbstring.substitute_character = ?; httpd.conf の編集 LoadModule php5_module modules/libphp5.so <- これは自動的に追加される AddType application/x-httpd-php .php .php4 を加えておく。 という内容のファイル phpinfo.php を 適当なところに置いて表示してみる。