Link to home
Start Free TrialLog in
Avatar of kiannack55
kiannack55

asked on

Cannot access website FF tries to download application/x-httpd-php

I tried installing a mail client on my server and somehow the regular site got messed up. I played around a bit with Postfix, Sendmail and Squirrelmail. My server uses Debian, Apache2. I'm not sure where I went wrong. Every time I try to visit the site Firefox tries to download a application/x-httpd-php file. I tried adding AddType and others to the .htaccess page, but nothing works.
Avatar of sapparod
sapparod

I think you hoave to make sure that you enable mod_php if you are using apache with prefork.
In case, you are using apache-worker, you need to check the cgi setting and enable module fcgid(for example).
Finally make sure that you config apache to the right folder with +execcgi option.
Avatar of kiannack55

ASKER

I tried to enable mod_php and it said it was already enabled. Then I enabled the mod_fcgid and I can't visit the site using the url, but when I visit it using its ip address it still tries to download the application/x-httpd-php file. Then I tried adding
<Directory /home/*/public_html>
Options +ExecCGI
AddHandler cgi-script .cgi
</Directory>

to the httpd.conf file and restarted the server and nothing changed.
I checked the Apache2 error.log and it had multiple messages like this
[Tue Jan 05 08:29:28 2010] [warn] child process 8619 still did not exit, sending a SIGTERM
[Tue Jan 05 08:29:35 2010] [notice] caught SIGTERM, shutting down
[Tue Jan 05 08:34:09 2010] [notice] FastCGI: process manager initialized (pid 8873)
[Tue Jan 05 08:34:10 2010] [notice] Apache/2.2.9 (Debian) mod_fastcgi/2.4.6 PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g configured -- resuming normal operations
[Tue Jan 05 08:34:44 2010] [notice] caught SIGTERM, shutting down
[Tue Jan 05 08:34:46 2010] [notice] FastCGI: process manager initialized (pid 8919)
[Tue Jan 05 08:36:23 2010] [error] [client 213.180.#.#] File does not exist:....
if you have mod php. don't use cgi. choose one of them.
I disabled the cgi mod using "a2dismod cgi" and nothing has changed.
I have reinstalled apache 2, bind and webmin and have gotten nowhere, any advice is gratefully appreciated.
Do the problem exists when access with other browser IE, chrome?
Yes, but they don't specify the file type like FF does.
please  see the config file of mod php
you should see something like :

        <FilesMatch "\.ph(p5?|tml)$">
                SetHandler application/x-httpd-php
        </FilesMatch>

In case, you cannot see it please turn on mod info and access to http://localhost/server-info it should show all of your config there post it here thanks.
ASKER CERTIFIED SOLUTION
Avatar of kiannack55
kiannack55

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial