LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2011, 12:02 PM   #1
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Rep: Reputation: 5
Apache won't restart after install of PHP [Fedora 15, 64-bit]


Hi,

I've had Apache 2.x running on my Fedora 15 box for a while, and it's been perfect. However, today I figured it would be good to put PHP on the machine too. So, I yummed php and a bunch of php modules onto the machine, which all installed with no problem. Having changed no config files, I went to restart Apache:

Code:
# /sbin/service httpd start
Starting httpd (via systemctl):  Job failed. See system logs and 
'systemctl status' for details.
                                                           [FAILED]
"systemctl status" didn't tell me anything (except that there are too few arguments), and "systemctl dump" wasn't enlightening either. I checked the Apache error log, and there is only one error in there from today - although nothing in there from trying to start up: (I'm pretty sure this is from when I first issued an httpd restart)

Code:
[Thu Sep 22 11:37:35 2011] [notice] caught SIGTERM, shutting down
The only thing in /var/log/messages is the following, each time I attempt to restart:

Code:
Sep 22 11:47:19 dbserver systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 22 11:47:19 dbserver systemd[1]: Unit httpd.service entered failed state.

I did the exact same PHP install on a Fedora 12 box yesterday and it worked perfectly. I would appreciate some suggestions as to how to get Apache up and running again. (ideally without rebooting the machine, because it's being used as a database server by other machines).

Thanks!

Last edited by cheddarcheese; 09-22-2011 at 12:32 PM.
 
Old 09-22-2011, 12:55 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

You should use:
Code:
systemctl status httpd.service
I noticed that you used:
Quote:
/sbin/service httpd start
You should restart the service, as I guess it was already running
Code:
/sbin/service httpd restart
Regards
 
1 members found this post helpful.
Old 09-22-2011, 01:05 PM   #3
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
Thx for the systemctl info' - I wasn't sure how to use it properly. httpd is already stopped now anyway, so I guess start or restart won't make too much difference at the moment. The info for httpd from systemctl is as follows:

Code:
# systemctl status httpd.service
httpd.service - LSB: start and stop Apache HTTP Server
  Loaded: loaded (/etc/rc.d/init.d/httpd)
  Active: failed since Thu, 22 Sep 2011 12:57:28 -0400; 2min 40s ago
  Process: 14175 ExecStop=/etc/rc.d/init.d/httpd stop (code=exited, status=0/SUCCESS)
  Process: 6746 ExecReload=/etc/rc.d/init.d/httpd reload (code=exited, status=0/SUCCESS)
  Process: 14695 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=1/FAILURE)
  Main PID: 2367 (code=exited, status=0/SUCCESS)
  CGroup: name=systemd:/system/httpd.service
It doesn't mean too much to me, but if you're able to suggest something based on the above, then that would be much appreciated.

FYI. There are no PHP modules being told to load in httpd.conf

Last edited by cheddarcheese; 09-22-2011 at 01:09 PM.
 
Old 09-22-2011, 01:22 PM   #4
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
Hmmm. I now have it working again, by virtue of editing /etc/rc.d/init.d/httpd. However, it's not ideal, since it means I'm running prefork, when I really want to run worker.

I'd changed /etc/rc.d/init.d/httpd a while back, such that the line

Code:
httpd=${HTTPD-/usr/sbin/httpd}
read, instead:

Code:
httpd=${HTTPD-/usr/sbin/httpd.worker}
... since both were on the system, and worker tends to be faster than prefork. This was working fine, but it now looks like only prefork will work, for some reason. Any clues appreciated, as I would much prefer to be running worker Apache. Thanks again!
 
Old 09-22-2011, 01:46 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
FYI. There are no PHP modules being told to load in httpd.conf
The module is loaded by /etc/httpd/conf.d/php.conf

Anyway looks like the php module has problems with apache running with mpm worker. You only chance it to run it as a fastcgi if you absolutely want to run apache as mpm worker.
 
1 members found this post helpful.
Old 09-22-2011, 02:18 PM   #6
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 82

Original Poster
Rep: Reputation: 5
Thanks for the point in the right direction. I have managed to get it all running again now with worker Apache, and PHP. Looking at the /etc/httpd/conf.d/php.conf file, I could see that there was a module missing for worker in /modules. So, per the info' at http://www.jqueryin.com/2010/08/07/s...-5x-fedora-13/ I installed the php-zts module:

Code:
yum install php-zts
Anyway, it's all up and running again now as I wanted, with PHP and worker Apache. Thanks very much for your suggestions!

Last edited by cheddarcheese; 09-22-2011 at 02:21 PM.
 
  


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
How to install apache php and mysql on Fedora? QueenZ Linux - Newbie 4 03-17-2009 10:15 PM
VirtualBox 2.1 on Fedora 64-bit won't install Windows 7 Beta 64-bit linuxroks88 Linux - Software 18 01-27-2009 11:37 AM
How to install php for apache on fedora? modpriest Linux - Newbie 5 12-11-2007 05:50 AM
Fedora Core4 64bit won't install, XP Pro 64 bit edition does. konopikj Fedora 4 02-23-2006 01:42 PM
PHP 4.3.4 + Apache 2.0.48 won't install linux-addict Linux - Software 1 01-17-2004 09:47 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration