: PHP not working : Ubuntu I have a problem my test server loads html files fine but when I try to open a file like index.php it says The website encountered an error while retrieving http://localhost/.
I have a problem my test server loads html files fine but when I try to open a file like index.php it says The website encountered an error while retrieving localhost/. It may be down for maintenance or configured incorrectly. I have PHP5 installed but I don't see why this isn't working, is it an outdated PHP problem?
[Wed Sep 25 16:53:10 2013] [error] [client 127.0.0.1] PHP Warning: require_once(/home/callum/public_html/Includes/Connection.php): failed to open stream: Permission denied in /home/callum/public_html/index.php on line 8
[Wed Sep 25 16:53:10 2013] [error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required '/home/callum/public_html/Includes/Connection.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/callum/public_html/index.php on line 8
[Wed Sep 25 16:54:51 2013] [error] [client 127.0.0.1] PHP Warning: require_once(/home/callum/public_html/Includes/Connection.php): failed to open stream: Permission denied in /home/callum/public_html/index.php on line 8
[Wed Sep 25 16:54:51 2013] [error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required '/home/callum/public_html/Includes/Connection.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/callum/public_html/index.php on line 8
site config
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/callum/public_html/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/callum/public_html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
More posts by @Goswami781
2 Comments
Sorted by latest first Latest Oldest Best
Instead of this:
require_once(DIR."/Includes/Connection.php");
Use this:
require_once("Includes/Connection.php");
It is a permissions issue. Just change the permissions:
sudo chmod 0644 /home/callum/public_html/Includes/Connection.php
and try again.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.