I'm kinda novice on setting up a PHP environment (Apache), but nothing to do about it. I have a VPS, which has Ubuntu 12.04 LTS.
My issue is that I receive following error:
[Wed Nov 13 16:43:31 2013] [error] [client 127.0.0.1] PHP Fatal error: Unknown: Failed opening required '/root/blog/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
index.php contains following code:
<?php
print phpinfo();
?>
It is WORKING IF it is located under "/var/www/" directory. But I wanted to change the location of the script to "/root/blog".
I have re-configured the "000-default" configuration file under "sites-enabled" folder in apache2 folder. So it shouldn't be a problem.
I've tried assigning different permissions (chmod 777) to "/root/blog" folder (both: recursively and traditionally), but no avail.
I've checked the user and user group for the "/var/www" folder and files, and they are: root/root - root user and root group. So, that should not be an issue.
What should I do about it ? Can someone help me ?
P.S AFAIK, apache version: 2.2, PHP: 5.3.10 (installed today, using apt-get install php5 apache2)
/root
? If that's an absolute path, then PHP is HIGHLY unlikely to be loading things from the root account's home folder. – Marc B