Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.