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
phpinfo();
?>

Comment Form

コメントを表示する前に、管理人の承認が必要になることがあります。その場合は、承認されるまでコメントは表示されませんので、ご了承ください。

スタイル用のHTMLタグが使えます

Trackback

Recent entry

Search

Tag Cloud

Page Top