Apache server does not execute .php files [closed]

3

I just installed Apache and PHP in my linux, and all my .php files are showing this following error log:

  

[Sat Mar 07 12:10:48 2015] [error] [client :: 1] PHP Warning: Unknown:   failed to open stream: Permission denied in Unknown on line 0 [Sat Mar   07 12:10:48 2015] [error] [client :: 1] PHP Fatal error: Unknown:   Failed opening required '/var/www/index.php'   (include_path = '.: / usr / share / php: / usr / share / pear') in Unknown on line 0

Inside this file has only this:

<?php
   phpinfo();
?>

The distro that I use is debian, I installed apache, php and mysql with the following command:

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server
    
asked by anonymous 07.03.2015 / 16:35

1 answer

1

These files probably do not have the necessary permissions.

At the terminal type:

sudo chmod -R 755 ~/var/www/

This will allow you to read and execute the files in the /var/www/ folder.

    
07.03.2015 / 17:03