Page 1 of 1

failed to open stream

Posted: Fri Aug 19, 2005 3:23 am
by hame22
Hi

everynow and again my site experiences the following error:

Warning: main(db_functions.php): failed to open stream: No such file or directory

before you say it the file is in the right directory and 99% of the time the all pages of the site work perfectly.

However what I want to no is the reason behind this 1% error message

any ideas?

alex

Posted: Fri Aug 19, 2005 3:51 am
by sticksys
some include or require have wrong url....

Posted: Fri Aug 19, 2005 3:55 am
by hame22
this is not the problem, all url's are correct, if you read the web pages work 99% of the time

I can use all the web pages features for a week with no problem and then out of the blue I am displayed this error which can be cleared by refreashing the page again

any ideas how to fix the problem

Posted: Fri Aug 19, 2005 3:56 am
by Sander
Maybe someone else is uploading an update of that file exactly at the time you visit (Yeah... rather unlikely).

Posted: Fri Aug 19, 2005 4:43 am
by hame22
nope as I am the web developer!!

:wink:

Posted: Fri Aug 19, 2005 6:01 am
by raghavan20
can you give the code of your include or require statement.
i think u use a include, thats why there is a warning.
may be you can show snippets of code for the two files. :roll:

Posted: Fri Aug 19, 2005 6:10 am
by hame22

Code: Select all

include_once('../includes/db_functions.php');
include_once('../includes/search_functions.php');
include_once('../includes/cat_functions.php');
include_once('../includes/user_auth_functions.php');

Posted: Fri Aug 19, 2005 6:17 am
by raghavan20
i think before the include statements you can try
file_exists($filename) and is_readable($filename)

Posted: Fri Aug 19, 2005 6:20 am
by hame22
yeah bt that will only mask the error not fix it