Получение "Не указан входной файл." при попытке настроить PHP-FPM под Apache 2.4 (Windows) - PullRequest
0 голосов
/ 02 мая 2019

У меня не получается настроить PHP-FPM в определенной папке HTTP-сервера Apache 2.4.

Я пытался использовать все три способа настройки PHP-FPM, как в этом вопрос но все они привели к «Не указан входной файл».

У меня уже есть PHP 5.6, работающий в качестве модуля на сервере Apache 2.4 (Windows).Я хотел бы обновить PHP до 7.3.4 для всех приложений на сервере, но многие из них в настоящее время не готовы к этому.Было принято решение запустить две версии PHP одновременно.

PHP 5.4.60 продолжит работу в качестве модуля Apache 2.4

PHP 7.3.4 будет работать как PHP-FPM дляопределенная папка 'd: / www / htdocs / php7 /'

Я уже запустил PHP-FPM с:

php-cgi -b localhost:8734

(я также использовал опцию -C в приведенной выше команде, норезультат не изменился)

Извлечение httpd.conf:

    <VirtualHost *:80>
        DocumentRoot "d:/www/htdocs/"
        <Directory "d:/www/htdocs/php7/">
            <Files ~ "\.(php|phtml)$">
                SetHandler "proxy:fcgi://localhost:8734/"
            </Files>
        </Directory>
    </VirtualHost>

В журнале ошибок Apache (среди других строк 'send env var'):

    [proxy:debug] [pid 1308:tid 760] mod_proxy.c(1246): [client 10.16.32.48:49607] AH01143: Running scheme fcgi handler (attempt 0)
    [proxy_ajp:debug] [pid 1308:tid 760] mod_proxy_ajp.c(739): [client 10.16.32.48:49607] AH00894: declining URL fcgi://localhost:8734/D:/www/htdocs/html/phpinfo.php
    [proxy_fcgi:debug] [pid 1308:tid 760] mod_proxy_fcgi.c(1019): [client 10.16.32.48:49607] AH01076: url: fcgi://localhost:8734/D:/www/htdocs/html/phpinfo.php proxyname: (null) proxyport: 0
    [proxy_fcgi:debug] [pid 1308:tid 760] mod_proxy_fcgi.c(1028): [client 10.16.32.48:49607] AH01078: serving URL fcgi://localhost:8734/D:/www/htdocs/html/phpinfo.php
    [proxy:debug] [pid 1308:tid 760] proxy_util.c(2317): AH00942: FCGI: has acquired connection for (*)
    [proxy:debug] [pid 1308:tid 760] proxy_util.c(2371): [client 10.16.32.48:49607] AH00944: connecting fcgi://localhost:8734/D:/www/htdocs/html/phpinfo.php to localhost:8734
    [proxy:debug] [pid 1308:tid 760] proxy_util.c(2580): [client 10.16.32.48:49607] AH00947: connected  to localhost:8734
    [proxy:trace2] [pid 1308:tid 760] proxy_util.c(3014): FCGI: fam 2 socket created to connect to *
    [proxy:debug] [pid 1308:tid 760] proxy_util.c(3046): AH02824: FCGI: connection established with 127.0.0.1:8734 (*)
    ... (many 'sending env var' lines) ...
    [proxy_fcgi:trace8] [pid 1308:tid 760] mod_proxy_fcgi.c(680): [client 10.16.32.48:49607] .....s..         0106000100730500                
    [proxy_fcgi:trace4] [pid 1308:tid 760] util_script.c(568): [client 10.16.32.48:49607] Headers from script 'phpinfo.php':
    [proxy_fcgi:trace4] [pid 1308:tid 760] util_script.c(571): [client 10.16.32.48:49607]   Status: 404 Not Found
    [proxy_fcgi:trace4] [pid 1308:tid 760] util_script.c(571): [client 10.16.32.48:49607]   X-Powered-By: PHP/7.3.4
    [proxy_fcgi:trace4] [pid 1308:tid 760] util_script.c(571): [client 10.16.32.48:49607]   Content-type: text/html; charset=UTF-8
    [proxy_fcgi:trace8] [pid 1308:tid 760] mod_proxy_fcgi.c(680): [client 10.16.32.48:49607] FastCGI header (8 bytes)
    [proxy_fcgi:trace8] [pid 1308:tid 760] mod_proxy_fcgi.c(680): [client 10.16.32.48:49607] ........         0103000100080000                
    [proxy:debug] [pid 1308:tid 760] proxy_util.c(2332): AH00943: FCGI: has released connection for (*)

Что мне здесь не хватает?

...