LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-14-2006, 07:43 PM   #1
mustangfanatic
LQ Newbie
 
Registered: Oct 2004
Location: Michigan
Distribution: SuSe, Fedora Core
Posts: 15

Rep: Reputation: 0
Apache2 + php5 won't load


I am running the newest versions of php5 and apache 2.2 as of April 13th, 2006. I installed php after apache was up and running. When I try to start apache with the php module I get the following error.

root@Server:# /usr/local/httpd/bin/apachectl -k start
httpd: Syntax error on line 54 of /usr/local/httpd/conf/httpd.conf: API module structure `php5_module' in file /usr/libexec/apache/libphp5.so is garbled - perhaps this is not an Apache module DSO?

From what I could gather from google php is not support apache 2.2 yet? Surely there are people with Apache 2.2 who are running php support. Does anyone have any idea on how to fix this?
 
Old 04-14-2006, 07:55 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
How did you configure PHP?
 
Old 04-14-2006, 07:58 PM   #3
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
When you build PHP5, the build went ok? What configure command did you use?

Given how new Apache 2.2 is, I would be patient and wait for things like PHP to catch up.

Also, see if there is any Apache 2.0 backward compatibility at the DSO level in Apache 2.2. That might help.

Peace...
 
Old 04-17-2006, 11:42 AM   #4
mustangfanatic
LQ Newbie
 
Registered: Oct 2004
Location: Michigan
Distribution: SuSe, Fedora Core
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mdarby
How did you configure PHP?
I just did a standard ./configure, make, make install. I havent been able to find any information to point me to any kind of options that might fix the problem.
 
Old 04-17-2006, 03:11 PM   #5
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by mustangfanatic
I just did a standard ./configure, make, make install. I havent been able to find any information to point me to any kind of options that might fix the problem.
I'm surprised compiling PHP5 as an Apache 2.2 DSO would result in the problem you're getting.

You didn't get any messages or anything from APXS when building PHP5?

Peace...
 
Old 04-17-2006, 08:03 PM   #6
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Try compiling PHP5 with the --with-apxs2 option

As an example, here is my PHP configure string:
Code:
./configure  --with-zlib=/usr/ --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gd \ 
--with-jpeg-dir=/usr/lib --with-bz2 --enable-gd-native-ttf --with-freetype-dir=/usr/X11R6/lib/X11/fonts/local/ --with-openssl
 
Old 04-17-2006, 08:17 PM   #7
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by mdarby
Try compiling PHP5 with the --with-apxs2 option
Exactly. I figured he had done that already and not tried to reuse an existing Apache 2.0 PHP DSO. We'll find out soon enough.

Peace...
 
Old 04-18-2006, 02:22 AM   #8
mustangfanatic01
Member
 
Registered: Jul 2005
Location: California
Distribution: Slackware 11.0, Fedora Core 5
Posts: 80

Rep: Reputation: 15
Quote:
Originally Posted by mdarby
Try compiling PHP5 with the --with-apxs2 option

As an example, here is my PHP configure string:
Code:
./configure  --with-zlib=/usr/ --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gd \ 
--with-jpeg-dir=/usr/lib --with-bz2 --enable-gd-native-ttf --with-freetype-dir=/usr/X11R6/lib/X11/fonts/local/ --with-openssl
Ok I'll give it a shot when I'm at work tommorrow
 
Old 04-19-2006, 12:35 PM   #9
mustangfanatic01
Member
 
Registered: Jul 2005
Location: California
Distribution: Slackware 11.0, Fedora Core 5
Posts: 80

Rep: Reputation: 15
I did the configure with apxs2 support. It even put the loadmodule in my httpd.conf file for me. Apache now starts without errors. I assumed that means that php is installed properly but I don't think that it is. When I browse to the install script for phpBB forums it doesn't load it right. I just see the text file. How can I check for sure to see if php is installed properly?

*EDIT*
Solution: PHP install didn't add the following line, which once added fixed the problem. Thanks for the help everyone!

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

Last edited by mustangfanatic01; 04-19-2006 at 12:52 PM.
 
Old 04-19-2006, 01:45 PM   #10
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Create a php file with this:
PHP Code:
<?php echo phpinfo?>
 
  


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
SLES9, apache2 and php5 ... scabrous1 Linux - Software 2 01-31-2006 02:46 PM
Apache2 and PHP5 SpiderIRE Linux - Software 3 09-30-2005 04:25 PM
Apache2 and PHP5 rul3r Slackware 7 09-11-2005 06:21 PM
Apache2 + PHP5.0.3 24jedi *BSD 1 07-21-2005 04:07 PM
Installing Apache2 and PHP5 biglaz Linux - General 1 10-15-2004 11:42 PM


All times are GMT -5. The time now is 01:32 AM.

Main Menu
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