All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Compiling PHP from source on *nix

From TYPO3Wiki
Jump to: navigation, search

<< Back to Extension Development << Back to Developer manuals page



For use with caution.

Download PHP tarball from


Unzip and change to PHP directory

tar xvvjf php-5.2.6.tar.bz2
cd php-5.2.6

Get help on configuration options

 ./configure --help

Add the needed options to an install script (see below for an example). This script will be called from here on.

Run installation script:


The script:


mkdir /usr/share/php5

sh configure --prefix=/usr --datadir=/usr/share/php5 --mandir=/usr/share/man --bindir=/usr/bin --with-libdir=lib --inc
ludedir=/usr/include --sysconfdir=/etc/php5/apache2 --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-
dir=/etc/php5/conf.d --with-exec-dir=/usr/lib/php5/bin --enable-libxml --enable-filter --enable-session --with-mm --wi
th-pcre-regex=/usr --enable-xml --enable-simplexml --enable-spl --disable-debug --enable-memory-limit --enable-inline-
optimization --enable-zend-multibyte --disable-rpath --with-apxs2=/usr/sbin/apxs2 --disable-all --enable-cli --with-z
lib --with-curl --enable-mbstring

make install

rm /usr/lib/apache2/
ln -sf /usr/lib/apache2/ /usr/lib/apache2/

sudo sh /usr/sbin/apache2ctl restart

Test PHP

php -r 'echo "Hello World!"'