Jump to content

PHP File keeps trying to download


walleymo

Recommended Posts

Hi everyone. I'm new here. I've been programming for about 5 years, but I'm new to PHP.

I just got PHP, Apache, and MySQL installed and I'm reading a book learning these technologies. I'm loving it so far.

My problem is, whenever I have an HTML document calling a php file, the browser (Firefox 2) tries to open or download the file instead of executing it. The code executes fine if it's all in one file [i]and[/i] the file extension is .html. Is there a problem with my configuration or something?

Forgive me if this question has been asked a lot before.

Thanks,
Jon
Link to comment
Share on other sites

It sounds as though you've missed a step somewhere in the configuration.  :)  Have you checked the [url=http://www.php.net/manual/en/faq.installation.php]PHP installation FAQ[/url] and closely followed the manual's instructions for your OS, e.g. editing you apache config file and php.ini?
Link to comment
Share on other sites

Yes, it's the configuration.  Apache decides what type a file is (usually based on the extension, but can also be based on location and other factors).  So Apache needs to be told to execute .php files using php.

I can't give details because I don't know them, sorry :)
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.