CentOS 7 Apache use PHP-FPM

Install PHP-FPM with command yum install php-fpm Edit www.conf vi /etc/php-fpm.d/www.conf Find listen = 127.0.0.1:9000 Replace with listen = /var/run/php-fpm/default.sock Find ;listen.owner = nobody ;listen.group = nobody Replace with listen.owner = apache listen.group = apache Edit php.conf mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.old vi /etc/httpd/conf.d/php.conf Add ProxySet disablereuse=off SetHandler proxy:fcgi://php-fpm AddType text/html .php DirectoryIndex index.php SetHandler application/x-httpd-php-source Restart … Read more

Enable Error Logging in php-fpm

Edit your pool file vi /etc/php/7.0/fpm/pool.d/www.conf Add catch_workers_output = yes php_flag[display_errors] = on php_admin_value[error_log] = /var/log/fpm-php.www.log php_admin_flag[log_errors] = on if you only enable “log_errors”, then errors go to default nginx error log. php-fpm

Install PHP 7.1 php-fpm from source

Lets install the requirements. On CentOS, run yum -y install libxml2-devel libcurl-devel libmcrypt-devel openssl-devel yum -y install libjpeg-turbo-devel libpng-devel freetype-devel libtidy-devel Before you can install, you need to check MySQL socket location. To do this, run following command in MySQL command prompt. show variables like ‘%socket%; Download and install PHP 7.1 from source mkdir /usr/local/src … Read more