#50930 [Opn->Asn]: wrong date by php_date.c patch

2010-02-04 Thread jani
 ID:   50930
 Updated by:   j...@php.net
 Reported By:  nathan dot kessler at hushmail dot me
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: SuSE 7.3 i386 / gcc version 2.95
 PHP Version:  5.*, 6
-Assigned To:  jani
+Assigned To:  derick
 New Comment:

I'll leave it for Derick to decide what to do. I suggest removing the
whole check from config.m4 and replacing the llabs() stuff with some own
macro/function used always for any and all compilers and systems. 


Previous Comments:


[2010-02-04 02:33:49] kmcgrail at apache dot org

In my previous comment, I referred to the wrong patch.  I meant to say
remove 291371.  The cookie warning from 286508 is good and valid IMO.

OK, so I believe the patch in 291371 definitely is causing the issue in
combination with older GCC's.  Here's the testing I've done:

PHP 5.2.12 compiled by gcc 3.2.3 - SquirrelMail 1.2.19 works as well as
PHPMyAdmin 2.11.10.

PHP 5.2.12 compiled by gcc 2.9.6 - SM 1.2.19 is broken with the error
"You must be logged in to access this page."
PHPMyAdmin sporadically triggers "Warning: Expiry date cannot have a
year greater then "

Finally, PHP 5.2.12 compiled with revision 291371 removed with GCC 2.96
- PHPMyadmin & SquirrelMail works.

So I think the issue is with the llabs call as you expected and my
experience confirms it.  If you have a patch you want me to test, let me
know.



[2010-02-03 23:28:37] j...@php.net

Oops, that bug was no warning but an error. So can't really just
revert..



[2010-02-03 23:26:34] j...@php.net

I'm considering reverting the patch for fixing bug #50266 since that
was only a warning anyway..need to investigate a bit more though.




[2010-02-03 22:47:21] nathan dot kessler at hushmail dot me

It's defined with 1:

/* Define if you have the llabs function.  */
#define HAVE_LLABS 1



[2010-02-03 22:27:26] j...@php.net

What exactly is HAVE_LLABS defined in your main/php_config.h file? (in
the build)



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/50930

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



#50930 [Opn->Asn]: wrong date by php_date.c patch

2010-02-03 Thread jani
 ID:   50930
 Updated by:   j...@php.net
 Reported By:  nathan dot kessler at hushmail dot me
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: SuSE 7.3 i386 / gcc version 2.95
 PHP Version:  5.*, 6
 Assigned To:  jani
 New Comment:

I'm considering reverting the patch for fixing bug #50266 since that
was only a warning anyway..need to investigate a bit more though.



Previous Comments:


[2010-02-03 22:47:21] nathan dot kessler at hushmail dot me

It's defined with 1:

/* Define if you have the llabs function.  */
#define HAVE_LLABS 1



[2010-02-03 22:27:26] j...@php.net

What exactly is HAVE_LLABS defined in your main/php_config.h file? (in
the build)



[2010-02-03 21:57:10] j...@php.net

Some links to help out a bit:

  http://svn.php.net/viewvc/?view=revision&revision=291371




[2010-02-03 21:53:43] j...@php.net

This is same thing as reported in bug #50899 and since this is much
better report, closing that one in favor of this. 

llabs() is C99, so I guess that ancient GCC does not support it. I'd
suggest upgrading the compiler as first thing you do. Many other things
will break in future PHP versions as well if you stick with that. :)

I'll look into this, but since I don't have such old compiler around,
this might take a while.



[2010-02-03 21:17:35] nathan dot kessler at hushmail dot me

Description:

Right after updating 5.2.11 to 5.2.12 all phpscripts using
date(function showed wrong years:

   2008 is 8624294332376
   2009 is 8628589299673
   2010 is 8632884266970
   2011 is 8637179234267
   2012 is 8641474201564

I reviewed patches of 5.2.12 and identified patch #50266 / revision
291371. If I compile without revision 291371 all years are fine. I see
no definition of llabs in my systems /usr/include/stdlib.h like
described in #50266. Perhaps this function is defined only under
solaris?


Reproduce code:
---


Expected result:

2010

Actual result:
--
8632884266970





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



#50930 [Opn->Asn]: wrong date by php_date.c patch

2010-02-03 Thread jani
 ID:   50930
 Updated by:   j...@php.net
 Reported By:  nathan dot kessler at hushmail dot me
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: SuSE 7.3 i386 / gcc version 2.95
 PHP Version:  5.2.12
-Assigned To:  
+Assigned To:  jani
 New Comment:

This is same thing as reported in bug #50899 and since this is much
better report, closing that one in favor of this. 

llabs() is C99, so I guess that ancient GCC does not support it. I'd
suggest upgrading the compiler as first thing you do. Many other things
will break in future PHP versions as well if you stick with that. :)

I'll look into this, but since I don't have such old compiler around,
this might take a while.


Previous Comments:


[2010-02-03 21:17:35] nathan dot kessler at hushmail dot me

Description:

Right after updating 5.2.11 to 5.2.12 all phpscripts using
date(function showed wrong years:

   2008 is 8624294332376
   2009 is 8628589299673
   2010 is 8632884266970
   2011 is 8637179234267
   2012 is 8641474201564

I reviewed patches of 5.2.12 and identified patch #50266 / revision
291371. If I compile without revision 291371 all years are fine. I see
no definition of llabs in my systems /usr/include/stdlib.h like
described in #50266. Perhaps this function is defined only under
solaris?


Reproduce code:
---


Expected result:

2010

Actual result:
--
8632884266970





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