httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank <thu...@apache.org>
Subject Re: [users@httpd] unable to execute php-fpm properly
Date Thu, 13 Apr 2017 00:02:10 GMT
On 12/04/17 05:34 PM, John Iliffe wrote:
> I am converting my web pages from mod_php to php-fpm, following the
> directions found at:   https://wiki.apache.org/httpd/PHP-FPM   Testing to
> date indicates that on this server all scripts work properly under mod_php.
>
> Both of the following were tried within a <VirtualHost> container for the
> default virtual host.
>
> If I use the "simple" approach from the Wiki:
>
>  ProxyPass "/*.php/" "fcgi://127.0.0.1:9000" enablereuse=on
>
> then the page SOURCE is displayed, PHP never executes.  Adding a first line
> of      #! /path-to-php-executable   doesn't accomplish anything.  Neither
> way leads to any errors showing in the php-fpm log.
>
>
> Using the "more flexible" approach:
>
> ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/httpd/iliffe/$1
>    enablereuse=on
>
> Gives me a "No Input File Specified" error.  This line was cribbed from the
> Wiki example and the path /httpd/iliffe/  is precisely where the php script
> lives, based on the server root and not the document root as noted in the
> Wiki article.
>
> There is no php-fpm error message issued in either case and the Apache
> error entry for the ProxyPassMatch case is:
>
> [Wed Apr 12 16:50:28.688837 2017] [proxy_fcgi:error] [pid 13574:tid
> 140145512003328] [client 192.168.1.10:45240] AH01071: Got error 'Unable to
> open primary script: /httpd/iliffe/testfcgi.php (No such file or
> directory)\n'
>
> I am using mostly the defaults in the php-fpm config and pool config files.
> The default path to the php executable has been updated to point to where
> it really is.
>
> Can anybody see what I might have missed?
>
> Thanks in advance.
>
> John
> =========================================
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


1) ProxyPass doesn't use PCRE (the wiki does not use PCRE with 
ProxyPass, either). You need to use ProxyPassMatch to parse PCRE.

2) /httpd/iliffe/testfcgi.php would need to exist on your filesystem or 
php-fpm chroot. The requested URI is literally appended to the path in 
the ProxyPassMatch directive.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message