Open beata opened 7 years ago
What OS distribution and release do you use? Do you use PHP7 from Sury repositories? It might be an issue with the PHP7 package not adding the required directory entry in /run/
.
Here's my environment variables:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
# Custom variables
php__sury: True
php__packages: [ 'mysql', 'xml', 'mbstring', 'zip' ]
php__production: True
php__ini_cgi_fix_pathinfo: False # nginx should have the option disabled
php__ini_post_max_size: 16M
php__fpm_listen_owner: www-data
php__fpm_listen_group: www-data
php__fpm_pm: dynamic
The /run/php/
directory is created on systemd
-based hosts by the /usr/lib/tmpfiles.d/php7.0-fpm.conf
file. This requires a systemd
init to work. I'm not sure how that was done under sysvinit
hosts, probably via the init script itself. Still, that should be solved by the package maintainer. Perhaps it's time to consider an upgrade, at least to latest Ubuntu 16.04 LTS release? It should work fine there.
For PHP7 and above, the pid file would be placed in
/run/php
, which hasn't been created on filesystem. Thus NGINX can't work with PHP-FPM.