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 07: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...