my PHP is not working

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

BELOW IS A PART OF HTTPD.CONF FILE
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
LVL 3
247RealMediaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian BushSolutions ArchitectCommented:
Could you post the configure options that you used to build PHP?

--brian
0
247RealMediaAuthor Commented:


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
--with-mysql_config=/usr/local/mysql/bin/mysql_config
--enable-png --with-snmp=/usr/local --enable-sockets
--enable-pear

Thank you
 
0
Brian BushSolutions ArchitectCommented:
Unless you have some reason not to build PHP as a module,
you should use the apxs flag instead of apache2:
--with-apxs2=/usr/local/apache2/bin/apxs

Try that and let me know if you get the same error.
--brian
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

247RealMediaAuthor Commented:
I also tried to compile it with
--apxs2=/usr/local/apache2/bin/apxs

I am still having the same error.

Please help

Thank you
0
Brian BushSolutions ArchitectCommented:
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:
http://httpd.apache.org/download.cgi

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.
--brian
0
247RealMediaAuthor Commented:
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
 
0
Brian BushSolutions ArchitectCommented:
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.

--brian
0
247RealMediaAuthor Commented:
I'm using httpd-2.2.0
php5

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
0
247RealMediaAuthor Commented:
php5 works after some tweaks:


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

TY
0
Brian BushSolutions ArchitectCommented:
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 \
--with-mysql_config=/usr/local/mysql/bin/mysql_config


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.
--brian
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.