Actions

Php53 » History » Revision 4

« Previous | Revision 4/11 (diff) | Next »
Tobias Liebig, 2008-09-06 14:43


PHP 5.3

Building PHP 5.3 alpha1 on Debian Linux


wget http://downloads.php.net/johannes/php-5.3.0alpha1.tar.bz2

  • Unpack source in some directory:

tar xjf php-5.3.0alpha1.tar.bz2

  • Install required debian packages for build:

apt-get install apache2-dev apache2-utils build-essential

  • If your system has no "
    " (like Debian/Ubuntu does) you need to create one and have at least on "LoadModule". "make install" expect this file exists

# make install expect at least on 
echo "LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so" >> /etc/apache2/httpd.conf

  • Install additional libraries (with dev versions -dev!), this depends on the system and configure options:

./configure --with-apxs2=/usr/bin/apxs2 --with-zlib --enable-bcmath --enable-mbstring --with-mcrypt --with-mysql=mysqlnd --with-mysqli=mysqlnd --without-pear --with-curl --with-mhash --with-pdo-sqlite --with-config-file-path=/etc/php5

make
make test
make install

  • if you have created the file "/etc/apache2/httpd.conf" (see above) you can remove it again now

cat /etc/apache2/httpd.conf | grep libphp5 > /etc/apache2/mods-available/php5.load
rm -f /etc/apache2/httpd.conf

  • enable php5 and restart your apache
    
    a2enmod php5
    apache2ctl configtest && apache2ctl restart
    

Hint: If the apache can't start, try to run libtool:


libtool --finish /usr/lib/apache2/modules/libphp5.so

Helpful Links/Tips:

Updated by Tobias Liebig about 13 years ago · 4 revisions