Fordi vi på de nye webserverne vil ha PHP 5.x, mens det er kun PHP 4.x i CSW/Blastwave, må vi kompilere og installere PHP selv.

Konfigurasjon

Configure-linje for å kompilere PHP5 på or eller alm, som modul for Apache 2:

./configure --prefix=/opt/idi --with-pic --with-apxs2=/opt/csw/apache2/sbin/apxs --with-openssl=/opt/csw --with-zlib --with-ndbm --with-db3=/opt/csw --with-sysvshm --enable-ftp --with-mcal=/opt/csw -enable-calendar --with-jpeg-dir=/opt/csw --with-tiff-dir=/opt/csw --with-xpm-dir=/opt/csw --with-png-dir=/opt/csw --with-freetype-dir=/opt/csw --with-t1lib=/opt/csw --with-bz2=/opt/csw -with-dom=/opt/csw --with-readline=/opt/csw --with-ldap --with-gettext=/opt/csw --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-pgsql=/opt/csw/postgresql -with-mysql=/opt/csw/mysql5 --enable-bcmath --with-curl=/opt/csw --with-expat-dir=/opt/csw --with-libxml-dir=/opt/csw --with-oci8=shared,instantclient,/opt/idi/lib/instantclient10_1 --with-imap=/opt/idi/uwimap/crypto

(!) Denne bruker IMAP-klientbibliotek (uw-imap c-client) og Oracle-klientbibliotek (oci8) fra /opt/idi/..., mens alt annet er fra CSW-pakker.

Kompilering og installasjon

export PATH=/store/bin:/store/gnu/bin:$PATH
export CC=/store/bin/gcc

vi libtool
# endre '-shared' til '-G -fPIC' for archive_cmds og archive_expsym_cmds
# legg til '-R/opt/csw/lib -R/store/lib' på slutten av hardcode_libdir_flag_spec
# legg til '/opt/csw/lib /store/lib' på slutten av sys_lib_search_path_spec

gmake
# Sjekk at symboler resolver:  ldd -r sapi/cli/php
gmake install

Med denne konfigurasjonen havner mod_php (libphp5.so) i /opt/csw/apache2/libexec og blir aktivert i /opt/csw/apache2/etc/httpd.conf. Alt annet (CLI-utgave, PEAR, ...) blir installert med /opt/idi/ som prefiks. Spesifikt ligger php.ini i /opt/idi/lib/.

Pass til slutt på at extension_dir i php.ini peker på riktig katalog. Ulike PHP-versjoner vil kunne ha ulikt extension-API, med dertil ulik katalog.

NyWebserver/PHP (last edited 2006-02-10 11:50:36 by OyvindMoll)