Jump to content

php throws up error message when I access localhost with internet not connected


Recommended Posts

Hi there,

 

I can't always get my laptop connected to the internet and I installed LAMP on it (using Ubuntu Hardy) in order to work on a web site that I was previously working on using WAMP.

 

I got the whole thing working perfectly (so far) except for one thing (that was never a problem on Windows) - with the internet not connected, any attempt to access my web site on localhost shows this error:

 

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home/john/public_html/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line

 

When the laptop is connected to the internet, the web site is displayed correctly. I just want to be able to work on my web site offline.

 

public_html is my localhost folder.

 

Can anybody help me with this? Thanks a lot.

Hi there,

 

Cheers for the response.

 

I tried it out and now instead of getting the php error stated above, Firefox gives me the generic Offline Mode screen that I would get with any other web page. I seem to have gone back a step...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.