Re: PHP upgrade to v5.2.10
On 2009-06-29 , at 21:56 , Ryan Schmidt wrote: Digged a bit in their CVS and this should be the fix: http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.237r2=1.238view=patch Thanks for finding that. I haven't had a chance to test on PowerPC but I added the patch and it's in php5 @5.2.10_1 and php5-devel @5.3.0RC4_1. PowerPC users are invited to see whether that works now. f...@x:face:125 $ which php /opt/local/bin/php f...@x:face:126 $ php --version PHP 5.2.10 (cli) (built: Jun 30 2009 05:44:33) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies f...@x:face:127 $ php ./foo.php 2009 Works here. 8) -- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On 2009-06-26 00:21, Ryan Schmidt wrote: I see they have fixed the problem in CVS, but they have not told us how they fixed it. So we either wait for 5.2.11 and update the port to that version, or someone has to find out what patch fixed the problem and I can apply that patch in the portfile. Digged a bit in their CVS and this should be the fix: http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.237r2=1.238view=patch Rainer ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
PHP upgrade to v5.2.10
Last night I was upgrading my web server to PHP v5.2.10 (from v5.2.8) and everything seemed to go ok, no warnings or major gotchas. But once I began using it, I could see there were some real problems with the time() and date() functions. It's possible that I'm just using these two functions in ways that are either wrong (but have up to now served to accomplish the task I was seeking to do) or are no longer allowed, for security reasons, in which case I will need to develop a work-around. Or something is going wrong with the update. I'm writing to this list to see if anyone else has experienced this same problem, or if you all might have some ideas as to what's going on here. Some additional info: I am running PHP on a Dual G4 PPC Mac, Apache (that comes with Mac OS X, not Apache 2), and MySQL from MacPorts. - Pete O ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On Jun 25, 2009, at 7:09 AM, Peter Oakley wrote: Last night I was upgrading my web server to PHP v5.2.10 (from v5.2.8) and everything seemed to go ok, no warnings or major gotchas. But once I began using it, I could see there were some real problems with the time() and date() functions. It's possible that I'm just using these two functions in ways that are either wrong (but have up to now served to accomplish the task I was seeking to do) or are no longer allowed, for security reasons, in which case I will need to develop a work-around. Or something is going wrong with the update. I'm writing to this list to see if anyone else has experienced this same problem, or if you all might have some ideas as to what's going on here. Give an example of your usage of time() and date(), what you expect and what you are getting. // Brad ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
Here is an example usage of the date() and time() functions: snippetStart - - - - - - $timestamp = time(); //echo $timestamp; $thisYear = date('Y', $timestamp); echo $thisYear; - - - - - - snippetEnd After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. One other possibly important detail: I've installed a variant: php5 +apache +macosx +mysql5 +t1lib - Pete O On Jun 25, 2009, at 10:12 AM, Bradley Giesbrecht wrote: On Jun 25, 2009, at 7:09 AM, Peter Oakley wrote: Last night I was upgrading my web server to PHP v5.2.10 (from v5.2.8) and everything seemed to go ok, no warnings or major gotchas. But once I began using it, I could see there were some real problems with the time() and date() functions. It's possible that I'm just using these two functions in ways that are either wrong (but have up to now served to accomplish the task I was seeking to do) or are no longer allowed, for security reasons, in which case I will need to develop a work-around. Or something is going wrong with the update. I'm writing to this list to see if anyone else has experienced this same problem, or if you all might have some ideas as to what's going on here. Give an example of your usage of time() and date(), what you expect and what you are getting. // Brad ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
Peter Oakley wrote: Here is an example usage of the date() and time() functions: snippetStart - - - - - - $timestamp = time(); //echo $timestamp; $thisYear = date('Y', $timestamp); echo $thisYear; - - - - - - snippetEnd After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. One other possibly important detail: I've installed a variant: php5 +apache +macosx +mysql5 +t1lib - Pete O On Jun 25, 2009, at 10:12 AM, Bradley Giesbrecht wrote: On Jun 25, 2009, at 7:09 AM, Peter Oakley wrote: Last night I was upgrading my web server to PHP v5.2.10 (from v5.2.8) and everything seemed to go ok, no warnings or major gotchas. But once I began using it, I could see there were some real problems with the time() and date() functions. It's possible that I'm just using these two functions in ways that are either wrong (but have up to now served to accomplish the task I was seeking to do) or are no longer allowed, for security reasons, in which case I will need to develop a work-around. Or something is going wrong with the update. I'm writing to this list to see if anyone else has experienced this same problem, or if you all might have some ideas as to what's going on here. Give an example of your usage of time() and date(), what you expect and what you are getting. // Brad ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users You should not specify +macosx on the command line. It is selected automatically based on your current platform. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On 2009-06-25 , at 07:43 , Peter Oakley wrote: snippetStart - - - - - - $timestamp = time(); //echo $timestamp; $thisYear = date('Y', $timestamp); echo $thisYear; - - - - - - snippetEnd After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. One other possibly important detail: I've installed a variant: php5 +apache +macosx +mysql5 +t1lib f...@mac:~:129 $ cat foo.php ?php $timestamp = time(); $thisYear = date('Y', $timestamp); echo $thisYear . \n; ? f...@mac:~:130 $ which php /opt/local/bin/php f...@mac:~:131 $ php --version PHP 5.2.10 (cli) (built: Jun 20 2009 08:25:00) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies f...@mac:~:132 $ php foo.php 2009 f...@mac:~:133 $ My php is php5 @5.2.10_0+apache2+macosx+mysql5+pear (active) f...@mac:~:134 $ uname -a Darwin mac.centosprime.com 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 Which version of OS X are you running? 8) -- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On Jun 25, 2009, at 7:43 AM, Peter Oakley wrote: Here is an example usage of the date() and time() functions: snippetStart - - - - - - $timestamp = time(); //echo $timestamp; $thisYear = date('Y', $timestamp); echo $thisYear; - - - - - - snippetEnd After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. One other possibly important detail: I've installed a variant: php5 +apache +macosx +mysql5 +t1lib bash-3.2# port installed php5 The following ports are currently installed: php5 @5.2.10_0+apache2+imap+macosx+mysql5+pear+pspell+readline +sqlite+tidy (active) bash-3.2# which php /opt/local/bin/php bash-3.2# php --version PHP 5.2.10 (cli) (built: Jun 25 2009 09:13:39) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies bash-3.2# php -r '$timestamp=time();echo {$timestamp}\n; $thisYear=date(Y, $timestamp);echo {$thisYear}\n;' 1245947391 2009 bash-3.2# ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
Bradley, and Chris, you've both suggested some good ways to determine whether these two PHP functions are working right via command line -- thanks. My web server is running Mac OS X v10.4.11 with all available Software Updates installed. I am now beginning the process of setting up a test server to try these things... - Pete O On Jun 25, 2009, at 12:07 PM, Chris Janton wrote: Which version of OS X are you running? ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
Looks like this problem with the date('Y') function was a PHP bug. It showed up on Mac OS X (my system) and on Mac OS X Server, both v10.4.11, when upgrading from PHP v5.2.8 or v5.2.9 to v5.2.10, and the bug also existed in v5.3.0 RC2. Similar problem with the DateTime () function. The issue has also been demonstrated on Debian Lenny PPC and on Solaris Sparc version 9. Here's a link for reference: http://bugs.php.net/bug.php?id=48276 See the last message of the bug track dated [21 Jun 10:20pm UTC] from scott...@php.net (four days ago). This bug has been fixed in current builds of PHP v5.2.10. Now I'm wondering: How long is it likely to take for this fixed version of PHP5 v5.2.10 to make its way into MacPorts? - Pete O On Jun 25, 2009, at 10:09 AM, Peter Oakley wrote: Last night I was upgrading my web server to PHP v5.2.10 (from v5.2.8) and everything seemed to go ok, no warnings or major gotchas. But once I began using it, I could see there were some real problems with the time() and date() functions. It's possible that I'm just using these two functions in ways that are either wrong (but have up to now served to accomplish the task I was seeking to do) or are no longer allowed, for security reasons, in which case I will need to develop a work-around. Or something is going wrong with the update. I'm writing to this list to see if anyone else has experienced this same problem, or if you all might have some ideas as to what's going on here. Some additional info: I am running PHP on a Dual G4 PPC Mac, Apache (that comes with Mac OS X, not Apache 2), and MySQL from MacPorts. - Pete O ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On Jun 25, 2009, at 17:10, Peter Oakley wrote: Looks like this problem with the date('Y') function was a PHP bug. It showed up on Mac OS X (my system) and on Mac OS X Server, both v10.4.11, when upgrading from PHP v5.2.8 or v5.2.9 to v5.2.10, and the bug also existed in v5.3.0 RC2. Similar problem with the DateTime() function. The issue has also been demonstrated on Debian Lenny PPC and on Solaris Sparc version 9. Here's a link for reference: http://bugs.php.net/bug.php?id=48276 See the last message of the bug track dated [21 Jun 10:20pm UTC] from scott...@php.net (four days ago). This bug has been fixed in current builds of PHP v5.2.10. Now I'm wondering: How long is it likely to take for this fixed version of PHP5 v5.2.10 to make its way into MacPorts? I see they have fixed the problem in CVS, but they have not told us how they fixed it. So we either wait for 5.2.11 and update the port to that version, or someone has to find out what patch fixed the problem and I can apply that patch in the portfile. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On 2009-06-25 , at 07:43 , Peter Oakley wrote: After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. One other possibly important detail: I've installed a variant: php5 +apache +macosx +mysql5 +t1lib Looks like a PPC only problem? From my G4 ad...@x:macports:133 $ which php /opt/local/bin/php ad...@x:macports:134 $ php --version PHP 5.2.10 (cli) (built: Jun 25 2009 09:22:38) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies ad...@x:macports:135 $ php foo.php ad...@x:macports:136 $ sudo port deactivate php5 @5.2.10_0+apache +darwin_7+macosx+mysql5+pear Password: --- Deactivating php5 @5.2.10_0+apache+darwin_7+macosx+mysql5+pear ad...@x:macports:137 $ sudo port activate php5 @5.2.6_2+apache +darwin_7+macosx+mysql5+pear --- Activating php5 @5.2.6_2+apache+darwin_7+macosx+mysql5+pear ad...@x:macports:138 $ php foo.php 2009 8) -- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PHP upgrade to v5.2.10
On Jun 25, 2009, at 17:55, Chris Janton wrote: On 2009-06-25 , at 07:43 , Peter Oakley wrote: After the PHP upgrade to v5.2.10, this yields for $thisYear. Prior to the upgrade, $thisYear would be set to 2009. I also tried using the time function directly within the date function: $thisYear = date('Y', time()); Same result. Looks like a PPC only problem? Yes, that seems to be the consensus. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users