|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-06-13 21:25 UTC] 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()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 22:00:01 2025 UTC |
It also doesnt work if i leave out the decode/encode: $data = file_get_contents('test.jpg'); $im = imagecreatefromjpeg($data); ...terminates after imagecreatefromjpeg, silently.