ID: 14819 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Strings related Operating System: Linux Old PHP Version: 4.0.6 PHP Version: 4.0.5 New Comment:
Here are my configuration options: './configure' '--prefix=/usr/local' '--with-apache=/usr/local/src/Apachetoolbox-1.5.19/apache_1.3.19' '--enable-exif' '--enable-memory-limit=yes' '--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--with-mysql' '--with-mysql=/usr/local/mysql' '--with-openssl' Previous Comments: ------------------------------------------------------------------------ [2002-01-03 03:56:56] [EMAIL PROTECTED] Status -> feedback ------------------------------------------------------------------------ [2002-01-03 01:28:09] [EMAIL PROTECTED] Just tested it with 4.0.6 and 4.1.0 All seems to be ok. Can you send me your configuration options? ------------------------------------------------------------------------ [2002-01-02 23:49:09] [EMAIL PROTECTED] Two lines like this: $myarray[ 2 ] = str_replace( "'", "", $mystring ); $myserial = serialize( $myarray ); produce a serialized array in $myserial but it contains the wrong length or sometimes the wrong value for the string I inserted. It sometimes deletes the "'" and the following character, sometimes deletes just the "'" but has the wrong length of the string encoded in the serialized variable. An example of $myserial would be: a:3:{i:0;s:2:"s1";i:1;s:2:"s2";i:2;s:5:"dont";} Which encodes the wrong length for the final string. It works correctly when I break it into three lines: $mystring = str_replace( "'", "", $mystring ); $myarray[ 2 ] = $mystring; $myserial = serialize( $myarray ); An example of $myserial would be: a:3:{i:0;s:2:"s1";i:1;s:2:"s2";i:2;s:4:"dont";} Which encodes the correct length for the final string. This only appears to happen if there is a str_replace match in the string. If there is no match for the str_replace function, the glitch doesn't seem to appear. Thanks. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14819&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]