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

From: Date: Mon, 13 Jun 2005 20:19:15 +0000
Subject: #33327 [Opn]: imagecreatefromstring chokes on input when using Apache 1.3 module
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-80252@lists.php.net to get a copy of this message
ID: 33327 User updated by: pillepop2003 at yahoo dot de Reported By: pillepop2003 at yahoo dot de Status: Open Bug Type: GD related Operating System: Linux PHP Version: 4.3.10 New Comment: It also doesnt work if i leave out the decode/encode: $data = file_get_contents('test.jpg'); $im = imagecreatefromjpeg($data); ...terminates after imagecreatefromjpeg, silently. Previous Comments: ------------------------------------------------------------------------ [2005-06-13 21:25:00] pillepop2003 at yahoo dot de 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 this bug report at http://bugs.php.net/?id=33327&edit=1

« previous php.bugs (#80252) next »