Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
The stupid question is the question not asked
 
PerlMonks  

Re: FreeBSD reading/writing workaround?

by chipmunk (Parson)
on Apr 25, 2001 at 04:08 UTC ( [id://75372]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to FreeBSD reading/writing workaround?

I very much doubt that FreeBSD is unable to open a file in read/write mode. Unfortunately, you haven't provided enough information to diagnose the actual problem.

What do you mean when you say that it "doesn't seem to work"? Are you checking the return value from open? Have you tested the script from the command line? Are you sure the current working directory is what you think it is when the script is run from the web?

Anyway, it sounds like you need to use file locking. Opening for read/write won't prevent two instances of the script from doing conflicting writes. See flock and Fcntl.

  • Comment on Re: FreeBSD reading/writing workaround?

Replies are listed 'Best First'.
Re: Re: FreeBSD reading/writing workaround?
by Anonymous Monk on Apr 26, 2001 at 03:48 UTC
    I AM locking the files. But, when I open the file, it doesnt return an error value, but it doesnt open a file stream either. So I don't know what the heck is wrong...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://75372]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.