Jump to content


Website Acting funny.


2 replies to this topic

#1 FK69

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Location:Melbourne, Australia

Posted 16 September 2007 - 10:48 PM

Hey there,
Wasnt sure where to put this but as it only affects my php files i'll try here.
My website is a gaming clan and it uses very little php at all, only a cpl of code to include forum stuff.

Now it has only been up a few days since friday i think and it worked fine until last night.
Now whenever i go to load my site is loads blank, thats when i type www.domain.com
if i type www.domain.com/index.php it doesnt show it but asks me to download the index.php

I've had this problem before a few months ago, back then they told me to clear my cache and flush my DNS
Both of which i did yesterday and it did not work, so i contacted them again. they told me to check the php file and the .htaccess file i dont see anything wrong with them.

Any ideas on whats going on with my php files? it doesnt ask me to download the index.php on my forums which r located in a sub-domain. Only my main site it asks me to download all my php files.


Thanks in advance.

#2 Demonslay

    P2L Jedi

  • Members
  • PipPipPip
  • 970 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 17 September 2007 - 04:35 PM

This is usually a problem with either incorrect headers being sent, or the page not being parsed as PHP by the server. You would most commonly run into this problem if you were dealing with images in PHP (believe me, lol).

As your host said, check your PHP files and .htaccess. Make sure you aren't conducting a rule that would prevent their server (Apache probably) from not parsing .php files as they should be. Examples would include using AddType and such.
The latter would be to check your PHP files, and check anything that uses the header() function. If it isn't sending the proper MIME type, the browser may get confused and try to prompt you to download the file instead.
Actually download the file. Half the time, there will be a useful error from PHP in it.

If nothing else works, use basic debugging. Find random parts of the script you'd like to test, and put:
die('Now exiting at line '.__LINE__.' in file '.__FILE__);
if it kills the script and shows that message, then take it out and put it on another line and so on, until it continues to try to download the file. When that happens, then you know somewhere just before that is the problem.

Edited by Demonslay, 17 September 2007 - 04:35 PM.


#3 FK69

    Young Padawan

  • Members
  • Pip
  • 57 posts
  • Location:Melbourne, Australia

Posted 19 September 2007 - 12:37 AM

Problem has been resolved it was a server configuration issue.

Edited by FK69, 21 September 2007 - 01:22 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users