Bug #53695 [Com]: Bugs are not outputed when using php-fpm
| From: | arnoschn at gmail dot com | Date: | Thu, 24 Feb 2011 14:37:47 +0000 |
| Subject: | Bug #53695 [Com]: Bugs are not outputed when using php-fpm | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-159005@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53695&edit=1
ID: 53695
Comment by: arnoschn at gmail dot com
Reported by: szoftos at freemail dot hu
Summary: Bugs are not outputed when using php-fpm
Status: Bogus
Type: Bug
Package: FPM related
Operating System: FreeBSD
PHP Version: 5.3.5
Assigned To: fat
Block user comment: N
Private report: N
New Comment:
Hello,
I ran into the same problem.
Setting this in your php-fpm.conf helps:
php_admin_value[error_log] = "/var/log/php-fpm-errors.log"
Then I saw the errors still showing up in nginx, so I looked at the user
I was using to run nginx. It is "www-data".
So I created the file "/var/log/php-fpm-errors.log" and gave permissions
to "www-data" to write to it.
Solved.
Previous Comments:
------------------------------------------------------------------------
[2011-02-01 15:38:42] szoftos at freemail dot hu
Okay, this is still a bug, and not a bogus one.
I changed the configuration, right now these are all the config lines
for the given virtualhost:
--------------------------------
[virtualhost]
chroot = /usr/local/www/
chdir = /vhosts/virtualhost/htdocs
listen = /usr/local/www/var/run/sockets/virtualhost.php.sock
listen.owner = www
listen.group = www
listen.mode = 0660
user = username
group = groupname
pm = dynamic
pm.max_children = 50
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
pm.max_requests = 200
request_terminate_timeout = 1m
request_slowlog_timeout = 30s
slowlog = /var/log/php-fpm-slow.log
catch_workers_output = yes
php_admin_flag[register_globals] = off
php_admin_value[variables_order] = GPCES
php_admin_value[date.timezone] = Europe/Budapest
php_admin_flag[always_populate_raw_post_data] = on
php_admin_value[open_basedir] = /vhosts/virtualhost/htdocs
php_admin_value[doc_root] = /vhosts/virtualhost/htdocs
php_admin_value[upload_tmp_dir] = /vhosts/virtualhost/htdocs/tmp
php_admin_flag[zlib.output_compression] = on
php_admin_flag[safe_mode] = on
php_admin_value[disable_functions] =
escapeshellarg,escapeshellcmd,exec,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,system
php_admin_flag[magic_quotes_gpc] = on
php_admin_flag[magic_quotes_runtime] = off
php_admin_flag[magic_quotes_sybase] = off
php_admin_value[session.save_path] =
/vhosts/virtualhost/htdocs/admin/tmp
php_admin_value[safe_mode_exec_dir] =
/vhosts/virtualhost/safe_mode_exec_dir
php_admin_value[memory_limit] = 32M
php_admin_flag[short_open_tag] = on
php_admin_value[default_charset] = UTF-8
php_admin_value[error_reporting] = E_ALL & ~E_NOTICE
php_admin_flag[display_errors] = On
php_admin_flag[display_startup_errors] = On
--------------------------------
As you can see, all without quotes now. The mentioned example code runs
now with the same results: no output at all, when commenting out the
phpinfo() from it.
Please reopen the bug, as this is _not_ a bogus report.
Cheers,
Laszlo
------------------------------------------------------------------------
[2011-01-29 15:10:14] szoftos at freemail dot hu
Ah, thank you, i'll try the configuration without quotes. However, I was
thinking that the php_admin_value should be set in the same way as for
the mod_php module in apache. In there, one has to use quotes.
Maybe this should be a remark for php-fpm's config.
------------------------------------------------------------------------
[2011-01-29 12:11:42] fat@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
You must not use double (or simple) quotes arround E_ALL as constants
are
interpreted by the php core ini parser (quotes inhibits this
conversion)
php_admin_value[error_reporting] = "E_ALL" is not well understood.
php_admin_value[error_reporting] = E_ALL is correctely converted.
------------------------------------------------------------------------
[2011-01-10 08:16:48] fat@php.net
Are you sure it's related to php fpm ?
Here is the content of a test file:
<?php asdlk;k; ?>
Calling from CLI: nothing, white page
Calling from FPM: the same
Here is the content of another test file:
<?php nofunc(); ?>
Calling from CLI: Fatal error: Call to undefined function nofunc() in
/html/error.php on line 1
Calling from FPM: Fatal error: Call to undefined function nofunc() in
/html/error.php on line 1
The behaviour is the same with CLI or FPM.
@kalle:
can you reproduce the problem ?
------------------------------------------------------------------------
[2011-01-10 01:41:19] kalle@php.net
Hmm, I wonder if php-fpm is actually parsing the error_reporting
constants with their numeric bitfields to mask it correctly, could be
wrong here. Any thoughts fat?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=53695
--
Edit this bug report at http://bugs.php.net/bug.php?id=53695&edit=1