0

I'm having trouble installing PHP with the old version 5.6 or below (5.2 is running well) on my Windows 11 machine. I know it is not recommended to run this old version, but in fact, I need to do so at the moment.

I know that this question is already asked several times, but all solutions did not help in my case. I already googled a lot this error message, but all hints did not work for me. Here are some links I had a look at:

PHP error: "No input file specified." in IIS 10.0, PHP 5.6 on local development server

"No input file specified" for some versions of PHP

and many more.

The error is, that I'm getting always the message

No input file specified.

when trying to open a PHP page. I already tried IIS as webserver as well as Apache, but the error is the same. So I assume it is not an issue of the webserver, but PHP. In Apache I'm getting more information in the error.log file.

I already tried to set the document_root in PHP and Apache to the exact same location. I already tried to comment out the document_root and open_basedir as described in other posts. The PHP version is a fresh download from https://windows.php.net/downloads/releases/archives/. I used the file php.ini-production template as php.ini. I just changed display_errors to On. The rest of the php.ini has not been changed (except doc_root trying to outcomment).

The configuration of PHP in the Apache webserver looks like this:

<IfModule fcgid_module>
FcgidInitialEnv PHPRC "D:/PHP/v5.5.38-nts-Win32-VC11-x86"
<FilesMatch \.(php|html)$>
    SetHandler fcgid-script
</FilesMatch>
FcgidWrapper "D:/PHP/v5.5.38-nts-Win32-VC11-x86/php-cgi.exe" .php
FcgidWrapper "D:/PHP/v5.5.38-nts-Win32-VC11-x86/php-cgi.exe" .html
</IfModule>

I've set the Apaches' webserver LogLevel to trace8 to get more information. This is being written in the error log file of Apache, when I'm trying to access i.e. the phpinfo.php file.

[Sat Dec 31 11:23:18.338359 2022] [core:trace5] [pid 16684:tid 1184] protocol.c(711): [client ::1:50400] Request received from client: GET /phpinfo.php HTTP/1.1

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(435): [client ::1:50400] Headers received from client:

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Host: localhost

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Connection: keep-alive

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400]
Cache-Control: max-age=0

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] sec-ch-ua: \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"108\", \"Google Chrome\";v=\"108\"

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] sec-ch-ua-mobile: ?0 [Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] sec-ch-ua-platform: \"Windows\"

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400]
Upgrade-Insecure-Requests: 1

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Sec-Fetch-Site: none [Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Sec-Fetch-Mode: navigate

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Sec-Fetch-User: ?1

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Sec-Fetch-Dest: document

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Accept-Encoding: gzip, deflate, br

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400]
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7

[Sat Dec 31 11:23:18.339347 2022] [http:trace4] [pid 16684:tid 1184] http_request.c(438): [client ::1:50400] Cookie: remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d=eyJpdiI6ImpTL0F1Sk1RSmErdTdzQTlRME53bmc9PSIsInZhbHVlIjoidll4SFZ6SHA3WmFZRnVMZ3ZqS0I0cnpURlFKckJJdWExNTFHNmtlUWd2bFA2WFd0YlM4bG9QUWoyb2Q1NkpMU2pvcW9NZGY5M3dVTUUxdUYxbHc3RTBUa2lTZGhkT05takNTRnhNRkRPMzU5NDRCdklJcERidFdreHFMQm1KRnJsQ2twLzhPZEVSa2lZS2hGUTRNUDQwSnY3QUlHcGkvRWx5QU1naUF1UGFTWVRmbGJDU2dOTlp3MVp6aTV2ZDZmTjJpSjJFamJwNG9sak5SR2UxR3BnRDM1aUNnbTVZL2RKblN1YzBsL2l0VT0iLCJtYWMiOiI1MGU3MzMyZmFlZDgxNjQ1NjI3MjNmZWFmYTU4YzhlMWJlZjQzN2RiZTZjMjM5MjQ4NjRiMTliZjY5OTYyM2E0IiwidGFnIjoiIn0%3D; HttpOnly; __utmc=111872281; __utmz=111872281.1671477985.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=111872281.881906265.1671477985.1671477985.1671559722.2; PHPSESSID=k77fg6s7n5fnf42aq3851bbn04

[Sat Dec 31 11:23:18.339347 2022] [authz_core:debug] [pid 16684:tid 1184] mod_authz_core.c(815): [client ::1:50400] AH01626: authorization result of Require all granted: granted

[Sat Dec 31 11:23:18.339347 2022] [authz_core:debug] [pid 16684:tid 1184] mod_authz_core.c(815): [client ::1:50400] AH01626: authorization result of : granted

[Sat Dec 31 11:23:18.339347 2022] [core:trace3] [pid 16684:tid 1184] request.c(360): [client ::1:50400] request authorized without authentication by access_checker_ex hook: /phpinfo.php

[Sat Dec 31 11:23:18.340339 2022] [core:trace4] [pid 16684:tid 1184] util_script.c(568): [client ::1:50400] Headers from script 'phpinfo.php':

[Sat Dec 31 11:23:18.340339 2022] [core:trace4] [pid 16684:tid 1184] util_script.c(571): [client ::1:50400] Status: 404 Not Found

[Sat Dec 31 11:23:18.340339 2022] [core:trace1] [pid 16684:tid 1184] util_script.c(650): [client ::1:50400] Status line from script 'phpinfo.php': 404 Not Found

[Sat Dec 31 11:23:18.340339 2022] [core:trace4] [pid 16684:tid 1184] util_script.c(571): [client ::1:50400] X-Powered-By: PHP/5.5.38

[Sat Dec 31 11:23:18.340339 2022] [core:trace4] [pid 16684:tid 1184] util_script.c(571): [client ::1:50400] Content-type: text/html

[Sat Dec 31 11:23:18.340339 2022] [http:trace3] [pid 16684:tid 1184] http_filters.c(1129): [client ::1:50400] Response sent with status 404, headers:

[Sat Dec 31 11:23:18.340339 2022] [http:trace5] [pid 16684:tid 1184] http_filters.c(1138): [client ::1:50400] Date: Sat, 31 Dec 2022 10:23:18 GMT

[Sat Dec 31 11:23:18.340339 2022] [http:trace5] [pid 16684:tid 1184] http_filters.c(1141): [client ::1:50400] Server: Apache/2.4.54 (Win64) mod_fcgid/2.3.10-dev

[Sat Dec 31 11:23:18.340339 2022] [http:trace4] [pid 16684:tid 1184] http_filters.c(959): [client ::1:50400] X-Powered-By: PHP/5.5.38

[Sat Dec 31 11:23:18.340339 2022] [http:trace4] [pid 16684:tid 1184] http_filters.c(959): [client ::1:50400] Keep-Alive: timeout=5, max=100

[Sat Dec 31 11:23:18.340339 2022] [http:trace4] [pid 16684:tid 1184] http_filters.c(959): [client ::1:50400] Connection: Keep-Alive

[Sat Dec 31 11:23:18.340339 2022] [http:trace4] [pid 16684:tid 1184] http_filters.c(959): [client ::1:50400] Transfer-Encoding: chunked

[Sat Dec 31 11:23:18.340339 2022] [http:trace4] [pid 16684:tid 1184] http_filters.c(959): [client ::1:50400] Content-Type: text/html [Sat Dec 31 11:23:18.340339 2022] [core:trace6] [pid 16684:tid 1184] core_filters.c(828): [client ::1:50400] writev_nonblocking: 286/286

How can I solve this issue?

halfer
  • 19,824
  • 17
  • 99
  • 186
dns_nx
  • 3,651
  • 4
  • 37
  • 66

0 Answers0