![]() php_admin_value = /var/log/fpm-php.so that php5-fpm can edit it: Uncomment the following two lines by removing at the beginning of the line: (error_log is defined here: php.net) $ sudo nano /etc/php5/fpm/pool.d/www.conf To get around this you can configure fpm ( php.net fpm config) to manage logs. If an array is large enough, it seems that nginx will truncate your log entry. So, if you setup nginx with php5-fpm and log a message using error_log() you can see it in /var/log/nginx/error.log by default.Ī problem can arise if you want to log a lot of data (say an array) using error_log(print_r($myArr, true)). I gathered insights from a bunch of answers here and I present a comprehensive solution: Changed the owner to the sites's users solved the problem. ![]() However, the log file is always empty, no matter what outrageous error has been made from php script. Even the appointed error.log file has be created successfully by php-fpm. I've check that the user have write (I've even tried 777) permission to the appointed log folder. Also nginx error log states stderr output from fpm with the same message. I've made an erroneous php script and run, and see error output on the web browser. # redirect server error pages to the static page /50x.html # pass the PHP scripts to FastCGI server listening on socketįastcgi_param SCRIPT_FILENAME /htdocs/$fastcgi_script_name įastcgi_pass unix:/var/run/php-fpm/default.sock įastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name Php_admin_value = /var/log/php-fpm/default/error.logĪccess_log /var/log/nginx/access.log rest Slowlog = /var/log/php-fpm/default/slow.log ![]() Everything seems fine except that PHP-FPM never writes error to its log. I've just installed a nginx+php-fpm server. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |