Configure PHP 5.6 with Apache2 on Debian GNU/Linux 10 (buster)

0

I'm trying to install PHP 5.6 on Debian 8.

:~# php -v
PHP 5.6.40-10+0~20190807.18+debian8~1.gbp5642bf (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

Unfortunetly, the web server show the contents of the PHP file ( in the web browser):

<?php
echo phpinfo();
?>

restart apache2 didn't fix it.

Any idea what I'm missing?

TheUnreal

Posted 2019-08-20T07:38:58.880

Reputation: 137

Answers

1

Have you installed the libapache2-mod-php package?

Do you have under the directory /etc/apache2/mods-available two files like this ones:

  • php5.6.conf
  • php5.6.load

I have just installed PHP 5.6 on a Debian 10 (following this guide as it is an old version) with no problems, it just worked

Ciges

Posted 2019-08-20T07:38:58.880

Reputation: 111