LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 02-17-2006, 02:52 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
cannot load php5 module in apache 2, compile from source


I installed apache server 2.2.0 and mysql 4.1.2,
OS is centos 4.2, trying to install PHP 5.1.2 from source.
Apache runs correctly without php.

I compiled php's source code as follows:
./configure --with-apxs2 path-of-apxs --with-mysql path-of-mysql
make
make install

Then modified httpd.conf and in httpd.conf:

LoadModule php5_module modules/libphp5.so
AddModule mod_php5.c

<IfModule dir_module>
DirectoryIndex index.php default.php index.html index.htm
</IfModule>

AddType application/x-httpd-php .php .php3

However, when I tried to start apache I got an error message:
httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: zend_register_list_destructors_ex

It seems like a code problem, but I am not sure and have no
clue whether I could debug it by looking into the code.
I googled but got no useful information :-(

Appreciate your help.

Last edited by parv; 02-17-2006 at 03:06 PM.
 
Old 02-17-2006, 03:44 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 54
Try
ldconfig -v
You may see something out of place
 
Old 02-17-2006, 03:54 PM   #3
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
I did ldconfig -v | grep php and the thing I feel suspicious is:
Code:
ldconfig: Path `/usr/lib/mysql' given more than once
could this be the reason? as it is related to mysql, I don't
know whether if affects php module in apache.
well, how to deal with this problem though?
did i miss something else?

Thanks for your reply.

Quote:
Originally Posted by comprookie2000
Try
ldconfig -v
You may see something out of place
 
Old 02-17-2006, 04:49 PM   #4
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
I forgot to mention after "ldconfig -v",
I did not see anything about libphp.
Would this be the reason?
 
Old 02-17-2006, 04:50 PM   #5
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 54
I'm not sure but I think you need to recompile with more support;
some thing like this;
http://www.howtoforge.com/linux_apac..._ioncubeloader
I use gentoo so they do all that for me ...
gentoo is for dummys
 
Old 02-17-2006, 04:59 PM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
AddModule mod_php5.c
You don't need that line since you built php as a DSO. But you need the following (at least the 1st one):
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
As for the error it has to do with the builtin php support for Zend. I dunno what caused it, but you can delete the module, run "make clean" and start over to see if it builds OK.
Regardind the ldconfig error, open /etc/ld.so.conf and check if you have "/usr/lib/mysql" more than once. If that's the case delete the offending lines and re-run ldconfig.
 
Old 02-17-2006, 05:29 PM   #7
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
great! I deleted the old libphp5.so and recompiled php
with a few more options (I don't think they would affect apache though).
then, it workd!
I also removed the ldconfig error.

Thanks a lot, guys! Have a nice weekend.

Quote:
Originally Posted by bathory
You don't need that line since you built php as a DSO. But you need the following (at least the 1st one):
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
As for the error it has to do with the builtin php support for Zend. I dunno what caused it, but you can delete the module, run "make clean" and start over to see if it builds OK.
Regardind the ldconfig error, open /etc/ld.so.conf and check if you have "/usr/lib/mysql" more than once. If that's the case delete the offending lines and re-run ldconfig.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help: cannot load php5 module, compile from source parv Linux - Networking 2 02-18-2006 01:27 PM
Apache PHP5 module won't work after Mandriva 2006 upgrade MJatIFAD Linux - Software 2 02-14-2006 04:58 PM
can't compile/load nvnet module kryptobs2000 Slackware 2 07-20-2004 01:50 PM
i want to compile and load a module into kernel ramya272 Linux - Newbie 3 02-21-2004 11:17 AM
To compile or to load as module ? synapse Linux - Newbie 3 01-30-2004 05:41 AM


All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration