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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 13:01:28 2025 UTC