Jump to content

php files downloading instead of rendering in browser


chlew

Recommended Posts

We have just launched a revision of our college's website and are having some issues with some of the pages not rendering properly in Firefox (all files in this site are php).  Instead of displaying the web page, the file is downloaded to the client.  At other times, the page is displayed, but incorrectly (images missing, javascript menus opened, etc.) Our system is as follows:

System: Windows NT 5.2 build 3790

Apache: 2.0.44

PHP: 4.2.3

This issue has a very random component to it.  Some pages load fine, others choke.  Refreshing the "bad" pages will sometimes correct the problem, other times not.  Sometimes keying in the absolute URL of a page will allow it to display properly when clicking on a link to the same page results in the file being downloaded. 

I did not notice this until today when I was testing our site from home.  Accessing the site on the college's wireless network does not result in the same problem.  From what I have been able to find so far, this appears to be an Apache configuration issue.  In the config file, UseCanonicalName is set to Off, and ServerName is set to localhost:80.  I have also heard it suggested that this is a Firefox issue, though I have not found any widespread documentation on this.

I am looking for any suggestions as to how to proceed from here.  I am new to working with Apache and would appreciate any input from someone who has experienced this before. 

Thanks,

Chris

Link to comment
Share on other sites

I take it you installed Apache and PHP separately, rather than using a pre-configured 'WAMP' (stands for Windows, Apache, MySQL and PHP).

 

it might just be a dodgy file in the Apache set-up, or something along those lines.... I suggest using a WAMP server...

 

The best one out there for general usage would in my opinion be:Vertrigo WAMP Server

 

its free, open source and has a very good gui to handle all of the programs that it covers, it also come with a late model of phpmyadmin (in case your wanting to use the databases)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.