PHP files being downloaded and not processed

Discuss server installationa nd configuration issues here

Moderators: egami, macek, gesf

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

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: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

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/

For PHP 5:
LoadModule php5_module modules/
Best Regards,
Alexej Kubarev
Zend Certified Engineer
Image Image

Post Reply