Jump to content

Apache downloading PHP files instead of rendering them after update from php 5.3.3 to 5.4

Recommended Posts

I have some scripts that need to use a newer version of PHP, Im running Debian 6 which has PHP 5.3.3 support, I found I could install php 5.4 using https://www.dotdeb.org/instructions/ packages. This worked, it updated my PHP to a newer version, the only issue is that when the install completed apache now downloads the PHP file instead of rendering it, Ive been troweling google and stackoverflow and servefault for hours now and I cant find a solution.

Im guessing this has something to do with the Apache configs, but I don't know what to do.

tom@vps:~$ dpkg --list |grep -E '(apache)|(php5-)'
ii  apache2                                  2.2.16-6+squeeze12           Apache                                                                                                                     HTTP Server metapackage
ii  apache2-doc                              2.2.16-6+squeeze12           Apache                                                                                                                     HTTP Server documentation
ii  apache2-mpm-prefork                      2.2.16-6+squeeze12           Apache                                                                                                                     HTTP Server - traditional non-threaded model
ii  apache2-utils                            2.2.16-6+squeeze12           utilit                                                                                                                    y programs for webservers
ii  apache2.2-bin                            2.2.16-6+squeeze12           Apache                                                                                                                     HTTP Server common binary files
ii  apache2.2-common                         2.2.16-6+squeeze12           Apache                                                                                                                     HTTP Server common files
ii  libapache2-mod-php5                      5.4.43-1~dotdeb+6.1          server                                                                                                                    -side, HTML-embedded scripting language (Apache 2 module)
ii  php5-apc                                 5.4.43-1~dotdeb+6.1          apc mo                                                                                                                    dule for php5
ii  php5-cli                                 5.4.43-1~dotdeb+6.1          comman                                                                                                                    d-line interpreter for the php5 scripting language
ii  php5-common                              5.4.43-1~dotdeb+6.1          Common                                                                                                                     files for packages built from the php5 source
ii  php5-gd                                  5.4.43-1~dotdeb+6.1          GD mod                                                                                                                    ule for php5
ii  php5-mcrypt                              5.4.43-1~dotdeb+6.1          MCrypt                                                                                                                     module for php5
ii  php5-mysql                               5.4.43-1~dotdeb+6.1          MySQL                                                                                                                     module for php5
rc  php5-suhosin                                      advanc                                                                                                                    ed protection module for php5
Edited by TomLewis
Link to comment
Share on other sites

Probably there is a problem in the loading of included .conf files for php, so that there is no longer a correct addhandler statement tying .php extension files to the php module. Check through the apache .conf files and include directories.

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.

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.