Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
hanscom
Hangin' Around



Joined: Oct 16, 2003
Posts: 36

PostPosted: Tue May 13, 2008 6:21 am Reply with quote

Hi,
I have a log file on my site which has to be updated by the script:
<?php
$fp = fopen($logfile, "ab");
if(flock($fp, LOCK_EX)){
fwrite($fp, $s);
flock($fp, LOCK_UN);
}
fclose($fp);
?>
It worked for 1.5 years without problems, but a few weeks ago only
incidentally a record is added. Most of the time the file cannot be locked.
My webhost provider uses php 4.4.7
However, my KISGB works great. And I saw that KISGB has a file addtogb.php
where flock() is also used and without problems to update $path_to_gb.
I would like to know the trick and how I can modify my script.
Thanks in advance and regards.
Hans
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed May 14, 2008 2:50 pm Reply with quote

If the code "suddenly" stopped working and you have made no changes, then check what changes your host may have made. Also verify that the file permissions/ownership are the same as the KISGB file. That may answer your question right off Smile
 
View user's profile Send private message
hanscom







PostPosted: Thu May 15, 2008 1:45 am Reply with quote

Last week I informed my host about the problems. I only got a standard message from them that they received my complaint.
Permissions of dirs and files are the same as in KISGB. Also tryed 777 and 666.
I checked with phpinfo.php . It is a Linux syatem build jan 2008
 
Raven







PostPosted: Thu May 15, 2008 9:11 am Reply with quote

Check the ownership of the 2 files to be sure they are the same, not only the permissions. If your host has taken a week and not gotten back with you then I'd be looking for a new host.
 
hanscom







PostPosted: Thu May 15, 2008 10:14 am Reply with quote

How to check ownership of a file?
Do you refer to files on my website?
I will consider the 2-nd tip.
 
Raven







PostPosted: Thu May 15, 2008 10:22 am Reply with quote

How to check ownership of a file?
Use ftp client usually or have host verify.

Do you refer to files on my website?
Yes. The logfile you can't lock and the KISGB file you can lock.

I will consider the 2-nd tip. [ Only registered users can see links on this board! Get registered or login! ] Wink
 
hanscom







PostPosted: Fri May 16, 2008 6:02 am Reply with quote

It is not yet clear to me how to check ownership.
I use WS_FTP
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Fri May 16, 2008 6:10 am Reply with quote

Most good quality FTP clients (which I believe WS_FTP is one of them) have a way for you to change your remote view panel to show the "Owner/Group". If you cannot find this within WS_FTP, you can definitely do this using FileZilla (free from [ Only registered users can see links on this board! Get registered or login! ]

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©