rarebit Posted December 10, 2007 Share Posted December 10, 2007 I've had a section of my cms working for months, not having changed anything related recently, and now I track it down as being a current problem. Specifically when I install a module, at one point the main configuration file is rewritten, yet this file is no longer being written. The directory permissions haven't changed, files 646 and i've tried numerous permissions for the directories. Another file within the same directory i've set up is written to fine. I've created a new file and re-entered the info into it, still no joy... Any ideas? Here's the function used to write files (file existence is handled elsewhere): function file_write($fn, $s) { $fp = fopen($fn, "w"); $written = 0; while ($written == 0) { if (flock($fp, LOCK_EX)) { fwrite($fp, $s); flock($fp, LOCK_UN); $written = 1; } } fclose($fp); return 0; } I'm lost??? Quote Link to comment https://forums.phpfreaks.com/topic/81070-solved-dilema-in-spirit/ Share on other sites More sharing options...
rarebit Posted December 10, 2007 Author Share Posted December 10, 2007 HINT: Don't delete global variables which aren't part of the group that you should! Silly, silly, so silly! Quote Link to comment https://forums.phpfreaks.com/topic/81070-solved-dilema-in-spirit/#findComment-411455 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.