Installing PHP5.3 beta on Ubuntu 8.10

I wanted to try out the new feature available in PHP 5.3 a while ago. And ran into a few obstacles trying get it installed. Since then I’ve installed it a few times successfully.

In each case I already has apache, php and mysql installed according to the instructions in the Ubuntu Documentation.

Download the latest release candidate or snapshot of PHP 5.3. Extract the source.

The first issue I had was with apxs2, to get PHP installed for Apache. I didn’t have the expected apxs2 file. To resolve this I installed apache2-threaded-dev
sudo apt-get install apache2-threaded-dev

Then I was ready to run (with any addition options you need/want)
./configure --with-apxs2=usr/bin/apxs2 --with-mysql

I got the error “xml2-config not found. Please check your libxml2 installation.”
I needed to install libxml2-dev
sudo apt-get install libxml2-dev

Running the configure command again, it succeeded.

Next to run the make file sudo make
Followed by sudo make install
However it alerts you that you need to have at least one LoadModule in your httpd.conf. Ubuntu doesn’t use httpd.conf to load modules so unless you have added something already, then your httpd.conf will be blank. All you need to do is add a LoadModule line. It doesn’t matter if the module exists or not. I simply added LoadModule whatever.

Now the install should work. Finally you might need to enable the php5 module, and restart apache.
a2enmod php5
apache2ctl restart

Checking phpinfo(), you should now be running PHP 5.3

Share this article:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • DZone
  • Furl
  • Ma.gnolia
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
This entry was posted in Programming and tagged , , , . Bookmark the permalink.

Leave a Reply