Php

About PHP

Famous internet language

Php Installation

download source package php-5.2.3.tar.gz

[http://downloads.php.net/ilia/]

install with both oracle and mysql support

   ./configure \
      --with-oci8-instant-client \
      --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs \
      --with-config-file-path=/usr/local/apache/conf \
      --with-oci8=$ORACLE_HOME \
      --with-mysql=/usr/local/mysql \
      --with-zlib-dir=/usr
make install

ps. make sure apache startup user can access oracle
(add the user to oracle group and setup the variables)

configure with apache

configure php.ini
configure apache

AddType application/x-httpd-php        .php
AddType application/x-httpd-php-source .phps

LoadModule php5_module        modules/libphp5.so

<VirtualHost *:1500>
ServerName <servername>
DocumentRoot "/var/httpd/htdocs/virtualhost"
</VirtualHost>

put a test page phpinfo.php on virtual host and test it

<?php phpinfo() ?>

http://localhost:1500/phpinfo.php

log
[root@td-hcom01 php-5.3.13]# make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /u01/oracle/altspkgs/php-5.3.13/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/man/man1/
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.7
[PEAR] Console_Getopt - already installed: 1.3.0
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
[PEAR] PEAR           - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/u01/oracle/altspkgs/php-5.3.13/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/