Extension Development, compiling php

From TYPO3Wiki

Jump to: navigation, search

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

[edit]

Contents

[edit] Introduction

For use with caution.

[edit] Download php-tarball from php.net

<shell> wget http://php.net/php-5.2.6.tar.bz2 </shell>

[edit] Unzip and change to php directory

<shell> tar xvvjf php-5.2.6.tar.bz2 cd php-5.2.6 </shell>

[edit] Choose your compiling options (and add them to the script):

<shell>

./configure --help

</shell>

[edit] Run installation script:

<shell> ./install.sh </shell>

The script:

<shell>

  1. !/bin/bash

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 make install

rm /usr/lib/apache2/mod_php5.so ln -sf /usr/lib/apache2/libphp5.so /usr/lib/apache2/mod_php5.so

sudo sh /usr/sbin/apache2ctl restart </shell>

[edit] Enjoy php

<php> php -r 'echo "Hello World!"' </php>

--Chibox 22:13, 8 August 2008 (CEST)

Personal tools