PostgreSQL に関するインストールメモ2(2002/02/24) 
 

PHP とは

未項っす。しかし、Apache + PHP4(4.1.2) を入れている最中で〜〜っす

本家:日本PHPユーザ会 [PHP国際版化に関して]

PostgreSQL + Apache/PHP のインストール

PHP4 と PostgreSQL で Web アプリケーションを!

 

設定方法

1.PHP4 (4.1.2) の設定をする。

% cd /opt/local/src
% wget http://www.php.net/do_download.php?download_file=php-4.1.2.tar.gz
% gzip -cd php-4.1.2.tar.gz | tar xf -
% cd php-4.1.2
% env CFLAGS=-O3 ./configure --with-pgsql --with-apxs=/opt/local/apache/bin/apxs --with-pgsql=/opt/local/pgsql

+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You chose to compile PHP with the built-in MySQL support. If you |
| are compiling a server module, and intend to use other server |
| modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0, |
| mod_perl) you must NOT rely on PHP's built-in MySQL support, and |
| instead build it with your local MySQL support files, by adding |
| --with-mysql=/path/to/mysql to your configure line. |
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+

Thank you for using PHP.


が表示されれば ok

2."Thank you for using PHP."が表示されたなら、以下のコマンドを実行する。

% make
% su
# make install

3.Apache の再コンパイル(DSO対応になっていれば問題なし)を行う。斜線部分が大事す。

% cd /opt/local/src
% wget http://httpd.apache.org/dist/httpd/apache_1.3.23.tar.gz
% gzip -cd apache_1.3.23.tar.gz | tar xf -
% wget http://www.apache.org/dist/httpd/patches/apply_to_1.3.23/solaris-apache-1.3.23.patch
% patch -p1 < solaris-apache-1.3.23.patch
% env CFLAGS=-O3 ./configure --prefix=/opt/local/apache \
                                  --enable-module=most --enable-shared=max
% make
% su
# make install
      ※ /opt/local/apache/conf/httpd.conf ←適時修正してね♪

4.php.ini ファイルをコピーする。

# cp /opt/local/src/php-4.1.2/php.ini-dist /usr/local/lib/php.ini

5.Apache の httpd.conf 内容を設定する。

# vi /opt/local/apache/conf/httpd.conf
    LoadModule php4_module libexec/libphp4.so
    AddModule mod_php4.c
    <IfModule mod_php4.c>
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php-source .phps
    </IfModule>

6.Apache を再起動する。

# opt/local/apache/bin/apachectl restart

7.課題

Directory で指定されている "cgi-bin" 以下のディレクトリでは
*.php ファイルを実行することができません。それ以外のディレクトリ
では、okなのに・・・・しゅん 

http://tech.millto.net/~maacyan/php3/Linux/#PHP_DOWNLOAD