Although I have many years worth of coding experience, I'm a complete n00b at managing sites. So I need help.

Basically I have this new site on a shared hosting provider, and sometimes I get these errors:

Warning: fopen(/home/baysescp/public_html/system/logs/error.txt) [function.fopen]: failed to open stream: No such file or directory in /home5/baysescp/public_html/system/library/log.php on line 12

Warning: fwrite(): supplied argument is not a valid stream resource in /home5/baysescp/public_html/system/library/log.php on line 14

Warning: fclose(): supplied argument is not a valid stream resource in /home5/baysescp/public_html/system/library/log.php on line 16

Also this:

Warning: require_once(/home/baysescp/public_html/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /home5/baysescp/public_html/index.php on line 21

Fatal error: require_once() [function.require]: Failed opening required '/home/baysescp/public_html/system/startup.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home5/baysescp/public_html/index.php on line 21

These errors come completely randomly .. If I ever get such errors while I'm myself browsing the site, and I hit refresh, the site loads ..

I am also monitoring my site through uptimerobot.com through a keyword search. Its loads my site every 5 minutes and searches for a specific keyword, to make sure that the site loaded. On most days it only registers a break in service like 1-2 times, each lasting not more than 5 minutes (interval). But a few days ago, for some reason it registered like 50 such disrupts ! And I was working on the site that day (developing behind the scenes), and I too faced a lot of slowness, non-responsiveness, and such errors. FTP was slow and non-responsive at times too that day.

So what's the culprit here ? Is it something I need to configure ?

  • 4
    It doesn't' t look like you're the admin of this box. There is . Nothing we can do to help you. Contact your hosting provider.
    – user2483
    Sep 23 '13 at 20:09

It will be difficult to debug the slowness. Shared hosting environments are awful. They are over sold servers with a bunch of hobbyists looking to run inefficient or even malicious code for dirt cheap. Your slowness is likely due to extreme load on the server caused by yourself or others.

It looks like your files are currently located in /home5/baysescp/ and you php scripts are searching /home/baysescp/ . I suspect that, that is not the expected behavior and i would begin looking there for the cause of the php errors.


If you know the path to your log file and the path to the file in which the function calling fopen, then u can use

$filename = __DIR__ . "relative file path to your log file from called file"

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy