Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Error in CGI::Session on Windows: flock() not implemented

by antirice (Priest)
on Dec 12, 2005 at 21:02 UTC ( #516148=note: print w/replies, xml ) Need Help??


in reply to Error in CGI::Session on Windows: flock() not implemented

Just curious but which version of windows are you running?

I just added an option to svn that allows you to disable file locking. It should be available in the next release of CGI::Session.

  • Comment on Re: Error in CGI::Session on Windows: flock() not implemented

Replies are listed 'Best First'.
Re^2: Error in CGI::Session on Windows: flock() not implemented
by sara2005 (Scribe) on Dec 13, 2005 at 00:01 UTC
    Windows 98SE.

    Do you think it could be the reason why it is not supported?

      According to perlport, seems to be. I don't think windows supports flock until you get into the NT's (2000, XP, etc).

      For the time being, you could add the following code to your script to override flock. (NOTE: Only do this for when you run on Windows 98 as the locks are very important with a filesystem that allows concurrent access to files).

      BEGIN { *CORE::GLOBAL::flock = sub { return 1; } }

      Note: Updated code.

        Thanks a lot for your help on this.

        By commenting the flock() function, I was able to get this working.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://516148]
help
Chatterbox?
[Discipulus]: the node i discovered yesterday nigth was also interesting

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2016-12-06 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.