Reputation: 14568
When I install PHP from the default repositories $ service php5-fpm restart
works fine.
But when I install the latest version using the well known repository ppa:ondrej/php5
, the init script seems to be ruined. When I run $ service php5-fpm restart
it doesn't do or say anything.
If I start the PHP daemon manually by running $ /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf
(I found this line inside /etc/init/php5-fpm.conf), it works fine.
Is there any bullet-proof install method that you are using for installing the latest PHP version with a correct init script?
I'm using Ubuntu 12.04.
Upvotes: 1
Views: 2595
Reputation: 4170
I have never tried ppa:ondrej/php5, but I took a look at the deb and there is an upstart script (/etc/init/php5-fpm.conf) and an init.d script (/etc/init.d/php5-fpm). When both exist, calling service
gives precedence to the upstart script. One difference I noticed between the scripts is that the upstart script is using the --nodaemonize flag. The following command can be used to call the init.d script:
/etc/init.d/php5-fpm start
or
/etc/init.d/php5-fpm restart
If that works, then moving /etc/init/php5-fpm.conf out of /etc/init will cause the init.d script to have precedence.
Alternatively, fpm can be enabled when installing from source, by using the --enable-fpm option. http://www.php.net/manual/en/install.fpm.install.php
Upvotes: 2