PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
hanscom
Hangin' Around


Joined: Oct 16, 2003
Posts: 31

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

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: 15221
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
hanscom
Hangin' Around


Joined: Oct 16, 2003
Posts: 31

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

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15221
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hanscom
Hangin' Around


Joined: Oct 16, 2003
Posts: 31

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

How to check ownership of a file?
Do you refer to files on my website?
I will consider the 2-nd tip.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15221
Location: Kansas

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

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 to the forums!
Wink
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
hanscom
Hangin' Around


Joined: Oct 16, 2003
Posts: 31

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

It is not yet clear to me how to check ownership.
I use WS_FTP
View user's profile Send private message
montego
Site Admin


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

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

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 to the forums!
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum