I have a new Apache 2.4.25 installation that I have been trying to get running properly for a few months now. After many attempts to run PHP using php-fpm, I finally reverted to mod-fcgid and I still can't get everything to run properly.
Calling a PHP script, when the php.ini file is syntactically correct, leads to a "No Input File Specified" error. Note that this DOES NOT lead to a 404 error from Apache; leading me to the conclusion that the problem is in mod_fcgid and its configuration somewhere. As I understand it, mod_fcgid **should** start several children to run php calls. Here is what I have: 1. start Apache so I have a clean copy systemctl start httpd 2. check it is running: ps -ef | grep httpd root 29599 1 0 14:00 ? 00:00:00 /usr/apache-2.4.25/bin/httpd -k start apache 29600 29599 0 14:00 ? 00:00:00 /usr/apache-2.4.25/bin/httpd -k start apache 29601 29599 0 14:00 ? 00:00:00 /usr/apache-2.4.25/bin/httpd -k start apache 29602 29599 0 14:00 ? 00:00:00 /usr/apache-2.4.25/bin/httpd -k start apache 29603 29599 0 14:00 ? 00:00:00 /usr/apache-2.4.25/bin/httpd -k start 3. check for php child processes: ps -ef | grep php So, at this point, there are 4 httpd workers runnning and no php children are running 4. try a call to a php script (phpinfo.php) ps -ef | grep php apache 29789 29600 0 14:02 ? 00:00:00 /usr/php-7.1.3/bin/php-cgi Now Apache has started php-cgi, the parent process is one of the workers The response to the browser is "No input file specified" There are no errors shown in the Apache error log, nor in the php.log, nor in the php-fpm.log. ---------------------- The relevant parts of the Apache config file are: LoadModule fcgid_module modules/mod_fcgid.so # Add mod_fcgid changes <IfModule fcgid_module> <Directory "/httpd/*"> Options +ExecCGI AddHandler fcgid-script .php FcgidWrapper /usr/apache-2.4.25/bin/php-wrapper .php </Directory> </IfModule> LoadModule php7_module modules/libphp7.so ---------------------- The related parts of the php.ini file are: ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues. The alternate is to use the ; cgi.force_redirect configuration below ; http://php.net/doc-root doc_root = /httpd The rest of php.ini is the distributed file, except that the log files are pointed to /var/log/php/ so they should be written properly. A week or so back I had a workaround for this but it isn't acceptable as a production system (for one thing, it blows all the PHP errors out on the user's browser screen) and another week's work hasn't resolved the issue. Both php-fcgid and php-fpm are so common that I am convinced that I have a configuration problem but even starting back with a new PHP and Apache install doesn't resolve it. Can anyone suggest where I should look next? [FYI, in the past I have routinely brought up new server hardware/new web server combinations in about 3 weeks work. This one is approaching 4 months and not improving my self-esteem!] John --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org