ID: 33327 User updated by: pillepop2003 at yahoo dot de Reported By: pillepop2003 at yahoo dot de -Status: Feedback +Status: Open Bug Type: GD related Operating System: Linux PHP Version: 4.3.10 New Comment:
I'm on a managed server, so I'm afraid I cannot install a snapshot. Did you solve the problem in the current cvs? btw: it perfectly works on my win32 / php 4.3.11 box. IMHO the problem is caused by imagecreatefromstring() not being able to deal with the file_get_contents() string. Previous Comments: ------------------------------------------------------------------------ [2005-06-13 22:44:00] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2005-06-13 22:19:13] pillepop2003 at yahoo dot de It also doesnt work if i leave out the decode/encode: $data = file_get_contents('test.jpg'); $im = imagecreatefromjpeg($data); ...terminates after imagecreatefromjpeg, silently. ------------------------------------------------------------------------ [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
