#33327 [NEW]: imagecreatefromstring chokes on input when using Apache 1.3 module

From: Date: Mon, 13 Jun 2005 19:25:01 +0000
Subject: #33327 [NEW]: imagecreatefromstring chokes on input when using Apache 1.3 module
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80249@lists.php.net to get a copy of this message
From: pillepop2003 at yahoo dot de Operating system: Linux PHP version: 4.3.10 PHP Bug Type: GD related Bug description: imagecreatefromstring chokes on input when using Apache 1.3 module Description: ------------ I am using PHP on Apache/1.3.29 (Unix). The script behaves differently, depeding on PHP running as cgi or as apache-module, in the following way: - load jpeg into string - save base64_encode(string) with file_put_contents() as dummy.txt - load dummy.txt into string with file_get_contents() - decode string with base64_decode() - process loaded string with imagecreatefromstring() The Script behaves fine when using php as cgi. The script stops without any warning or response when using php as apache-module after imagecreatefromstring(). Everything works fine without base64-encoding/decoding. (I'm using file_put_contents from Pear::compat) GD Version: 2.0 or higher Reproduce code: --------------- $data = file_get_contents('test.jpg'); file_put_contents('dummy.txt', base64_encode($data)); $data = base64_decode(file_get_contents('dummy.txt')); $im = imagecreatefromstring($data); echo 'helloworld'; Expected result: ---------------- output of "helloworld" with either cgi or apache-module Actual result: -------------- cgi-version: output 'helloworld' apache-module: script terminates silenty after imagecreatefromstring() -- Edit bug report at http://bugs.php.net/?id=33327&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33327&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33327&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33327&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33327&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33327&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33327&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33327&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33327&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33327&r=support Expected behavior: http://bugs.php.net/fix.php?id=33327&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33327&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33327&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33327&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33327&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33327&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33327&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33327&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33327&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33327&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33327&r=mysqlcfg

« previous php.bugs (#80249) next »