Bug #79014 [Com]: PHP-FPM & Primary script unknown | no more PHP Render
| From: | counterstrikec4 at gmail dot com | Date: | Thu, 02 Jan 2020 11:13:26 +0000 |
| Subject: | Bug #79014 [Com]: PHP-FPM & Primary script unknown | no more PHP Render | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224660@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79014&edit=1
ID: 79014
Comment by: counterstrikec4 at gmail dot com
Reported by: sainthyoga2003 at gmail dot com
Summary: PHP-FPM & Primary script unknown | no more PHP
Render
Status: Open
Type: Bug
Package: *General Issues
Operating System: openSUSE Tumbleweed
PHP Version: 7.4.0
Block user comment: N
Private report: N
New Comment:
I also show this bug when using the following bundle:
Apache (mpm event) and php-fpm (UDS unix socket).
Settings under which I see a problem:
cgi pathino fix value "1".
For more information, apache settings for php are configured correctly and everything is fine in the
.htacces file too. The problem is that when accessing non-existent php files, apache processes
correctly and responds with a 404 error, but php fpm still tries to process a non-existent php file
and responds with a primary script unknown error.
I also observed a problem using php unix socket in apache, namely when using only unix socket in php
with cgi path info value 0 set, php did not correctly handle script file name or script file path.
These are very important issues for using php fpm unix socket in apache.
Previous Comments:
------------------------------------------------------------------------
[2019-12-23 10:43:26] cmb@php.net
Feedback has been given.
------------------------------------------------------------------------
[2019-12-21 22:03:39] sainthyoga2003 at gmail dot com
I don't think so. If the previous version was working, why should fail when upgrade?
My current php7 handler for apache is:
<IfModule mod_php7.c>
<FilesMatch "\.ph(p[345]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.php[345]?s$">
SetHandler application/x-httpd-php-source
</FilesMatch>
#DirectoryIndex index.php4
#DirectoryIndex index.php5
DirectoryIndex index.php
</IfModule>
<IfModule mod_proxy_fcgi.c>
<FilesMatch "\.ph(p[345]?|tml)$">
SetHandler "proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
<FilesMatch "\.php[345]?s$">
SetHandler application/x-httpd-php-source
</FilesMatch>
DirectoryIndex index.php
#DirectoryIndex index.php4
#DirectoryIndex index.php5
</IfModule>
I have just made a rollback to get the PHP 7.3.11 what is working.
------------------------------------------------------------------------
[2019-12-21 21:30:41] requinix@php.net
Your Apache configuration is not set up properly for FastCGI. Specifically, it is not passing the
PATH_TRANSLATED CGI variable. May be missing others too.
------------------------------------------------------------------------
[2019-12-21 21:26:56] sainthyoga2003 at gmail dot com
Fix PHP Version.
------------------------------------------------------------------------
[2019-12-21 21:21:29] sainthyoga2003 at gmail dot com
Description:
------------
Actually I don't know if is related to Apache2 or to FPM.
All was running ok with PHP 7.3.11. This happened once I updated PHP to 7.4.0
If I try to run phpinfo from localhost: http://localhost/index.php I get a blank page. Now if I try to
run ANY other script from the web, I get the error 'Primary script unknown'.
Test script:
---------------
<?php
phpinfo();
Expected result:
----------------
Web page with my PHP information. Via CLI it works.
Actual result:
--------------
Blank page for localhost/index.php
File not found for localhost/whatever/whatever.php, localhost/whatever.php
Error loged as Primary script unknown
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79014&edit=1