Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Servers > Problem starting apache with PHP

Forgot Password?
 Servers   Anything server related, Apache, MySQL, Samba, server security, sendmail, exim, etc

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 06-14-2005   #1 (permalink)
Just Joined!
 
Join Date: Jan 2005
Location: UK
Posts: 77
Problem starting apache with PHP

This morning i had a power cut which has thrown my apache and php configuration out of the window! Upon restarting apache i get the following error message:

[root@server apache2]# bin/apachectl start
Syntax error on line 148 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied


I have tried doing a recompile of php but it still gives this message. Also tried removing the reference to the php module from the httpd.conf and it starts up with no problems (obviously without php).

If anyone could help would be appreciated so i can minimise my downtime.

thanks.
hdcleaver is offline  


Reply With Quote
Old 06-14-2005   #2 (permalink)
Content Team
 
sarumont's Avatar
 
Join Date: Apr 2003
Location: /dev/urandom
Posts: 3,682
Did you try re-compiling apache? I believe the module is created on Apache's compile rather than php's.
__________________
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
sarumont is offline   Reply With Quote
Old 06-19-2005   #3 (permalink)
Just Joined!
 
Join Date: Jun 2005
Posts: 3
SELinux

The problem is not your config or the compiling of Apache. I have the same problem and I am able to get everything working if I disable SELinux. As of yet I still have not found a work around without disabling SELinux.
jecker is offline   Reply With Quote
Old 06-19-2005   #4 (permalink)
Just Joined!
 
Join Date: Jan 2005
Location: UK
Posts: 77
yep too true im afraid. Disabling SELinux was the only way forward. The bad news is, it isnt fixed in FC4
hdcleaver is offline   Reply With Quote
Old 06-20-2005   #5 (permalink)
Just Joined!
 
Join Date: Jun 2005
Posts: 3
FC4 PHP APCHE MOD_SSL

I figured it out, I am able to now leave SELinux on. If you go to the directory were the permissions are denied and type “ls –lcontext” this will show you the additional permissions applied. To fix the problem go to the directory of the files having permission problems and type “chcon <filename> -t shlib_t” This will give apache the permissions it needs to run those files.
jecker is offline   Reply With Quote
Old 06-20-2005   #6 (permalink)
Just Joined!
 
Join Date: Jan 2005
Location: UK
Posts: 77
sounds good to me jecker! I'll try it later and let you know how i get on.
hdcleaver is offline   Reply With Quote
Old 06-20-2005   #7 (permalink)
Just Joined!
 
Join Date: Jun 2005
Posts: 3
SELinux

FYI this command "ls --lcontext" is LS --LCONTEXT in lower case. This command will show you the additional permissions provided by SELinux.
jecker is offline   Reply With Quote
Old 06-20-2005   #8 (permalink)
Just Joined!
 
Join Date: Jan 2005
Location: UK
Posts: 77
works a treat!! Thanks a lot
hdcleaver is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 09:20 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2