var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
php persistant flock()ing ?
Hello, is it possible to flock() a file, and keep the lock on the file even after the script terminates?
Unfortunatly, not in an easy mannor.
PHP automagicly releases the lock when the script ends so your only option would be to edit the PHP source code to stop it doing this and compile your own custom version of PHP.
Even that might not work though, I'm afraid I don't know enough about file locking to say for sure.
Why not do it server side using shell_exec() in PHP? Create a bash script to lock the file, and unlock the file.
Run the script via PHP
$exec = shell_exec("lock_file.sh");
After the script is executed, it will still be locked. then later, just unlock it with another bash script.
thats exactly what i will do. i was thinking in C, but now that u mention it. excellent!
btw, can i get php to wait for a lock with flock()? i havent used it before..