Error: Error locking file, please try again later.
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Error: Error locking file, please try again later.
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.
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.
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?
Are you able to modify links or add new ones from the admin interface?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
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
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.
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?
How about saving CCount settings page - does that work?
Do you have SSH access to you server so we can verify file owner?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
Doesn't work with 666
Not able to save.
Yeah checked the owner group
Not able to save.
Yeah checked the owner group
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
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.
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.
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"
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.
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>';
?>
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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
Yeah I was looking at file_put_contents too and it works
http://testacastaneda.ipage.com/count/test.php
http://testacastaneda.ipage.com/count/test.php
Re: Error: Error locking file, please try again later.
Hmm, let me guess - it stops working if you change test.php to this?
The file.php should now output "TEST 2 WORKS"
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>';
?>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
Yeah that one created the file but didn't write anything to it.
Re: Error: Error locking file, please try again later.
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
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):
Code: Select all
, LOCK_EX
Code: Select all
$locked = flock($fp, LOCK_EX);
Code: Select all
$locked = 1;
Code: Select all
flock($fp, LOCK_UN);
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
-
- Posts: 7
- Joined: Fri Jun 12, 2015 9:59 pm
Re: Error: Error locking file, please try again later.
Got it resolved. It was something on this account that turned that function off.
Thank you
Thank you