Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Ubuntu 8.04 on this server. I had PHP 5.2 installed via the package manager. I removed it to install PHP 5.3.1 by hand. I built the packages like so

./configure --prefix=/opt/php --with-mysql --with-curl=/usr/bin --with-apxs2=/usr/bin/apxs2
make install

This installed PHP 5.3.1 in /opt/php/

$ php -v
PHP 5.3.1 (cli) (built: Dec  7 2009 10:51:14) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

However, when I try to start Apache I get this.

 # /etc/init.d/apache2 restart
 * Restarting web server apache2       
  apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: 
  Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: 
  Cannot load /usr/lib/apache2/modules/libphp5.so into server: 
  /usr/lib/apache2/modules/libphp5.so: undefined symbol: OnUpdateLong

Any ideas what's causing this error? All the references I can see have to do with building php5 packages for php4 or the like. PHP4 has never been installed on this machine.

share|improve this question
add comment

5 Answers

actually, what James Hackett said was more or less what worked for me.

My problem wasa that I built PHP before I installed Apache (I built PHP from latest trunk and installed Apache2 via APT).

So when I encountered the error that apache encountered an undefined symbol (the module which is not found is arbitrary btw.), I did the following:

  1. make distclean on the php source
  2. ./configure --prefix=/usr/local/php-5.3-svn --with-apxs2=/usr/bin/apxs2
  3. make && make install

and everything worked just fine.

Captain obvious was hiding from me, of course since if you just remake without make distclean && configure, make just compiles the new symbols which obviously is not enough ;-)

share|improve this answer
add comment

I had this same problem and what I did was delete my php source directory, re-extract the tarball and then compile again and everything worked fine.

I had previously installed php on this system without apache and then I had tried reinstalling php from the same source directory with different config settings.

share|improve this answer
add comment

You built php5 but you did'nt rebuilt the glue between apache and php5. Since you are using mod_php5, it fails (logical).

You may be able to run php script thanks to fastcgi (I assume your built-by-hand php 5.3.1 is ok), but anyway I recommend you to act in another manner.

That's pretty nasty to build a software by hand on a production server. Moreover PHP5 is a big piece of software, you really should not do that for maintenance and security purposes.

The correct way to achieve this, if you really need that version, is to backport the package. (yes, packaging !)

It require a bit of packaging knowledge and time. You can get the packaging sources with: apt-get source php5, provided you have a deb-src source in /etc/apt/sources.list

share|improve this answer
It's not a production server. It's just our dev server and I'm trying to figure out what, if anything php 5.3 will break in our system. –  baudtack Dec 7 '09 at 21:56
"That's pretty nasty to build a software by hand on a production server. Moreover PHP5 is a big piece of software, you really should not do that for maintenance and security purposes." On most distributions it's the only way to stay up-to-date. Ubuntu for example, only has 5.2.10 as stable in its repositories which was released back in June 2009. Personally I find it more of a security risk to use pre-packages because they have a lot of extra stuff built in that you may not need and can strip out if you build them yourself. Plus you can keep up-to-date. –  Andy Shellam Feb 16 '10 at 13:13
add comment

for those of you experienceing the zend_parse_paramater error from apache2, while loading libphp5.so:

/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: undefined symbol: zend_parse_parameters

take a look at the ./configure output. if you get a message saying something similar to:

configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 (found: none).

try installing bison: sudo apt-get install bison

then make distclean then ./configure ... then make then make -i install


share|improve this answer
It should only be necessary to rebuild the zend parsers if you've modified the PHP source code in some way. I've never installed bison on any production servers and never had a problem. –  Andy Shellam Feb 16 '10 at 13:12
add comment

As @zecrazytux indicated, did you install the appropriate apache-dev packages? PHP could well have built without them, even though you told it where they were. You need to look at the ./configure output.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.