View Full Version : fopen error: failed to open stream: no such file...

12-03-2006, 09:16 AM
I am installing Dolphin Community Builder on a Windows server and am getting this error:

Warning: fopen(/langs/lang-English.php): failed to open stream: No such file or directory in C:\Inetpub\vhosts\doucettefamilytree.com\httpdocs\inc\languages.inc.php on line 312
Error: Could not compile the default language. The script cannot execute any further.

Here is the code that it is choking on:
$handle = fopen("{$dir['root']}langs/lang-{$arrLanguage['Name']}.php", 'w');

Which with the variables filled in reads:
$handle = fopen("/langs/lang-English.php", 'w');


12-03-2006, 09:25 AM
Are the permissions on the langs folder set to 777?

12-03-2006, 09:40 AM
Yes - full control permissions

12-04-2006, 01:00 PM
I assume you've checked to be sure that these folders and files actually exist in that location? I.e. the "langs" folder and "lang-English.php" file

Also, I'm not sure about this. But, it COULD be that php is looking in the root of your C drive for the langs folder instead of in the root of your site. Sometimes php wants the full path from your drive root. Someone with more knowledge will have to confirm or deny that though.

12-04-2006, 07:32 PM
Yes - it was looking for the absolute root path (C:/...) instead of site location.

Which was difficult to come by since the path it expressed in the error was correct as far as the site is concerned.

Lesson learned.

12-04-2006, 07:50 PM
So, all fixed then? Cool!