Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

my PHP is not working

Posted on 2006-03-24
10
Medium Priority
?
1,112 Views
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

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
0
Comment
Question by:247RealMedia
  • 5
  • 5
10 Comments
 
LVL 6

Expert Comment

by:Brian Bush
ID: 16285849
Could you post the configure options that you used to build PHP?

--brian
0
 
LVL 3

Author Comment

by:247RealMedia
ID: 16301223


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
 
LVL 6

Expert Comment

by:Brian Bush
ID: 16302031
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 3

Author Comment

by:247RealMedia
ID: 16303526
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
 
LVL 6

Expert Comment

by:Brian Bush
ID: 16303638
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
 
LVL 3

Author Comment

by:247RealMedia
ID: 16306006
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
 
LVL 6

Expert Comment

by:Brian Bush
ID: 16306092
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
 
LVL 3

Author Comment

by:247RealMedia
ID: 16312623
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
 
LVL 3

Author Comment

by:247RealMedia
ID: 16313145
php5 works after some tweaks:


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

TY
0
 
LVL 6

Accepted Solution

by:
Brian Bush earned 1500 total points
ID: 16313938
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question