HOMEへ戻る コンピュータ関係 健康関係 生活関係 その他

PHP 4.3.1 の設定
  • PHP のダウンロード
    Apacheのダウンロードサイトは,http://www.php.net/downloads.phpです。
    ここでは,php-4.3.1.tar.gzというファイルをダウンロードします。
    ダウンロードしたファイルは/tmpに保存してください。

  • ファイルの解凍
    $ tar zxvf php-4.3.1.tar.gz
    $ cd php-4.3.1

  • コンパイル及びインストール
    $ rm configure
    $ ./buildconf
    $ ./configure --with-pgsql=/usr/local/pgsql --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --enable-zend-multibyte --without-mysql
    $ make
    $ make install
    注意)--enable-mbstr-enc-trans オプションは,PHP 4.3.0以降では廃止

  • php.ini ファイルを複製
    # cp php.ini-dist /usr/local/lib/php.ini

  • php.ini ファイルを編集
    左側が行数を表しています。
    89short_open_tag = Off
    119output_handler = mb_output_handler
    282display_errors = On
    313track_errors = On
    1014mbstring.language = Japanese
    1019mbstring.internal_encoding = EUC-JP
    1022mbstring.http_input = auto
    1026mbstring.http_output = EUC-JP
    1033mbstring.encoding_translation = On
    1037mbstring.detect_order = auto
    1041mbstring.substitute_character = none;
    1051mbstring.func_overload = 0

  • Apache の httpd.conf ファイルを編集
    $ su -
    $ vi /usr/local/apache2/conf/httpd.conf

    httpd.conf ファイルの最後に以下の内容を追加してください。
    # The following is for PHP4
    LoadModule php4_module modules/libphp4.so
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

  • Apache を起動,又は再起動
    $ /usr/local/apache2/bin/apachectl start
    ($ /usr/local/apache2/bin/apachectl restart)


HOME -  Computer -  Health -  Life -  etc -  お問合せ
©2005-2006 Person Of All Trades. All Rights Reserved