Forum Moderators: phranque
I have a new installation of Redhat 9, running the default Apache and PHP, configured for SSI's and CGI.
CGI is working fine, but when dynamic code is executed from a dynamic page it does not work, in one case it just displays the source code of the PHP. In other cases it shows the error:
Can't connect : Connection refused at /var/www/cgi-bin/exec/search.cgi line 1785.
The developers have said that the server needs to do web requests to itself and the server configuration is stopping it.......
Any ideas?
Thanks,
Charlie
Welcome to WebmasterWorld!
The one case of "showing the code" is likely a MIME-type configuration problem -- The server should usually be set to send a MIME-type header of text/html or text/plain to the client, and not application/<anything>.
as for the connection refusal, is this a server in your home/office, at your company, or a paid hosting account? What access do you have, in other words, and who can/do you call on if the server needs deep digging-into?
After we define this a bit more, we can decide if this thread will do better over in the PHP forum -- They tend to be more conversant with the innards of Apache over there than we are with PHP over here...
Jim
The line:
AddType application/x-httpd-php .php
was missing from httpd.conf so hopefully the code will be processed now.
As for the connection refused message, it is a server in house for a company I was doing some consulting at, and I am trying to find out from the developers, HOW it is making requests for pages to itself, maybe the Linux firewall is blocking them for some reason....
If its using the public IP to contact itself would this fail?