Solution to php fpm error: First check the "/usr/local/php/var/run" directory and the corresponding pid file; then check whether the configuration file has errors; then open the "php-fpm" file ; Finally, change the path to an absolute path and restart "php-fpm".
php-fpm failed to start:
Recommended: "PHP Tutorial"
After installing LNMP today, I found that php-fpm could not be started.
The error is as follows:
[root@localhost php-5.4.37]# service php-fpm start Starting php-fpm ................................... failed
Compile and install
The compilation parameters are as follows:
./configure --prefix=/usr/local/php --with-config-file-path=/etc/php --enable-fpm --with-fpm-user --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql/ --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --with-curl --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 make && make install
2. Copy the configuration file and startup script
mv /usr/local/php/etc/{php-fpm.conf.default,php-fpm.conf} cp /usr/local/src/php-5.4.37/sapi/fpm/init.php-fpm /etc/init.d/php-fpm chmod 755 /etc/init.c/php-fpm chkconfig --add php-fpm service php-fpm start
and report an error when starting.
It can be started directly during installation. Today is special.
Then restart it, and the error is as follows:
[root@localhost php-5.4.37]# service php-fpm restart Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ? Starting php-fpm [16-May-2015 19:23:22] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98) [16-May-2015 19:23:22] ERROR: FPM initialization failed failed
The above is the detailed content of How to solve php fpm error problem. For more information, please follow other related articles on the PHP Chinese website!