PHP Evo


PHPのインストール(Ver 4.3.3rc1)

1. PHPのインストール

1.1 CGI版のコンパイル、インストール

次の手順で、phpをコンパイルします。

  1. tar zxvf php-4.3.3rc1.tar.bz2
  2. cd php-4.3.3rc1
  3. ./cf
    cf
    ./configure \
     --mandir=/usr/local/man \
     --enable-dba --enable-ftp \
     --enable-mbstring --enable-mbregex --enable-zend-multibyte \
     --enable-debug --enable-safe-mode --enable-memory-limit \
     --with-zlib \
     --with-gnu-ld --with-tsrm-pth
    
  4. make
  5. make install

以上で、インストールは終了です。

1.2 SAPI版のコンパイル、インストール

次の手順で、phpをコンパイルします。

  1. make clean
  2. ./cf
    cf
    ./configure \
     --mandir=/usr/local/man \
     --with-apxs=/usr/local/apache/bin/apxs \
     --enable-dba --enable-ftp \
     --enable-mbstring --enable-mbregex --enable-zend-multibyte \
     --enable-debug --enable-safe-mode --enable-memory-limit \
     --with-zlib \
     --with-gnu-ld --with-tsrm-pth
    
  3. make
  4. make install

1.3 初期設定

Apacheの設定ファイルに以下の記述を追加します。

/usr/local/apache/conf/httpd.conf
LoadModule  php4_module libexec/libphp4.so
AddModule  mod_php4.c
AddType application/x-httpd-php  .php
>Files *.inc<
    Order allow,deny
    Deny from all
>/Files<

PHPの設定ファイルを以下のように設定します

/usr/local/lib/php.ini
output_buffering=4096
error_reporting = E_ALL & ~E_NOTICE
display_startup_errors = on
log_errors = php_error.log
include_path = ".:/usr/local/lib/php"
extension_dir = "/usr/local/lib/php/extension/debug-non-zts-20020409/"
sendmail_path = /usr/sbin/sendmail -t -i

もどる
$Revision: 2 $
Last Update: $Date: 2007-02-28 23:35:40 +0900 (豌エ, 28 2譛 2007) $