Today I installed Php 5.6.5
on my server running Debian 7 Wheezy and Apache2.
First, I added these repositories to my /etc/apt/sources.list file:
http://packages.dotdeb.org wheezy-php56
http://packages.dotdeb.org wheezy-php56 all
Second, I added a missing key with these commands:
apt-get install debian-keyring
gpg --keyserver pgp.mit.edu --recv-keys ***[the_key]***
gpg --armor --export ***[the_key]*** | apt-key add -
Finally, I installed Php 5.6.5 with this command:
apt-get install php5
Then I checked the Php's version with the command php -v, and the terminal returned the right version.
So I created an example php page to make a test.
Its directory is /var/www/index.php
and its code is it:
<?php phpinfo(); ?>
But it doesn't work, it shows a completely blank page.
I tried with other Php scripts, but it converts the php code to plain text.
Where's the problem?
What should I do to fix it?
Here's the solution
I enabled the apache module for Php with this command:
a2enmod php5
Then I restarted the apache service and now everything works fine.