We help IT Professionals succeed at work.

my PHP is not working

247RealMedia asked
Medium Priority
Last Modified: 2007-12-19
after compiling PHP on slackware, i can not start APACHE
i get the following error

/usr/local/apache2# bin/apachectl restart
httpd: Syntax error on line 231 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp4.so into server:
/usr/local/apache2/modules/libphp4.so: undefined symbol: ap_signal

what should i do?

i m using php-4.4.2 and httpd-2.1.3-beta

as you can see LoadModule line is uncomment, when i put a comment apache start but php is not working

# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php4_module        modules/libphp4.so

# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#ExtendedStatus On
Watch Question

Brian BushSolutions Architect

Could you post the configure options that you used to build PHP?




Here are the options that i use to build php.

I am using apache2
and php-4.4.2

./configure --prefix=/usr/local --with-apache2=/usr/local
 --enable-cli --enable-cgi --enable-fastcgi --enable-debug
 --enable-libgcc --enable-zlib --enable-odbc --enable-pear
--with-gd=/usr/local --with-freetype-dir=/usr/local
--enable-png --with-snmp=/usr/local --enable-sockets

Thank you
Brian BushSolutions Architect

Unless you have some reason not to build PHP as a module,
you should use the apxs flag instead of apache2:

Try that and let me know if you get the same error.


I also tried to compile it with

I am still having the same error.

Please help

Thank you
Brian BushSolutions Architect

Sorry to keep telling you to rebuild, I know
these sorts of things are frustrating.

Persistence is the only way to get through it.
Apache 2.2.0 is out as a release version:

I would suggest that you get it and shy
away from the "beta" versions, if possible.

Be sure to build apache with:
configure --enable-so

Regardless of whether or not you are able
to do that, the next thing to do is build php
with nothing but this:
configure --with-apxs2=/usr/local/apache2/bin/apxs

Then see if it will start up. If not, we have
bigger problems.

Let me know.


I will like to configure PHP to work with Just for Fun Network Management System.

if i configure PHP with just --with-apxs2=/usr/local/apche2/bin/apxs
Just for Fun Network Management System will not work.

Just for Fun Network Management System needs PEAR, GD2,SNMP, CGI,CLI,ODBC

Please help

Thank you
Brian BushSolutions Architect

I understand, but you need to start with this to make sure it will work.
Then you can add options to troubleshoot the problems. It is often
tied to an extension or library.



I'm using httpd-2.2.0

I'm getting the following error now:

usr/local/apache2# bin/apachectl start
httpd: Syntax error on line 414 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apa                     che2/libexec/libphp5.so into server: /usr/local/apache2/libexec/libphp5.so: cannot open shared ob                     ject file: No such file or directory

This is what is in line 214:

LoadModule php5_module libexec/libphp5.so

Please help

Thank you


php5 works after some tweaks:

How do i enable: GD, SNMP, CLI,LIB, PNG, CIG, ODBC within PHP
without an other compile

Solutions Architect
Pretty sure you have to rebuild on *nix systems.

I am guessing the debug flag was your problem.
Unless you are testing the PHP app itself as part
of the development team, you don't want to enable
that one.

There are also a few other things I would change in the
configure script. CGI and CLI are defaults, so drop them.
I also use --with-png-dir instead of --enable-png. You also
need to add a --with-zlib-dir for the PNG support.

Try this configure script:
./configure \
--enable-fastcgi \
--enable-libgcc \
--enable-odbc \
--enable-sockets \
--with-gd \
--with-zlib \
--with-png-dir \
--with-zlib-dir \
--with-snmp=/usr/local \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-freetype-dir=/usr/local \

That should be all you need to do everything you wanted in PHP5.
Sorry this takes so long. Get me access to your box and I can fix it quick ;)
Just kidding.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.