LinuxQuestions.org
Review your favorite Linux distribution.
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 02-04-2006, 09:39 AM   #1
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
Very confused over Apache / PHP issue


OK .. before I start beating my head against a wall I need some ideas on a strange Apache issue.

I installed Apache, PHP and MySQL using the tutorial from this site, and packages from LinuxPackages.net.

Apache works just fine on it's own, but when I add this line in the httpd.conf and restart Apache, it starts but stops immediately.

Code:
Include /etc/apache2/mod_php.conf
This is what my /etc/apache2/mod_php.conf looks like:

Code:
#
# mod_php - PHP Hypertext Preprocessor module
#

LoadModule php5_module lib/apache2/libphp5.so

# Tell Apache to feed all *.php files through the PHP module
AddType application/x-httpd-php .php .phtml

# This will display PHP files in colored syntax form.  Use with caution.
#AddType application/x-httpd-php-source .phps
My /var/log/apache2/error_log does not show any errors at all.

Any ideas anyone?
 
Old 02-04-2006, 11:50 AM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Does /var/log/syslog or /var/log/messages say anything?
You could just add the text from mod_php.conf to httpd.conf; it might be a permissions issue.
 
Old 02-04-2006, 12:24 PM   #3
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for the suggestions, no luck so far though. There was nothing useful in /var/log/messages or syslog.

I tried commenting out the mod_php line and adding the lines from there one by one to my httpd.conf, and it is definitely this line which is making it fall over:

Code:
LoadModule php5_module lib/apache2/libphp5.so
I did a "chmod 777" on libphp5.so just to make sure Apache isn't having any problems accessing this file, but it didn't help.
 
Old 02-04-2006, 02:21 PM   #4
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
In my httpd.conf I have:
Code:
LoadModule php5_module        modules/libphp5.so
I also have libphp5.so in various locations:
Code:
/usr/lib/apache2/libphp5.so
/usr/src/php-5.1.2/libs/libphp5.so
/usr/src/php-5.1.2/.libs/libphp5.so
/usr/local/apache2/modules/libphp5.so
Are you sure this is pointing to the correct one?
 
Old 02-05-2006, 04:50 AM   #5
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
Yep .. it's pointing to a good location. To test this I renamed the file and tried starting apache again:

Code:
# apachectl restart
Syntax error on line 1071 of /etc/apache2/httpd.conf:
Cannot load /usr/modules/libphp5.so into server: /usr/modules/libphp5.so: cannot open shared object file: No such file or directory
I'm at the point where I think I might completely remove Apache, MySQL and PHP and recompile them manually from tarballs. Unless you can think of anything else I could try?
 
Old 02-05-2006, 08:24 AM   #6
peterb
Member
 
Registered: Aug 2003
Location: Athens, Greece
Distribution: Mandriva, Fedora
Posts: 127

Rep: Reputation: 15
In case you haven't checked the following:

On my system, the mod_php.conf file is owner root and group root with 644 permissions.
As for libphp5.so, the file shows owner root and group root with 755 permissions.

Peter
 
Old 02-05-2006, 10:32 AM   #7
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
I would try changing your LoadModule line in httpd.conf to this:
Code:
LoadModule php5_module        modules/libphp5.so
All of the webservers I preside over have this exact line. I'm willing to be that "lib/apache2/libphp5.so" isn't the correct location.
 
  


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
PHP & Apache Issue? Plz help! wh33t Programming 1 10-01-2005 06:17 AM
pear issue with Apache 2 and PHP Jediman Mandriva 0 04-19-2005 01:31 PM
confused on php and Mysql install spedsta Linux - Software 3 11-05-2004 02:36 PM
Apache and PHP: confused WiWa Linux - Software 3 06-04-2004 08:05 AM
Confused trying to do password validation in PHP Pcghost Programming 4 02-02-2004 01:10 PM


All times are GMT -5. The time now is 09:29 PM.

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