gzopen() and flock()

This is a discussion on gzopen() and flock() within the PHP Language forums, part of the PHP Programming Forums category; hi, i've a problem with file locking. seems that flock() and gzopen() do not work together. i get the ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-04-2003
Daniel Brunthaler
 
Posts: n/a
Default 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_filename,'r');
// read content of entry_file (with read lock)
flock($entry_file, 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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0