apache server does not execute. php files

Asked

Viewed 3,262 times

3

I just installed Apache and PHP on my linux, and All my files . php are showing up this following log error:

[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 is just that:

<?php
   phpinfo();
?>

The distro 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

1 answer

1


These files probably don’t have the necessary permissions.

In the terminal type:

sudo chmod -R 755 ~/var/www/

This will allow you to read and run the files from the folder /var/www/.

  • In fact had only made the sudo chmod -R 777, with the 755 worked, our thanks even :3

  • @any_wolf Dispo. :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.