LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-07-2006, 09:14 AM   #1
congo4real
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Rep: Reputation: 1
Question Getting Apache and PHP working simultaneously Problem


Hi.
I use Fedora-5 Linux as my Operating System. Recently I installed most resent versions of Apache web-server and PHP on my system. I installed and tested Apache, first, and it was successful. Next, I installed PHP, however, after the installation I noticed that Apache wouldn't start (i.e. httpd will not start, restart or reload). While troubleshooting, I observed that when I remove the line shown below from the httpd.conf file, Apache would work fine, with no problems.

LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

But this line of code is used by PHP. The libphp5.so is located in the path shown in above, and I copied the php.ini file to the recommended location. Could anyone please assist me, because I am confused and I don't know how to fix this problem.

Thanks.
 
Old 09-07-2006, 10:22 AM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
what do your logs say after the start of apache fails?
which version of apache are you using?
did you install from the rpms supplied in the fc5 repository?

BTW: welcome to LQ
 
Old 09-07-2006, 11:15 AM   #3
congo4real
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 1
Thanks for the response.
My log apache file (error_log) doesn't mention anything about this. The only error message I get, is if I try reloading httpd (i.e. service httpd reload), after including the code, shown below, in the httpd.conf file.

LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

Then I get this error message

Reloading httpd: not reloading due to configuration syntax error
[FAILED]

I'm using httpd-2.2.3, which I downloaded from Apache website about two days back.
 
Old 09-07-2006, 12:05 PM   #4
congo4real
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 1
More information:

I was able to get httpd running again by using this command

/usr/local/apache/bin/apachectl start

However, when I checked the loaded module (/usr/sbin/httpd -M), I get the following error message:

httpd: Syntax error on line 205 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib/httpd/modules/libphp5.so into server: /usr/lib/httpd/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

I changed the permissions of the "libphp5.so" file to 777, but I still got the same responce.
Please help.
 
Old 09-11-2006, 06:58 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Did you searach the internet for your problem? There are plenty hits for cannot restore segment prot after reloc: Permission denied.

Last edited by Wim Sturkenboom; 09-12-2006 at 09:29 PM. Reason: fixed a typo
 
1 members found this post helpful.
Old 09-12-2006, 02:38 PM   #6
congo4real
LQ Newbie
 
Registered: Sep 2006
Posts: 4

Original Poster
Rep: Reputation: 1
Thanks Wim Sturkenboom
I checked out the URLs, and got it fixed.

Had to change the SELinux Setting from Enforcing to Permissive

Next I changed the Severname, httpd.conf, to my machine's name

Thanks for the assistance
 
1 members found this post helpful.
  


Reply



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
FC5 - Apache and PHP not working well Boby Fedora 9 11-16-2006 07:16 AM
Apache config for PHP (not working) Thanotos Slackware 2 11-30-2005 12:52 AM
apache+php not working after restart raduromeo Linux - Software 5 11-23-2005 06:16 AM
Apache/PHP not working Seventh Linux - Software 1 06-23-2005 05:37 PM
Apache + PHP not working WiWa Linux - Networking 3 10-18-2004 06:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:23 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
Open Source Consulting | Domain Registration