

In case it's helpful here's a copy of my /etc/httpd/conf.d/php.conf file from a server running CentOS 5.9: # Apparently there are cases where you might want to say that you are sending a PHP script (even though Apache is supposed to execute the script and emit text/html,) and there are also cases where the browser simply doesn't recognize that specific Mime Type.Ĭlearing your browser cache is always a good idea. I googled it and found that there is quite a bit of discussion about it on the web. Regarding the suggestion above that you should tell the browser that you are outputting a PHP script: It seemed like an unusual idea to me. In fact Apache is supposed to tell the browser that the script is outputting text/html. It looks to me like Apache is telling the browser that it's sending a document type of application/php for scripts with extensions like. Please take a look at your addtype directives. Now apache is showing the source code, but not all of it just part.

phtmlĪpache no longer downloads the file. LoadModule php5_module modules/libphp5-zts.soīy removing the AddType application/x-httpd-php. LoadModule php5_module modules/libphp5.so phtmlĪddType application/x-httpd-php-source. I have checked similar questions here in stackoverflow but none of them have helped me so far.įor the record I have the following lines in my nf and php.conf that should make php work but don't: AddHandler application/x-httpd-php.

I first uninstalled the php 5.3.x and then installed php 5.5.1 but after the installation completed apache did not parse the php files it just downloaded them. I previously had php 5.3.x installed but decided to upgrade.
