Req #39263 [Asn->Csd]: Enable image(gif|jpg|png) functions to save to a php stream

2011-01-03 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=39263&edit=1

 ID: 39263
 Updated by: paj...@php.net
 Reported by:wb at pro-net dot co dot uk
 Summary:Enable image(gif|jpg|png) functions to save to a php
 stream
-Status: Assigned
+Status: Closed
 Type:   Feature/Change Request
 Package:GD related
 Operating System:   *
 PHP Version:*
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Feature implemented in trunk. You can get it using http://snaps.php.net
or windows binaries from http://rmtools.php.net/snaps/ (revision >
30719).


Previous Comments:

[2010-01-14 12:19:30] lgynove at 163 dot com

still not fix... three year


[2008-08-17 11:32:31] ni...@php.net

Pierre, are you still working on that bug or maybe you need some help?


[2006-10-26 12:43:02] paj...@php.net

I cannot agree more. I have a patch for a general imageto function, it
needs clean up and to be updated for the current head. I'm not sure when
I will do it but this feature will be in php, and the sooner the better.


[2006-10-26 08:54:20] wb at pro-net dot co dot uk

Description:

It would be nice to be able to save a GD image directly to an already
open php stream.

Reproduce code:
---


Expected result:

Image saved using the stream $fp.

Actual result:
--
Nothing :)






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


Bug #51184 [Com]: DateInterval has incorrect days property on windows

2011-01-03 Thread toto at hotmail dot com
Edit report at http://bugs.php.net/bug.php?id=51184&edit=1

 ID: 51184
 Comment by: toto at hotmail dot com
 Reported by:s...@php.net
 Summary:DateInterval has incorrect days property on windows
 Status: Wont fix
 Type:   Bug
 Package:Date/time related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

Not solved with PHP 5.3.4 (Windows / Apache 2)


Previous Comments:

[2010-10-31 03:32:12] paj...@php.net

@php at twinmail dot de



Use VC9 builds instead, from http://windows.php.net


[2010-10-31 02:13:50] php at twinmail dot de

5.3.3 on WINNT is also affected.


[2010-06-14 12:50:44] paj...@php.net

Sorry, I meant won't fix. It is not something we can easily fix, use the
VC9 versions instead (apachelounge.com for the VC9 versions of apache).


[2010-06-14 12:43:28] pluk77 at gmail dot com

Is this bug closed because it is now fixed in VC6 as well, or because it
is seen as not a bug?


[2010-06-05 04:14:23] ric dot lombardi at gmail dot com

randy, this is not a bug. the format %d just shows the difference
between the two 

day numbers.

If you want the absolute days difference between the dates, you have to
use "%a" 

as format.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=51184


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


Bug #51184 [Wfx]: DateInterval has incorrect days property on windows

2011-01-03 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51184&edit=1

 ID: 51184
 Updated by: paj...@php.net
 Reported by:s...@php.net
 Summary:DateInterval has incorrect days property on windows
 Status: Wont fix
 Type:   Bug
 Package:Date/time related
 Operating System:   Windows
 PHP Version:5.3.2
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

@toto at hotmail dot com



Nothing changed so yes, use VC9 builds instead for now.


Previous Comments:

[2011-01-03 10:42:41] toto at hotmail dot com

Not solved with PHP 5.3.4 (Windows / Apache 2)


[2010-10-31 03:32:12] paj...@php.net

@php at twinmail dot de



Use VC9 builds instead, from http://windows.php.net


[2010-10-31 02:13:50] php at twinmail dot de

5.3.3 on WINNT is also affected.


[2010-06-14 12:50:44] paj...@php.net

Sorry, I meant won't fix. It is not something we can easily fix, use the
VC9 versions instead (apachelounge.com for the VC9 versions of apache).


[2010-06-14 12:43:28] pluk77 at gmail dot com

Is this bug closed because it is now fixed in VC6 as well, or because it
is seen as not a bug?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=51184


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


Bug #53601 [Opn->Csd]: function rename

2011-01-03 Thread iliaa
Edit report at http://bugs.php.net/bug.php?id=53601&edit=1

 ID: 53601
 Updated by: il...@php.net
 Reported by:tom_84 at hotmail dot it
 Summary:function rename
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Filesystem function related
 Operating System:   debian lenny
 PHP Version:5.2.16
-Assigned To:
+Assigned To:iliaa
 Block user comment: N
 Private report: N

 New Comment:

If version 5.2.16 works properly, why the bug? You are reporting an
issue on the 

basis of a very old PHP, 5.2.6


Previous Comments:

[2010-12-24 22:01:11] tom_84 at hotmail dot it

I'm not expecting this strange behavior, in fact I have experienced that
in my test case the function rename() it's not executed.

I think that this behavior is php version-related, because on newer php
version the job is done exactly as expected.

This is my phpinfo() http://torms.hellospace.net/zzz/php.php

Happy Christmas to all the php developer!

Regards, Tommaso


[2010-12-24 05:42:25] ahar...@php.net

Why are you expecting rename() to fail in this case?



Even if $file was open when rename() was called (and it's not, in this

case), that doesn't prevent a file being renamed on most operating

systems, Linux included.


[2010-12-24 00:32:36] tom_84 at hotmail dot it

Description:

---

>From manual page: http://www.php.net/function.rename

---

This function should return false on error during file renomination, but
in my test script inclusion is executed but renomination it's not
executed (no output, expected output:0).

Test script:
---
$file = getcwd()."/test.php";

$file2 = $file.".inc";



if (file_exists($file))

{  include $file;

   echo rename($file,$file2);

}







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


Bug #53629 [Opn->Csd]: highlight_string() has leaks

2011-01-03 Thread iliaa
Edit report at http://bugs.php.net/bug.php?id=53629&edit=1

 ID: 53629
 Updated by: il...@php.net
 Reported by:bj...@php.net
 Summary:highlight_string() has leaks
-Status: Open
+Status: Closed
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Linux
 PHP Version:5.3SVN-2010-12-29 (SVN)
-Assigned To:
+Assigned To:iliaa
 Block user comment: N
 Private report: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:

[2011-01-03 15:39:51] il...@php.net

Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=307028
Log: Fixed Bug #53629 (memory leak inside highlight_string()).


[2010-12-29 18:10:11] bj...@php.net

The following patch has been added/updated:

Patch Name: heredoc
Revision:   1293642611
URL:   
http://bugs.php.net/patch-display.php?bug=53629&patch=heredoc&revision=1293642611


[2010-12-29 18:02:41] bj...@php.net

Description:

memleak

Test script:
---


';

$str2 = '



';



highlight_string($str, true);

highlight_string($str2, true);



Actual result:
--
==26002== HEAP SUMMARY:

==26002== in use at exit: 2,228 bytes in 2 blocks

==26002==   total heap usage: 11,067 allocs, 11,065 frees, 2,819,307
bytes 

allocated

==26002== 

==26002== 4 bytes in 1 blocks are definitely lost in loss record 1 of 2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D0B67: _emalloc (zend_alloc.c:2401)

==26002==by 0x6D1023: _estrndup (zend_alloc.c:2556)

==26002==by 0x6B8C07: lex_scan (zend_language_scanner.l:2093)

==26002==by 0x6F3146: zend_highlight (zend_highlight.c:96)

==26002==by 0x6B1C87: highlight_string
(zend_language_scanner.l:774)

==26002==by 0x5E1C4C: zif_highlight_string (basic_functions.c:5163)

==26002==by 0x7405DF: zend_do_fcall_common_helper_SPEC 

(zend_vm_execute.h:638)

==26002==by 0x746729: ZEND_DO_FCALL_SPEC_CONST_HANDLER 

(zend_vm_execute.h:1935)

==26002==by 0x73F0BF: execute (zend_vm_execute.h:410)

==26002==by 0x7039C5: zend_execute_scripts (zend.c:1212)

==26002==by 0x67B45F: php_execute_script (main.c:2337)

==26002==by 0x83E3E9: main (php_cli.c:1254)

==26002== 

==26002== 2,224 bytes in 1 blocks are still reachable in loss record 2
of 2

==26002==at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==26002==by 0x6D11CD: alloc_globals_ctor (zend_alloc.c:2623)

==26002==by 0x6D1248: start_memory_manager (zend_alloc.c:2646)

==26002==by 0x7025CA: zend_startup (zend.c:642)

==26002==by 0x67A75A: php_module_startup (main.c:1889)

==26002==by 0x83CD04: php_cli_startup (php_cli.c:425)

==26002==by 0x83DB13: main (php_cli.c:802)

==26002== 

==26002== LEAK SUMMARY:

==26002==definitely lost: 4 bytes in 1 blocks

==26002==indirectly lost: 0 bytes in 0 blocks

==26002==  possibly lost: 0 bytes in 0 blocks

==26002==still reachable: 2,224 bytes in 1 blocks

==26002== suppressed: 0 bytes in 0 blocks

==26002== 








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


[PHP-BUG] Bug #53642 [NEW]: CLI include_path bug

2011-01-03 Thread php at kingsquare dot nl
From: 
Operating system: Windows 7
PHP version:  5.3.4
Package:  *Configuration Issues
Bug Type: Bug
Bug description:CLI include_path bug

Description:

On Windows 7, 'include' fails to load files from some folders in the
include_path, 

when the 'include_path' is configured like.



include_path = ".;C:\xampp\php\PEAR\;C:\myApp\"



It seems that, when starting the include path with '.;', everything after
the 

second folder (e.g. C:\myApp\ and further ) is ignored by the
include-command.



When '.;' is removed from the include_path, everything works as expected.



This behaviour only appears when using PHP as CLI.

Test script:
---


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



[PHP-BUG] Bug #53643 [NEW]: the date('o-m-d',mktime()) displays current year incorrectly

2011-01-03 Thread pranay dot pramod at gmail dot com
From: 
Operating system: windows XP SP2
PHP version:  5.3.4
Package:  Date/time related
Bug Type: Bug
Bug description:the date('o-m-d',mktime()) displays current year incorrectly

Description:



Test script:
---


Expected result:



expected output: 2011-01-01 00:00:00

Actual result:
--
actual output: 2010-01-01 00:00:00

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



Bug #53643 [Opn->Bgs]: the date('o-m-d',mktime()) displays current year incorrectly

2011-01-03 Thread derick
Edit report at http://bugs.php.net/bug.php?id=53643&edit=1

 ID: 53643
 Updated by: der...@php.net
 Reported by:pranay dot pramod at gmail dot com
 Summary:the date('o-m-d',mktime()) displays current year
 incorrectly
-Status: Open
+Status: Bogus
 Type:   Bug
 Package:Date/time related
 Operating System:   windows XP SP2
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

o is the ISO8601 year: http://en.wikipedia.org/wiki/ISO_week_date

Y is the natural year.


Previous Comments:

[2011-01-03 17:47:55] pranay dot pramod at gmail dot com

Description:



Test script:
---


Expected result:



expected output: 2011-01-01 00:00:00

Actual result:
--
actual output: 2010-01-01 00:00:00






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


Bug #41631 [Com]: default_socket_timeout does not work with SSL

2011-01-03 Thread guyphp at yahoo dot com
Edit report at http://bugs.php.net/bug.php?id=41631&edit=1

 ID: 41631
 Comment by: guyphp at yahoo dot com
 Reported by:david at acz dot org
 Summary:default_socket_timeout does not work with SSL
 Status: Assigned
 Type:   Bug
 Package:OpenSSL related
 Operating System:   *
 PHP Version:5.2, 5.3
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

This bug has caused us a lot of headaches due to hung connections from
partners 

stacking and eventually taking down entire webservers.  During high
traffic 

periods, it doesn't take long for these to reach critical mass.  Is
there any ETA 

on when this bug will find its way into stable builds?  Like many, our
managed 

hosting provider doesn't support patches - we need a stable build with
the fix 

integrated. 



We are seeing this problem on 5.2.13, RHEL 5.5.


Previous Comments:

[2010-11-19 15:43:21] chrisw at networkm dot co dot uk

Cannot reproduce this on Windows Server 2003 R2 Enterprise/PHP 5.2.9-2



fopen() returns after $default_socket_timeout seconds if the server does
not respond.


[2010-06-13 15:12:55] fel...@php.net

Pierre, doesn't the attached patch fix this issue?


[2010-03-15 10:33:47] jason at kapoks dot co dot uk

Had this issue over the weekend with 5.2.10.

Essentially this means our entire service is vulnerable to Denial of
Service.



Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT
2009 i686 i686 i386 GNU/Linux



CentOS release 5.3 (Final)



PHP 5.2.10 (cli) (built: Jun 21 2009 11:10:43)

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend
Technologies

with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend
Technologies


[2010-01-18 19:16:42] wdierkes at 5dollarwhitebox dot org

This is also reproducible on 5.2.12 as described.  As mentioned 

previously, this has the potentially to have major effects (Denial of 

Servide) etc due to processes hanging and never timing out.  



# cat /etc/redhat-release 

Red Hat Enterprise Linux Server release 5.4 (Tikanga)



# php -v

PHP 5.2.12 (cli) (built: Dec 17 2009 12:23:35) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies



# uname -a

Linux linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 

x86_64 x86_64 GNU/Linux


[2009-10-16 20:14:25] arkadi dot shishlov at gmail dot com

At least it would be helpful to set TCP keep-alive on socket so OS could
timeout it eventually, otherwise there are connections stuck for days.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=41631


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


Bug #53640 [Opn]: makes file but text is not there, nor some of border

2011-01-03 Thread 2ms67q83o001 at sneakemail dot com
Edit report at http://bugs.php.net/bug.php?id=53640&edit=1

 ID: 53640
 User updated by:2ms67q83o001 at sneakemail dot com
 Reported by:2ms67q83o001 at sneakemail dot com
-Summary:makes file but text is not there, nor border
+Summary:makes file but text is not there, nor some of border
 Status: Open
 Type:   Bug
 Package:GD related
 Operating System:   XP
-PHP Version:5.2.16
+PHP Version:5.2.11
 Block user comment: N
 Private report: N

 New Comment:

Description:



makes file but text is not there, nor some of border



my nearly identical codes work perfect for imagejpeg(), imagegif() and

 imagepng() and image wbmp()



why not imagexbm()



Test script:

---





Expected result:



bordered xbm image with text in it



Actual result:

--

makes file but text is not there, nor some of border either


Previous Comments:

[2011-01-03 04:30:06] 2ms67q83o001 at sneakemail dot com

Description:

makes file but text is not there, nor border



my nearly identical codes work perfect for imagejpeg(), imagegif() and

 imagepng()



why not imagexbm()



the imagewbmp() function has the same bug!!!

Test script:
---


Expected result:

bordered xbm image with text in it

Actual result:
--
makes file but text is not there, nor border either






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


Bug #53640 [Opn]: makes file but text is not there, nor some of border

2011-01-03 Thread 2ms67q83o001 at sneakemail dot com
Edit report at http://bugs.php.net/bug.php?id=53640&edit=1

 ID: 53640
 User updated by:2ms67q83o001 at sneakemail dot com
 Reported by:2ms67q83o001 at sneakemail dot com
 Summary:makes file but text is not there, nor some of border
 Status: Open
 Type:   Bug
 Package:GD related
 Operating System:   XP
 PHP Version:5.2.11
 Block user comment: N
 Private report: N

 New Comment:

I solved it! There are 2 huge errors on the page that describes the
imagexbm() function and give examples. No one points out that the width
MUST be evenly divisible by 8 or you get a mess. The example is 120 wide
which just accidentally is evenly divisible by 8, which will happen only
1 in 8 times, randomly. This issue is dealt with in the code below.
Also, since xbm is not color but black and white, the example should not
be showing color anything, but it does. The code below is for black and
white, and it works great. If there was a way, I'd erase the other stuff
I wrote in this bug and put this comment here as a note on the
imagexbm() page in PHP.NET!



$temp2){$wide=($temp2 * 8) + 8;}

$high = imagefontheight($fontsize) + 20;

$picture = imagecreatetruecolor($wide,$high);

$white = imagecolorallocate($picture,255,255,255);

imagefill($picture,0,0,$white);

$black=imagecolorallocate($picture, 0, 0, 0);

imageline($picture, 0, 0, 0, $high, $black);

imageline($picture, 0, 0, $wide, 0, $black);

imageline($picture, $wide-1, 0, $wide-1, $high-1, $black);

imageline($picture, 0, $high-1, $wide-1, $high-1, $black);

imagestring($picture,$fontsize,10,10,$mytext,$black);

imagexbm($picture); //This function is only available if PHP is compiled
with the bundled version of the GD library

imagexbm($picture,"mytextpic.xbm");

imagedestroy($picture);



?>


Previous Comments:

[2011-01-04 02:40:23] 2ms67q83o001 at sneakemail dot com

Description:



makes file but text is not there, nor some of border



my nearly identical codes work perfect for imagejpeg(), imagegif() and

 imagepng() and image wbmp()



why not imagexbm()



Test script:

---





Expected result:



bordered xbm image with text in it



Actual result:

--

makes file but text is not there, nor some of border either


[2011-01-03 04:30:06] 2ms67q83o001 at sneakemail dot com

Description:

makes file but text is not there, nor border



my nearly identical codes work perfect for imagejpeg(), imagegif() and

 imagepng()



why not imagexbm()



the imagewbmp() function has the same bug!!!

Test script:
---


Expected result:

bordered xbm image with text in it

Actual result:
--
makes file but text is not there, nor border either






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


Bug #53632 [Com]: PHP hangs on numeric value 2.2250738585072011e-308

2011-01-03 Thread cswarth at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1

 ID: 53632
 Comment by: cswarth at gmail dot com
 Reported by:exploringbinary at gmail dot com
 Summary:PHP hangs on numeric value 2.2250738585072011e-308
 Status: Assigned
 Type:   Bug
 Package:Math related
 PHP Version:5.3.4
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

Doesn't happen on a mac.



$ php -v

PHP 5.3.1 (cli) (built: Feb 11 2010 02:32:22) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies



$ php -r "print 2.2250738585072011e-308;"

2.2250738585072E-308


Previous Comments:

[2011-01-02 16:52:43] exploringbinary at gmail dot com

I also get the same problem on Linux (PHP Version 5.3.2-1ubuntu4.5).


[2011-01-02 16:49:48] paj...@php.net

Dmitry, can you take a look at it please?


[2011-01-02 16:44:38] exploringbinary at gmail dot com

(Remove 2.2250738585072012e-308 from my list of examples; it does NOT
map to the same floating-point number as 2.2250738585072011e-308 -- when
converted correctly!)


[2010-12-30 06:58:41] exploringbinary at gmail dot com

Description:

If I assign the value 2.2250738585072011e-308 to a variable, e.g. $d =
2.2250738585072011e-308, PHP hangs (loops). I am using PHP 5.3.1 XAMPP
1.7.3 on Windows.



2.2250738585072011e-308 represents the largest subnormal
double-precision floating-point number,
0. x 2^-1022.
Interestingly, nearby decimal literals 2.2250738585072008e-308,
2.2250738585072009e-308, 2.2250738585072010e-308 and
2.2250738585072012e-308 -- which all convert to the same floating-point
value -- do not cause this problem.







Test script:
---


Expected result:

No Hang.

Actual result:
--
Hang.






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


Bug #53608 [Opn->Ver]: mktime() produces invalid results under 64-bit

2011-01-03 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=53608&edit=1

 ID: 53608
 Updated by: ahar...@php.net
 Reported by:jer_826 at yahoo dot com
 Summary:mktime() produces invalid results under 64-bit
-Status: Open
+Status: Verified
 Type:   Bug
-Package:Unknown/Other Function
+Package:Date/time related
 Operating System:   Linux 2.6.35.7  x86_64
 PHP Version:5.2.16
 Block user comment: N
 Private report: N

 New Comment:

Confirmed; the error handling in timelib_date_to_int() is insufficient

for platforms with 64 bit longs.



The quick and dirty fix would be to explicitly compare ts in

timelib_date_to_int() to the minimum and maximum values of a 32 bit

integer, but you'd then lose the ability to use mktime() for dates

outside the 1901-2038 range. Better would be to try to detect overflow

in timelib_update_ts(), but that's not going to be foolproof either.



I don't have any particularly strong feelings on this one, or even

whether it's worth trying to handle. Derick?


Previous Comments:

[2011-01-02 09:52:16] brad at njoe dot com

Confirmed on Ubuntu 10.10 (Linux 2.6.35-24-server x86_64). Also tested a
Win32 

build and all three var_dumps() show "bool(false)" as
expected/documented.


[2010-12-24 22:19:04] jer_826 at yahoo dot com

Description:

It appears that when the PHP binary was compiled against 64-bit
libraries,  

mktime() seems to only do minimal error checking of parms. After some
additional 

testing, if found the following results:

PHP Code:

$t=mktime(0,0,0,12,3,292277026596); 

var_dump($t); 



$t=mktime(0,0,0,12,3,292277026597); 

var_dump($t); 



$t=mktime(9000,9000,9000,9000,9000,9

000); 



var_dump($t); 

int(9223372036854655200)

int(-9223372036823360416) 

int(-6044405109589065632)



It appears that once the parm value exceeds the value limit of a long
var, the 

function returns a negative value. No warnings are produced. Instead of


returning FALSE for an error, the function just returns an invalid
result.



Some additional info here: http://phpbuilder.com/board/showthread.php?

p=10971046#post10971046

Test script:
---
$t=mktime(0,0,0,12,3,292277026596); 

var_dump($t); 



$t=mktime(0,0,0,12,3,292277026597); 

var_dump($t); 



$t=mktime(9000,9000,9000,9000,9000,9000);




var_dump($t); 

int(9223372036854655200)

int(-9223372036823360416) 

int(-6044405109589065632)

Expected result:

Return FALSE if parms are invalid.

Actual result:
--
Invalid values. Does not return FALSE.






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


[PHP-BUG] Bug #53646 [NEW]: Brackets being replaced with hash

2011-01-03 Thread phil dot allen at internode dot on dot net
From: 
Operating system: Win x64
PHP version:  5.3.4
Package:  Strings related
Bug Type: Bug
Bug description:Brackets being replaced with hash

Description:

When concatenating two strings, brackets are being replaced by hashes (#).

Test script:
---
$data1 = '\'2011-1-1';

$data2 = '\' AS DATE)|CAST(';

echo $data1 . $data2;

Expected result:

'2011-1-1' AS DATE)|CAST( 

Actual result:
--
'2011-1-1' AS DATE#|CAST# 

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



Bug #53646 [Opn->Bgs]: Brackets being replaced with hash

2011-01-03 Thread rasmus
Edit report at http://bugs.php.net/bug.php?id=53646&edit=1

 ID: 53646
 Updated by: ras...@php.net
 Reported by:phil dot allen at internode dot on dot net
 Summary:Brackets being replaced with hash
-Status: Open
+Status: Bogus
 Type:   Bug
 Package:Strings related
 Operating System:   Win x64
 PHP Version:5.3.4
 Block user comment: N
 Private report: N

 New Comment:

There is no chance this is PHP doing that.  You must have something else
going on 

here.


Previous Comments:

[2011-01-04 07:41:55] phil dot allen at internode dot on dot net

Description:

When concatenating two strings, brackets are being replaced by hashes
(#).

Test script:
---
$data1 = '\'2011-1-1';

$data2 = '\' AS DATE)|CAST(';

echo $data1 . $data2;

Expected result:

'2011-1-1' AS DATE)|CAST( 

Actual result:
--
'2011-1-1' AS DATE#|CAST# 






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


Bug #53632 [Com]: PHP hangs on numeric value 2.2250738585072011e-308

2011-01-03 Thread yuv dot adm at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1

 ID: 53632
 Comment by: yuv dot adm at gmail dot com
 Reported by:exploringbinary at gmail dot com
 Summary:PHP hangs on numeric value 2.2250738585072011e-308
 Status: Assigned
 Type:   Bug
 Package:Math related
 PHP Version:5.3.4
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

Does not reproduce on a mac, confirmed:



mac:junk yuval$ cat p.php 



Expected result:

No Hang.

Actual result:
--
Hang.






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


Bug #53632 [Com]: PHP hangs on numeric value 2.2250738585072011e-308

2011-01-03 Thread aquilax at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1

 ID: 53632
 Comment by: aquilax at gmail dot com
 Reported by:exploringbinary at gmail dot com
 Summary:PHP hangs on numeric value 2.2250738585072011e-308
 Status: Assigned
 Type:   Bug
 Package:Math related
 PHP Version:5.3.4
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

It hangs on Debian:





aqui...@zelda /tmp> php -v

PHP Warning:  PHP Startup: Unable to load dynamic library 

'/usr/lib/php5/20090626+lfs/adodb.so' -
/usr/lib/php5/20090626+lfs/adodb.so: 

cannot open shared object file: No such file or directory in Unknown on
line 0

PHP 5.3.3-6 with Suhosin-Patch (cli) (built: Dec  7 2010 18:23:49) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins
GmbH

aqui...@zelda /tmp> cat t.php 



aqui...@zelda /tmp> time php t.php 

PHP Warning:  PHP Startup: Unable to load dynamic library 

'/usr/lib/php5/20090626+lfs/adodb.so' -
/usr/lib/php5/20090626+lfs/adodb.so: 

cannot open shared object file: No such file or directory in Unknown on
line 0

^CCommand terminated by signal 2

7.55user 0.02system 0:07.61elapsed 99%CPU (0avgtext+0avgdata
36720maxresident)k

0inputs+0outputs (0major+2620minor)pagefaults 0swaps


Previous Comments:

[2011-01-04 08:31:04] yuv dot adm at gmail dot com

Does not reproduce on a mac, confirmed:



mac:junk yuval$ cat p.php 

http://bugs.php.net/bug.php?id=53632


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


Bug #53632 [Com]: PHP hangs on numeric value 2.2250738585072011e-308

2011-01-03 Thread yuv dot adm at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=53632&edit=1

 ID: 53632
 Comment by: yuv dot adm at gmail dot com
 Reported by:exploringbinary at gmail dot com
 Summary:PHP hangs on numeric value 2.2250738585072011e-308
 Status: Assigned
 Type:   Bug
 Package:Math related
 PHP Version:5.3.4
 Assigned To:dmitry
 Block user comment: N
 Private report: N

 New Comment:

Check out the strace:



  lstat64("/home/ubuntu/junk/p.php", {st_mode=S_IFREG|0644, st_size=59,
...}) = 0

  lstat64("/home/ubuntu/junk", {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0

  lstat64("/home/ubuntu", {st_mode=S_IFDIR|0755, st_size=4096, ...}) =
0

  lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0

  ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe51238) = -1  ENOTTY
(Inappropriate ioctl for device)

  fstat64(3, {st_mode=S_IFREG|0644, st_size=59, ...}) = 0

  mmap2(NULL, 68, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78d1000



and then it hangs...


Previous Comments:

[2011-01-04 08:55:01] aquilax at gmail dot com

It hangs on Debian:





aqui...@zelda /tmp> php -v

PHP Warning:  PHP Startup: Unable to load dynamic library 

'/usr/lib/php5/20090626+lfs/adodb.so' -
/usr/lib/php5/20090626+lfs/adodb.so: 

cannot open shared object file: No such file or directory in Unknown on
line 0

PHP 5.3.3-6 with Suhosin-Patch (cli) (built: Dec  7 2010 18:23:49) 

Copyright (c) 1997-2009 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins
GmbH

aqui...@zelda /tmp> cat t.php 



aqui...@zelda /tmp> time php t.php 

PHP Warning:  PHP Startup: Unable to load dynamic library 

'/usr/lib/php5/20090626+lfs/adodb.so' -
/usr/lib/php5/20090626+lfs/adodb.so: 

cannot open shared object file: No such file or directory in Unknown on
line 0

^CCommand terminated by signal 2

7.55user 0.02system 0:07.61elapsed 99%CPU (0avgtext+0avgdata
36720maxresident)k

0inputs+0outputs (0major+2620minor)pagefaults 0swaps


[2011-01-04 08:31:04] yuv dot adm at gmail dot com

Does not reproduce on a mac, confirmed:



mac:junk yuval$ cat p.php 

http://bugs.php.net/bug.php?id=53632


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