Page 1 of 1

failed to open stream

Posted: Mon Oct 17, 2005 4:10 am
by hame22
I have a problem with some of my include files. Before you start saying that is because I have not set the right path to my files, this is not the problem. 90% of the time my pages load corrctly. However 10% of the time I get the following error

failed to open stream: No such file or directory

when this happens all I have to do is refreash tha page and the file loads correctly.

I was wondering if anyone had ever experienced a similar problem and what they did to solve it, I have quite a number of files included throughoutb my pages and wiondered if this could affect the performance.

I would be most thankful if anyone could help me.

Posted: Mon Oct 17, 2005 4:17 am
by shiznatix
i had a similar problem with a class. i would call to the class and it would always be included and then 10% of the time it would say that the class function did not exist, and a refresh would always fix the problem. what i did was declare it global,

$lang = new Lang;
global $lang;

now i have no idea why this worked but maybe it might give you a kick in the right direction on your problem.