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
https://forums.phpfreaks.com/topic/7592-clicking-link-downloads-source/
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]
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.