When the file or directory is not writable after a very long delay the errors below are generated. I think that the first thing that we attempt to do is check to see if the file and dir are writable and if not show an easy to read error message.
ERROR 2: fopen(languages/lang.en.php.tmp): failed to open stream: Permission denied
0 Error occurred on in function fopen
1 called from line 66 of file functions_editlang.php in function lockfile
2 called from line 85 of file functions_editlang.php in function read_complete_file_into_array
3 called from line 231 of file editlang.php
Warning: fopen(languages/lang.en.php.tmp): failed to open stream: Permission denied in /home/myserver/public_html/pgv/includes/functions_editlang.php on line 66
ERROR 2: fclose(): supplied argument is not a valid stream resource
0 Error occurred on in function fclose
1 called from line 67 of file functions_editlang.php in function lockfile
2 called from line 85 of file functions_editlang.php in function read_complete_file_into_array
3 called from line 231 of file editlang.php
Warning: fclose(): supplied argument is not a valid stream resource in /home/myserver/public_html/pgv/includes/functions_editlang.php on line 67