php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50750 stream_register_wrapper and imagejpeg
Submitted: 2010-01-14 14:23 UTC Modified: 2010-05-19 14:53 UTC
From: lgynove at 163 dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.2.12 OS: windows xp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lgynove at 163 dot com
New email:
PHP Version: OS:

 

 [2010-01-14 14:23 UTC] lgynove at 163 dot com
Description:
------------
imagejpeg function not work in stream_register_wrapper.

Reproduce code:
---------------
class dbStream{...}
stream_register_wrapper("mysql123", "dbStream") or die("Failed to register protocol");

$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5,  'A Simple Text String', $text_color);
imagejpeg($im, 'mysql123://simpletext.jpg');
imagedestroy($im);

Expected result:
----------------
no error.

Actual result:
--------------
Warning: imagejpeg(): Unable to open 'mysql123://simpletext.jpg' for writing: Invalid argument.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-19 14:50 UTC] mike@php.net
-Package: Systems problem +Package: GD related
 [2010-05-19 14:50 UTC] mike@php.net
Reclassified.
 [2010-05-19 14:53 UTC] mike@php.net
-Status: Open +Status: Bogus
 [2010-05-19 14:53 UTC] mike@php.net
Image functions (GD) do not use php streams.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC