gzopen() and flock()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Brunthaler

    gzopen() and flock()

    hi,

    i've a problem with file locking.
    seems that flock() and gzopen() do not work together. i get the error (or
    warning) message ...

    Warning: flock(): cannot represent a stream of type ZLIB as a File
    Descriptor in ...

    when using flock() after gzopen().

    sourcecode looks like this ...

    ...
    $entry_file = gzopen($entry_f ilename,'r');
    // read content of entry_file (with read lock)
    flock($entry_fi le, LOCK_SH);
    ....

    i am using php 4.3.3 as apache modul on windows xp, on my webhosters
    webserver php 4.2.3 on linux (where i've not tested yet).

    does anyone has an idea what i am doing wrong or of an easy workaraound?

    thx in advance
    greetz
    daniel


Working...