Last modified: 2014-09-24 00:08:12 UTC
It would appear that the PHP date_create() function fails (freezes) when the timezone isn't specified. To fix this problem, I modified Includes/Specials/SpecialPreferences.php, around line 1052, as follows: Before: $now = date_create( 'now ); After ($wgLocaltimezone is specified in LocalSettings.php): global $wgLocaltimezone; $now = date_create( 'now', $wgLocaltimezone ); This happened on my system, running Windows Server 2003, MediaWiki 1.15.4, PHP 5.3.0 (apache2handler), MySQL 5.1.35-community.
... the "Before" is really this: $now = date_create( 'now' );
Code is at 1197 of includes/Preferences.php now (in trunk), and also in 1.16 http://www.php.net/manual/en/datetime.construct.php "If $timezone is omitted, the current timezone will be used." Seems to work fine on my trunk install.. PHP windows bug?
That is what I would suspect, which is why I made it quite clear exactly what my configuration was. It works ok on Windows XP and Linux Ubuntu, but not on Windows Server 2003. I guess I should have mentioned where it DID work too... Anyway, it seems to work now, with my patch, in Windows Server 2003. Thanks for putting the fix in the main version.
I put the fix in 1.16.0beta3, Preferences.php, around line 1193, and it fixes the problem. I was testing with Windows Server 2003, PHP 5.3.0 (apache2handler), MySQL 5.1.35-community.
Ed, can you test with an installation of MediaWiki 1.17.0 and see whether the issue still happens (that is, without your patch)? And if the issue still happens, and your patch fixes it, could you attach it *as a patch*? Thanks!