From: [EMAIL PROTECTED] Operating system: Windows XP Professional (SP1) PHP version: 4.3.0 PHP Bug Type: Apache2 related Bug description: fwrite writes corrupt pdf binary file
when using the fwrite with php4apache2.dll module enabled. It seems to write corrupt binary(PDF) files. I was using it with the ROS class http://www.ros.co.nz/pdf/ to write PDF files. When I changed the apache 2 server from using php4apache2.dll to just using the cgi php.exe it was able to write these files just fine with no corruption. I think something may not be working properly in the dll as it pertains to the fwrite function. I am pretty sure the error did not involve the ROS library as I was able to output to the screen with no problems with that library using the php4apache2.dll or php.exe. It was only when I tried to write it to a file with fwrite that the problem occured. This is the code I used for writing the document in case you need that. $fp = fopen($fdirandname,'w'); fwrite($fp,$pdfcode); fclose($fp); I was using Apache/2.0.43 Windows XP Professional with SP1 installed and PHP 4.3.0 (the binary install version from your website). I hope this helps. If you need any further info please email. -- Edit bug report at http://bugs.php.net/?id=21904&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21904&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21904&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21904&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21904&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21904&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21904&r=support Expected behavior: http://bugs.php.net/fix.php?id=21904&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21904&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21904&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21904&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21904&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21904&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21904&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21904&r=gnused