Jump to content

Clicking link downloads source


thatguy

Recommended Posts

I just installed PHP on my Debian system, but for some strange reason when I open a .php file in Firefox it downloads the source instead of running the php script. The crazy thing is that when I open the same page in Internet Explorer it runs it the way it should! I have an indentical installation on another system and it works properly. Any idea what could be causing it?
Link to comment
Share on other sites

Have you restarted the webserver since you made the changes (to enable php)?

Are you on unix or windows? if unix 'grep -i php httpd.conf' and what's the output?

should be something like:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
LoadModule php4_module libexec/httpd/libphp4.so
AddModule mod_php4.c

also worth running through: [a href=\"http://www.php.net/manual/en/install.php\" target=\"_blank\"]http://www.php.net/manual/en/install.php[/a]
Link to comment
Share on other sites

I have restarted the web server. This is what the grep command gave me

DirectoryIndex index.html index.htm index.shtml index.cgi index.php
# For example, the PHP 3.x module (not part of the Apache
# distribution - see [a href=\"http://www.php.net)\" target=\"_blank\"]http://www.php.net)[/a] will typically use:
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps
# And for PHP 4.x, use:
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
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.