Bbclone counter stopped working


#1

BBclone no longer works in Dreamhost. It says it cannot lock files. Any ideas or suggestions for a similar counter?


#2

I am not at all familiar with BBclone, so I have no idea what is “similar”, but Dreamhost offers its own counter at http://counter.dreamhost.com.

You might see if that will meet your needs. :wink:

Just curious … did BBclone work on Dreamhost in the past, and if so, what error messages are you getting or how is it "no longer’ working?

–rlparker


#3

Yes Bbclone was working ok until today. It now says:

BBClone isn’t able to lock files for writing with its current setting. You may use $BBC_USE_LOCK = “flk”; however. If that’s your very setting already, it means that you cannot use BBClone with your current server settings

It uses a flock() function in PHP and it seems like Dreamhost is having problems supporting that very basic function. I hope it’s a temporary problem because it’s usually those free hosting accounts that disable these things in PHP.


#4

If it worked before, and suddenly stopped working, I suggest generating a support ticket with the information you just provided here.

While DH support does not provide support for 3rd-party scripts, they may be able to tell you what might have changed to cause a previously working program to stop working.

–rlparker


#5

I tested it with a simple script and locking files in PHP no longer works.

$fp = fopen("/path/lock.txt", “w+”);

if (flock($fp, LOCK_EX)) { // do an exclusive lock
fwrite($fp, “Write something here\n”);
flock($fp, LOCK_UN); // release the lock
} else {
echo “Couldn’t lock the file !”;
}

fclose($fp);


#6

olli,

Actually, with only your first line modified for an accurate “path” to the file, you code works fine for me.

You can see it working in two versions:

http://maddogz.com/dev/lock.php shows your test code working with line 2 as:

$fp = fopen(“lock.txt”, “w+”);

http://maddogz.com/dev/lock2.php shows your test code working with line 2 as:

$fp = fopen(“path/lock.txt”, “w+”);

This makes me think that the problem is not with PHP, or probably even with the code, but likely a permissions, or an .htaccess issue.

Have you checked to make sure there have been no changes in your system in those areas. (like an .htaccess file added/modified, or permission reset/changed on any of the involved files/directories)?

–rlparker


#7

Maybe it’s a server issue, my sites are located on another server (brisk?). When I run the script it’s very slow and then ends up failing.

http://soittarit.dreamhosters.com/flock.php


#8

That is always possible. Did you ever submit a support ticket?

If you are sure your script is correct, and it worked before, and you can’t even run that test script successfully, you should probably submit a support request so that DreamHost can look into what might be going on with your server.

–rlparker