Page 1 of 1
Error: Error locking file, please try again later.
Posted: Fri Jun 12, 2015 10:08 pm
by Pyrotactix
Script URL:
http://testacastaneda.ipage.com/count
Version of script: 2.0.3
Hosting company: ipage
URL of phpinfo.php:
http://testacastaneda.ipage.com/count/phpinfo.php
URL of session_test.php:
http://testacastaneda.ipage.com/count/session_test.php
What terms did you try when SEARCHING for a solution: Error locking file, please try again later.
Looked at this article but didn't work for me.
viewtopic.php?f=8&t=2234&hilit=flock#p9376
Write your message below: Script was working fine. Then started to intermittently show the Error locking file. Checked session.save path and permissions/owner on the account, changed the PHP versions from 5.2 to 5.3. It is now every time. Tried on FireFox chrome and even ie.
Even tried to reset all links, but get the error "Error: Error writing to database file, please try again later."
Thank you for looking into this.
Re: Error: Error locking file, please try again later.
Posted: Sat Jun 13, 2015 7:37 am
by Klemen
This could be a permissions issue where CCount doesn't have permission to write to the database file.
Are you able to modify links or add new ones from the admin interface?
Re: Error: Error locking file, please try again later.
Posted: Sat Jun 13, 2015 7:40 pm
by Pyrotactix
Yeah that's what I was thinking.
I set the database file from 644 to 777 and still not able to create a new link
-rwxrwxrwx 4.1K Jun 11 18:49 ccount_database.php
The Directory above is 755
I can supply you with ftp info if needed
Re: Error: Error locking file, please try again later.
Posted: Sun Jun 14, 2015 7:28 am
by Klemen
Does setting the database file to 666 work?
How about saving CCount settings page - does that work?
Do you have SSH access to you server so we can verify file owner?
Re: Error: Error locking file, please try again later.
Posted: Sun Jun 14, 2015 7:52 am
by Pyrotactix
Doesn't work with 666
Not able to save.
Yeah checked the owner group
Re: Error: Error locking file, please try again later.
Posted: Sun Jun 14, 2015 6:30 pm
by Pyrotactix
Did a brand new install to a new directory
http://testacastaneda.ipage.com/count2
and same issue. Its not letting me finish the install to write the new pw to the file
checked the owner/group from parent directories and looks good. I even reset them to be sure. reset the perms too.
Re: Error: Error locking file, please try again later.
Posted: Sun Jun 14, 2015 6:50 pm
by Klemen
The install script uses simply file_put_contents PHP function.
How about this:
1. create an empty file called "file.php"
2. make sure it's writable (666)
3. save this code as "test.php"
Code: Select all
<?php
file_put_contents("file.php", "<?php echo 'OK'; ?>");
echo 'Try <a href="file.php">Go to file.php</a>';
?>
4. put it in the same folder as "file.php" and run "test.php" in browser
5. does the file.php get written with the test echo "OK" code?
If that doesn't work you will need to talk to your host and check why you cannot write to files using PHP.
Re: Error: Error locking file, please try again later.
Posted: Sun Jun 14, 2015 9:05 pm
by Pyrotactix
Yeah I was looking at file_put_contents too and it works
http://testacastaneda.ipage.com/count/test.php
Re: Error: Error locking file, please try again later.
Posted: Mon Jun 15, 2015 7:53 am
by Klemen
Hmm, let me guess - it stops working if you change test.php to this?
Code: Select all
<?php
file_put_contents("file.php", "<?php echo 'TEST 2 WORKS'; ?>", LOCK_EX);
echo 'Try <a href="file.php">Go to file.php</a>';
?>
The file.php should now output "TEST 2 WORKS"
Re: Error: Error locking file, please try again later.
Posted: Mon Jun 15, 2015 7:30 pm
by Pyrotactix
Yeah that one created the file but didn't write anything to it.
Re: Error: Error locking file, please try again later.
Posted: Mon Jun 15, 2015 8:29 pm
by Klemen
This means PHP file locking doesn't work on your server.
The "
correct" way forward would be to contact your host and ask them to check why PHP fails every time a file locking function is used.
The "
hacker" way forward would be to:
1. open each CCount file and delete all instances of this exact code (including the comma):
2. Open "count.php" and change
to
and delete
Re: Error: Error locking file, please try again later.
Posted: Thu Jun 18, 2015 9:19 pm
by Pyrotactix
Got it resolved. It was something on this account that turned that function off.
Thank you