By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,781 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,781 IT Pros & Developers. It's quick & easy.

gzopen() and flock()

P: n/a

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
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.