[SOLVED] Apache won't restart after install of PHP [Fedora 15, 64-bit]
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 11:32 AM.
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 12:09 PM.
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!
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.
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 01:21 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.