php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54428 [function.imagecreatefromjpeg]: failed to open stream: HTTP request failed!
Submitted: 2011-03-31 04:29 UTC Modified: 2013-10-15 11:54 UTC
Votes:8
Avg. Score:3.8 ± 1.4
Reproduced:4 of 5 (80.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: hoangvu4000 at gmail dot com Assigned:
Status: No Feedback Package: GD related
PHP Version: 5.2.17 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
6 + 29 = ?
Subscribe to this entry?

 
 [2011-03-31 04:29 UTC] hoangvu4000 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.imagecreatefromjpeg#Description
---


Warning: imagecreatefromjpeg(http://truyentranhtuan.com/IMAGES/SITE IMAGES/Kimi_ni_Todoke.jpg) [function.imagecreatefromjpeg]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/thegioitru/domains/thegioitruyentranh.vn/public_html/z/facebook.php on line 39

Every things are OK if the URL don't have any space,
Ext: imagecreatefromjpeg(http://acb.com/PhotoImages.jpg) ==> OK
But: imagecreatefromjpeg(http://acb.com/Photo Images.jpg) ==> "failed to open stream: HTTP request failed!" (have one space in "Photo" & "Images")

we get images form orther host, so we can rename the suorce images, How we can get it with imagecreatefromjpeg. if this is Bug, please fix it. Thank!

Test script:
---------------
//return: OK
//$up_file = "http://truyentranhtuan.com/IMAGES/MANGA/Kimi_ni_Todoke/034/01.JPG";

// return: "failed to open stream: HTTP request failed!" 
$up_file = "http://truyentranhtuan.com/IMAGES/SITE IMAGES/Kimi_ni_Todoke.jpg";

$new_image=imagecreatefromjpeg($up_file);

Expected result:
----------------
Warning: imagecreatefromjpeg(http://truyentranhtuan.com/IMAGES/SITE IMAGES/Kimi_ni_Todoke.jpg) [function.imagecreatefromjpeg]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/thegioitru/domains/thegioitruyentranh.vn/public_html/z/facebook.php on line 39


Patches

imagecreatefromjpeg (last revision 2011-03-31 02:37 UTC by hoangvu4000 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-25 16:41 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2013-06-25 16:41 UTC] felipe@php.net
What if you supply an url encoded one?
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 14:01:32 2024 UTC