From:             [EMAIL PROTECTED]
Operating system: Windows NT 4.0 SP6a
PHP version:      4.2.3
PHP Bug Type:     Bzip2 Related
Bug description:  bzip2 doesn't create new files

I have tried to test the example 'Small bzip2 Example', but it doesn't
work, the function 'bzopen($filename, "w")' isn't creating a new file. I
get a error 'Warning: bzopen(): Unable to open file in
D:\Inetpub\wwwroot\php\smallbzip2.php on line 7'.
So I change the code from:
--------------------------------------------------
<?php
$filename = "D:/TEMP/testfile.bz2";
$str = "This is a test string.\n";

// open file for writing
$bz = bzopen($filename, "w");
 .
 .
 .
?>
--------------------------------------------------
to:
--------------------------------------------------
<?php
$filename = "D:/TEMP/testfile.bz2";
$str = "This is a test string.\n";

// open file for writing

$fp= fopen($filename,"w"); //<<------HERE
fclose($fp);               //<<----- HERE

$bz = bzopen($filename, "w");
 .
 .
 .
?>
----------------------------------------------------------------
My configuration is:

Windows NT 4.0 SP6a;
IIS 4.0;
PHP-4.2.3(binary);
The system has full control over D:\TEMP;
----------------------------------------------------------------

Leandro Campos 
Sao Vicente - Sao Paulo - Brazil.
-- 
Edit bug report at http://bugs.php.net/?id=20598&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20598&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20598&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20598&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20598&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20598&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20598&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20598&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20598&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20598&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20598&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20598&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20598&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20598&r=isapi

Reply via email to