Jump to content

[SOLVED] Dilema: In Spirit


rarebit

Recommended Posts

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???

Link to comment
https://forums.phpfreaks.com/topic/81070-solved-dilema-in-spirit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.