Bug #75120 [NEW]: php fpm returns http status 200 Ok and blank page if script no exist
From: peter dot volkov at gmail dot com
Operating system: Gentoo Linux
PHP version: 5.6.31
Package: FPM related
Bug Type: Bug
Bug description:php fpm returns http status 200 Ok and blank page if script no exist
Description:
------------
If we call php-fpm with SCRIPT_FILENAME=/some.php it will return http
status 200 and blank page. At the same time php-fpm's access.log will
contain:
24/Aug/2017:21:51:33 +0300 "- " 200 - 3.682 256 0.00% GET
I expect to receive some error message instead.
It looks like this is rather known problem and since error message is
not very evident it may take days to debug it! It's easy to step on this
problem since default nginx configuration sometime has:
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
instead of:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
And now consider this two cases! In second case if I request notexisting
script I'll receive status 404 with "File not found." in the body. And
in the first case:
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 24 Aug 2017 18:51:33 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=20
< X-Powered-By: PHP/5.6.30-pl0-gentoo
<
* Connection #0 to host rc.online.telekarta.tv left intact
Status 200 and no body. Why do we have this difference?
And I'm not alone with this problem:
http://beutelevision.com/blog2/2013/08/26/nginx-with-php-fpm-generating-blank-page/
and in other places of the internet.
What is the reason for this behaviour? Can we have this fixed?
Test script:
---------------
No script required.
--
Edit bug report at https://bugs.php.net/bug.php?id=75120&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75120&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75120&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75120&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75120&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75120&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75120&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75120&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75120&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75120&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75120&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75120&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75120&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75120&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75120&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75120&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75120&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75120&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75120&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75120&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75120&r=mysqlcfg
Thread (3 messages)
- peter dot volkov at gmail dot com