It’s a windows system.
I downloaded MySQL and have tabels built already.
I downloaded Apache and PHP.
Command php -v
returns correct version info in ‘CMD’.
Address ‘http:localhost’ in browser returns correct greeting page that says “It works!!”.
=======================================
Informations above should proof a working Apache and PHP installation.
=======================================
The Apache has been binded with port 127.0.0.1:9000. (checked with netstat -ano | findstr :9000
and telnet 127.0.0.1
)
File ‘php.ini’ has beed modified with extensions:
extension=mysqli
extension=pdo_mysql
File ‘httpd.conf’ has modifications below:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
<FilesMatch .php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
A test php file named ‘test.php’ that contains
<?php
phpinfo();
?>
was put in folder ‘htdocs’.
But after I ran php-cgi.exe -b 127.0.0.1:9000
and httpd.exe
in different CMD windows and input ‘localhost/test.php’ in my browser, I got error below:
Proxy Error
The proxy server could not handle the request
Reason: DNS lookup failure for: 127.0.0.1:9000d:
I assume the problem is the d:
in the end, so that it cannot find the correct path to ‘test.php’
What is going on?
Guan Zeyu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
After making any changes to httpd.conf, restart Apache to apply changes:
Stop Apache: httpd.exe -k stop
Start Apache: httpd.exe -k start
Ttry changing the SetHandler line to: SetHandler “proxy:fcgi://127.0.0.1:9000/”
Check Apache’s error.log (usually located in logs/error.log) for more details about the proxy error.
A P is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.