PHP files being downloaded and not processed

Discuss server installationa nd configuration issues here

Moderators: macek, egami, gesf

spartan7
New php-forum User
New php-forum User
Posts: 17
Joined: Sat Jun 18, 2005 9:08 pm

PHP files being downloaded and not processed

Postby spartan7 » Tue Apr 24, 2007 2:02 am

I have a major problem. I just had a server installed (CentOS, latest stable versions of php,mysql, gd, apache ect) for me and everything works great EXCEPT when I try to access a PHP page the browser tries to download the file instead of process it.

The server cpanels and whm and that work FINE so obviously PHP is being processed under those conditions...But when I add an ordinary hosting account then PHP files don't get processed, the browser wants to download them.

Please assist...Thanks

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Wed May 23, 2007 11:53 pm

Ok its pretty easy, make sure your apache is configured to load php module as well as you have configured a correct type for prossessing it.


AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

For PHP 4:
LoadModule php4_module modules/libphp4.so

For PHP 5:
LoadModule php5_module modules/libphp5.so


Return to “Server installation and configuration”

Who is online

Users browsing this forum: No registered users and 0 guests