php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21304 gzopen does not open the file
Submitted: 2002-12-31 01:40 UTC Modified: 2002-12-31 05:43 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: brianlmoon@php.net Assigned: wez (profile)
Status: Closed Package: Zlib related
PHP Version: 4.3.0 OS: Linux 2.4.18
Private report: No CVE-ID: None
 [2002-12-31 01:40 UTC] brianlmoon@php.net
This was working fine with 4.2.3.  Simple script, yes I should if $fp, but it is a test script.

<?php

    $fp=gzopen("/tmp/test.txt.gz", "a");

    gzwrite($fp, "this is a line\n");

    gzclose($fp);

?>

example: http://dev.phorum.org/gztest.php

$fp is empty but there is no error from gzopen at all.  I have all errors on.  In fact, you do get a warning from gzwrite and gzclose that $fp is not valid stream.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-31 01:43 UTC] brianlmoon@php.net
FWIW, I just checked and only append is affected.  If I open the file with "w", it works fine.  Obviously, I need "a", but that should help.
 [2002-12-31 05:31 UTC] wez@php.net
I can see 2 problems with the code; fixes going in shortly.
 [2002-12-31 05:43 UTC] wez@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC