PHP 4.x インストール

投稿者:

基本的なインストールメモ
http://www.php.net/get/php-4.3.11.tar.bz2/from/a/mirror からバイナリをダウンロード
tar -jxvf php-4.3.11.tar.bz2
cd php-4.3.11
PostgreSQL, MySQL に接続できるようにインストールディレクトリを指定しておく
./configure -with-apxs2=/usr/local/apache2/bin/apxs –enable-mbstring –enable-mbregex –with-mysql=/usr/local/mysql –with-pgsql=/usr/local/pgsql
make
make install
httpd.conf 記述追加
DirectoryIndexにindex.php を追加
AddType application/x-httpd-php .php を追加
LoadModule php4_module modules/libphp4.so を追加
iniファイル作成
cp php.ini-dist /usr/local/lib/php.ini
変更箇所
mbstring.language = Japanese
mbstring.internal_encoding = EUC-JP
mbstring.http_input = auto
mbstring.http_output = Shift_JIS
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none
Apacheを再起動する
info.phpを作成してアクセスできればOK

Thank you for reading this post, don't forget to subscribe!