Req #54859 [Opn->Csd]: GD: image* support for PHP streams

2012-02-25 Thread dziastinux at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=54859&edit=1

 ID: 54859
 User updated by:dziastinux at gmail dot com
 Reported by:dziastinux at gmail dot com
 Summary:GD: image* support for PHP streams
-Status: Open
+Status: Closed
 Type:   Feature/Change Request
 Package:GD related
 Operating System:   All
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

And this is the reason why it is feature request.
I found out it is impossible to implement memory stream support.
See: 
http://stackoverflow.com/questions/6917224/php-memory-php-temp-preserving-stream-data-on-subsequent-handle-creation


Previous Comments:

[2012-02-25 02:25:45] james dot cohen at gmail dot com

Using output buffering you can capture the output to variables.

It's described in some comments to the documentation: 
http://www.php.net/manual/en/function.imagepng.php#53021


[2011-05-19 11:22:47] dziastinux at gmail dot com

Description:

imagepng/imapgejpg/imagegd.. do not accept PHP streams as string parameter 
('php://memory').

Test script:
---
$fileName = 'php://memory';
imagepng($image, $fileName);
$imageData = file_get_contents( $fileName );

Actual result:
--
Warning: imagepng() [function.imagepng]: Unable to open 'php://memory' for 
writing: Invalid argument...






-- 
Edit this bug report at https://bugs.php.net/bug.php?id=54859&edit=1


[PHP-BUG] Bug #54859 [NEW]: GD: image* support for PHP streams

2011-05-19 Thread dziastinux at gmail dot com
From: 
Operating system: All
PHP version:  5.3.6
Package:  GD related
Bug Type: Bug
Bug description:GD: image* support for PHP streams

Description:

imagepng/imapgejpg/imagegd.. do not accept PHP streams as string parameter
('php://memory').

Test script:
---
$fileName = 'php://memory';

imagepng($image, $fileName);

$imageData = file_get_contents( $fileName );

Actual result:
--
Warning: imagepng() [function.imagepng]: Unable to open 'php://memory' for
writing: Invalid argument...

-- 
Edit bug report at http://bugs.php.net/bug.php?id=54859&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54859&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54859&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=54859&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54859&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54859&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54859&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=54859&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=54859&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=54859&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=54859&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=54859&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=54859&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=54859&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54859&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=54859&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=54859&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=54859&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=54859&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=54859&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=54859&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=54859&r=mysqlcfg



#51069 [NEW]: garbage collector crash

2010-02-17 Thread dziastinux at gmail dot com
From: dziastinux at gmail dot com
Operating system: Windows 7, CentOS 5.4
PHP version:  5.3.1
PHP Bug Type: Reproducible crash
Bug description:  garbage collector crash

Description:

PHP crashes in the middle of the script with no error in any logs (php,
apache(thread-safe), cherokee(fcgi)).

The sad thing is that I can't provide a sample code to reproduce the
problem. The crash occurs on script with huge arrays filled with objects. A
lot of references exists between objects and arrays. (Memory usage ~200mb).

Actual result:
--
php5ts!zval_mark_grey+4 0330d0f001af39f8035c9eb8
...
Several thousand sequential calls to php5ts!zval_mark_grey+ff
...
php5ts!zval_mark_grey+ff039a314801af39f801af39f8
 
php5ts!gc_mark_roots+95 01af39f801af39f801af39f8  
php5ts!gc_collect_cycles+64 01af39f801af39f804757b00
  
php5ts!gc_zobj_possible_root+a6 04757b0001af39f803223718
  
php5ts!gc_zval_possible_root+74 04757b0001af39f8
  
php5ts!ZEND_ASSIGN_SPEC_CV_VAR_HANDLER+69   0146fbc001af39f8
   
0146fe3c  
php5ts!execute+2fe  030f256801af3900  
php5ts!zend_execute_scripts+f6  000801af39f8
  
php5ts!php_execute_script+233   0146fe3c01af39f80005
  
php5apache2_2!php_handler+5d0   01a5bcc00092664801a5bcc0
  
libhttpd!ap_run_handler+21  01a5bcc001a5bcc001a5bcc0
  
libhttpd!ap_invoke_handler+ae   01b3f0980146ff00
  
libhttpd!ap_die+29e 01a5bcc001188f28  
libhttpd!ap_get_request_note+1c9c   01b3f09801b3f098
01b3f098 

libhttpd!ap_run_process_connection+21   01b3f09800874f58   
0146ff48  
libhttpd!ap_process_connection+33   01b3f09801a57cc0
 

libhttpd!ap_regkey_value_remove+c7c 01b3f0909bbc9b34   
  
msvcrt!_endthreadex+44  0146ff94776b1194012c2148  
msvcrt!_endthreadex+ce  012c21480146ffd477ceb3f5  
kernel32!BaseThreadInitThunk+e  012c2148761dac2c
  
ntdll!__RtlUserThreadStart+70   76ed12e5012c2148
  
ntdll!_RtlUserThreadStart+1b76ed12e5012c2148

PHP5TS!ZVAL_MARK_GREY+4In
httpd__PID__4532__Date__02_17_2010__Time_04_17_56PM__779__Second_Chance_Exception_C0FD.dmp
the assembly instruction at php5ts!zval_mark_grey+4 in
D:\wamp\bin\apache\apache2.2.11\bin\php5ts.dll from The PHP Group has
caused a stack overflow exception (0xC0FD) when trying to write to
memory location 0x01432ffc on thread 2

-- 
Edit bug report at http://bugs.php.net/?id=51069&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51069&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51069&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51069&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51069&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51069&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51069&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51069&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51069&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51069&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51069&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51069&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51069&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51069&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51069&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51069&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51069&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51069&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51069&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51069&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51069&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51069&r=mysqlcfg