php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25546 Premature end of picture file
Submitted: 2003-09-15 13:04 UTC Modified: 2003-09-15 18:35 UTC
From: info at loyaa dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.2 OS: Win2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: info at loyaa dot com
New email:
PHP Version: OS:

 

 [2003-09-15 13:04 UTC] info at loyaa dot com
Description:
------------
I want through GD get picture file on internet,
But GD version bundled (2.0.12 compatible) of PHP 4.3.2 or higher can't work normally.
The phenomenon as follows:
1. Can't totally obtain the goal file.
2. Premature end of picture file.

PHP 4.2.2 (GD version 2.0 or higher) work normally.


Reproduce code:
---------------
$fileURL = 'http://bugs.php.net/gifs/logo-bug.gif';
$file_fp = @fopen(trim($fileURL),'r');
$file = @fread($file_fp,5000000);
Header("Content-type: image/gif");
echo $file;
@fclose($file_fp);


Expected result:
----------------
GD version bundled (2.0.12 compatible) or higher

Actual result:
--------------
PHP Version 4.2.2
GD Version 2.0 or higher work normally.
--------------------------------

$fileURL = 'http://bugs.php.net/gifs/logo-bug.gif';
$file_fp = @fopen(trim($fileURL),'r');
$file = @fread($file_fp,5000000);
Header("Content-type: image/gif");
echo $file;
@fclose($file_fp);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-15 18:35 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your code is wrong.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 19:01:34 2025 UTC