PHP 4.0 Bug #7626 Updated: session saving and loading seem to use different locales

From: Date: Tue, 20 Feb 2001 12:30:48 +0000
Subject: PHP 4.0 Bug #7626 Updated: session saving and loading seem to use different locales
Groups: php.dev 
Request: Send a blank email to php-dev+get-47025@lists.php.net to get a copy of this message
ID: 7626 Updated by: sniper Reported By: cstrebin@softdevel.com Old-Status: Feedback Status: Closed Old-Bug Type: *General Issues Bug Type: *Session related Assigned To: Comments: No feedback, considered fixed. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-12-15 20:18:18] sniper@php.net Please try the latest snapshot from http://snaps.php.net/ --Jani --------------------------------------------------------------------------- [2000-11-05 06:14:03] stas@php.net Serializer uses locale-sensitive sprintf for doubles, which it probably should not. --------------------------------------------------------------------------- [2000-11-03 12:19:27] cstrebin@softdevel.com My LANG environment variable is "german". At the beginning of every page, I do setLocale('LC_ALL', 'en_US')'. With those settings, float session variables are saved with ,' as decimal point, but loading seems to expect `.' so that I get values truncated to ints. Example script: <? setLocale('LC_ALL', 'en_US'); session_start(); $x = & $HTTP_SESSION_VARS['x']; if (!isset($x)) $x = 1; $x *= '1.1'; print("$x<br>n"); printf("<a href="%s">go</a>n", $HTTP_SERVER_VARS['PHP_SELF']); // (link relies on transparent sid) ?> The session file contains x|d:1,1;', and the page always shows 1.1', since the loaded value becomes 1. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=7626&edit=2

« previous php.dev (#47025) next »