PDA

View Full Version : New Server, Restored Backup, Sites now open download box


Mythotical
01-14-2008, 01:31 PM
I just moved to a new server, finally got my backup restored for my other sites, now when I try to access them, it shows me a download box for downloading the index.php file instead of loading the site.

Anyone know what I can do to fix this or what to check on?

Thanks
Steve

Andrew Green
01-14-2008, 01:40 PM
Most likely php is not installed properly, contact your host.

Mythotical
01-14-2008, 01:48 PM
EDIT: The server hosts other sites that use vBulletin and other PHP applications, they are running just fine.

Lynne
01-14-2008, 01:57 PM
Is this on all your php pages or just index.php? I seem to recall this happening with me once and so I opened the script and replaced the first couple of lines and the last couple of lines from another working page (we are talking about replacing the php start and end lines) and it then worked. It's like somehow some extra characters that I couldn't see got in there.

Andrew Green
01-14-2008, 01:59 PM
Well, there is a simple way to find out:

Save this as a .php file and upload it, if it doesn't work then it's definately a server issue:


<?php

phpinfo();

?>

Mythotical
01-14-2008, 02:04 PM
Oh this is great.

Here is the message I get when I try to access info.php:
Not Found

The requested URL /info.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.5 Server at www.thevbcoders.com Port 80

Lynne: Yes this is on all my pages. Really sucks, I can't access my test site with this problem happening.

Marco van Herwaarden
01-14-2008, 05:26 PM
Are you sure the domain is already propagated to the new servers IP?

Mythotical
01-14-2008, 06:10 PM
Just checked it, yes it has propagated to the new servers IP

Lynne
01-14-2008, 06:38 PM
It's almost like there is some sort of handler issue that is wrong. I'm not a server expert, but have you looked at your mime types?

Mythotical
01-14-2008, 06:49 PM
No, not yet. I will check mime types.

--------------- Added 1200344576 at 1200344576 ---------------

Problem fixed, seems there was a line in my .htaccess file that was telling it to load php5 when my server's default was php5.

--------------- Added 1200344861 at 1200344861 ---------------

For those who encounter the same problem, here is something to check.

In your root directory, open your .htaccess file and look for:
AddHandler application-x-httpd-php5 .php

OR

AddHandler application-x-httpd-php4 .php

If either of those exist, remove them, save, upload, close your browser and it should be back to normal.

If you still have the problem after opening your browser, then clear all private data, cache, browsing history, etc. You can leave your saved passwords and cookies, then close browser and open again, then it definately will be fixed.

NOTE: Only do this if you are getting a download box like I was, if things load, do not edit anything your .htaccess file unless you know what your doing.