views:

50

answers:

4

Hi there,

I am working on a site and just published it to the client's domain, but when I try to access the root or subpages, they download to my computer rather than displaying as the pages. Could it be the fact php is not installed (the server is managed by my client so I don't know if PHP is installed)?

Thanks,

Elliott

+3  A: 

The PHP may be not installed, or incorrectly configured. Usually (if the client really installed PHP) it's caused by forgetting to set the file extension (.php / .phps / .php3 / .php4 ... ) to PHP handler.

Check if PHP is running and if your output content type is correct.

Francis
+1  A: 

Your webserver does not know that these files should be given to PHP for processing -- for whatever reason, of which there are many. More info on the config is necessary.

Don
That's what I was thinking, I'll look into it. Thanks!
Elliott Bowles
+2  A: 

yes, you should ask your client to make sure php is installed.

If it is installed and you are using apache.

make sure your httpd.conf has something like this.

AddModule mod_php5.c
<IfModule mod_php5.c>
    DirectoryIndex index.php index.html
</IfModule>
<IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
</IfModule>

you may ask your client to visit here for proper php configuration for different OS.

Tommy
+2  A: 

The server is not serving the php pages as a 'text/html' or 'text/xhtml' MIME type. Like what the rest said, PHP might not be installed or not configured properly.

A quick way (not 100% though) to check if PHP is installed is to check the HTTP response header. Using Firebug's NET Tab on Firefox, you can look out for any 'server' value in the response header. Typically PHP version (if installed) will be included together with the web server type/version.

E.g. Apache/2.2.13 (Unix) mod_ssl/2.2.13 PHP/5.2.9

o.k.w
Thanks so much for your help, I will def. check that out
Elliott Bowles