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
  • What PHP SAPI are you using? Apache module, (Fast)CGI, FPM? Aug 2, 2015 at 20:42
  • I have no idea, how can I find these things out? Im sure im running a common Debian LAMP setup, I would have followed a tutorial for a normal LAMP.
    – GodsDead
    Aug 3, 2015 at 19:50
  • Please edit your question to include the result of dpkg --list |grep -E '(apache)|(php5-)'. Aug 3, 2015 at 20:01
  • I have updated the question.
    – GodsDead
    Aug 3, 2015 at 20:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.