Apache mod_proxy_fcgi and PHP-FPM (php-cgi.exe) issue (No input file specified.) on Windows

后端 未结 5 1990
别跟我提以往
别跟我提以往 2021-02-20 00:22

The following is PHP-FPM (PHP 5.5)

php-cgi.exe -b 127.0.0.1:9000

The following is mod_proxy_fcgi (Apache 2.4)

The first way

<         


        
5条回答
  •  伪装坚强ぢ
    2021-02-20 00:53

    I was getting this error when following the steps indicated here to run PHP under Apache on Windows via FastCGI:

    https://www.orbitale.io/2017/11/11/apache-and-php-fpm-in-windows.html

    After setting up php-cgi.exe as a service on port 9000 (using NSSM) and setting httpd.conf to handle php files as such:

    
        DirectoryIndex index.php index.html
    
    
    
        SetHandler "proxy:fcgi://127.0.0.1:9000#"
    
    

    I was getting this same error when navigating to localhost (which contained an index.php with a simple .

    I was getting worried until I tried editing my php.ini where I defined the doc_root directive:

    doc_root = C:\Apache24\htdocs
    

    Having done that and having restarted my Apache service, voilà I got the php info page! I'm using PHP 7.3.5 NTS x64 with Apache 2.4 x64.

提交回复
热议问题