[PHP-BUG] Bug #55706 [NEW]: php.ini directives will lock once they are used in a host specific section
From: Operating system: Windows XP SP3 PHP version: 5.3.8 Package: Dynamic loading Bug Type: Bug Bug description:php.ini directives will lock once they are used in a host specific section Description: PHP version: 5.3.8-ZS5.5.0 ini_set function returns false if the given directive is named in a host specific section. As the result, the directive's value is not changed. This bug is reproducible with other similar functions like set_include_path. Don't forget to restart your webserver before testing since this bug requires modifying php.ini file. Test script: --- Insert the following section into your php.ini file:br / br / [Zend]br / include_path=.;C:\Program Files\Zend\ZendServer\share\ZendFramework\librarybr / br / [HOST=anything.com]br / include_path=.;C:\my_librarybr / br / ?php echo Executing: ini_set('include_path', 'C:\another_library')br /\n; $result = ini_set('include_path', 'C:\another_library'); echo 'ini_set returned: ' . ($result ? 'true' : 'false'); echo br /\n; echo 'And current value for directive is: ' . ini_get('include_path'); Expected result: Insert the following section into your php.ini file:br / br / [Zend]br / include_path=.;C:\Program Files\Zend\ZendServer\share\ZendFramework\librarybr / br / [HOST=anything.com]br / include_path=.;C:\my_librarybr / br / Executing: ini_set('include_path', 'C:\another_library')br / ini_set returned: truebr / And current value for directive is: .;C:\another_library Actual result: -- Insert the following section into your php.ini file:br / br / [Zend]br / include_path=.;C:\Program Files\Zend\ZendServer\share\ZendFramework\librarybr / br / [HOST=anything.com]br / include_path=.;C:\my_librarybr / br / Executing: ini_set('include_path', 'C:\another_library')br / ini_set returned: falsebr / And current value for directive is: .;C:\my_library -- Edit bug report at https://bugs.php.net/bug.php?id=55706edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55706r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55706r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55706r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55706r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55706r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55706r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55706r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55706r=needscript Try newer version: https://bugs.php.net/fix.php?id=55706r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55706r=support Expected behavior: https://bugs.php.net/fix.php?id=55706r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55706r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55706r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55706r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55706r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=55706r=dst IIS Stability: https://bugs.php.net/fix.php?id=55706r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55706r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55706r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55706r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55706r=mysqlcfg
#45199 [Bgs]: Serializing objects with private properties
ID: 45199 User updated by: mehran20 at hotmail dot com Reported By: mehran20 at hotmail dot com Status: Bogus Bug Type: Class/Object related Operating System: CentOS / Linux PHP Version: 5.2.6 New Comment: Jani, I know what PRIVATE means and I know what I've submitted is a bug, not a BOGUS!! Please take another look at this bug, it did not exist in 5.2 and when I upgraded to 5.2.6 it suddenly hit me. Please take a close look at it, this is a php bug!!! Previous Comments: [2008-06-09 08:53:35] [EMAIL PROTECTED] RTFM: Private limits visibility only to the class that defines the item. [2008-06-07 09:02:39] mehran20 at hotmail dot com Description: Hi Before you read the code, I want to say that the code that is given in this section works fine. The only problem is for the code that is given in the Reproduce code. class A { private $a = 1; } class B extends A { private $b = 2; } $v = new B; print_r(unserialize(serialize($v))); Output (which is correct): B Object ( [b:private] = 2 [a:private] = 1 ) Reproduce code: --- class A { private $a = 1; public function __sleep() { $vars = get_object_vars($this); return array_keys($vars); } } class B extends A { private $b = 2; } $v = new B; print_r(unserialize(serialize($v))); Expected result: B Object ( [b:private] = 2 [a:private] = 1 ) Or B Object ( [b:private] = 2 ) I prefer the first one! But both could be correct!! Actual result: -- Notice: serialize() [function.serialize]: a returned as member variable from __sleep() but does not exist in __FILE__ on line 14 B Object ( [b:private] = 2 [a:private] = 1 [a] = ) -- Edit this bug report at http://bugs.php.net/?id=45199edit=1
#45199 [NEW]: Seializing objects with private properties
From: mehran20 at hotmail dot com Operating system: CentOS / Linux PHP version: 5.2.6 PHP Bug Type: Class/Object related Bug description: Seializing objects with private properties Description: Hi Before you read the code, I want to say that the code that is given in this section works fine. The only problem is for the code that is given in the Reproduce code. class A { private $a = 1; } class B extends A { private $b = 2; } $v = new B; print_r(unserialize(serialize($v))); Output (which is correct): B Object ( [b:private] = 2 [a:private] = 1 ) Reproduce code: --- class A { private $a = 1; public function __sleep() { $vars = get_object_vars($this); return array_keys($vars); } } class B extends A { private $b = 2; } $v = new B; print_r(unserialize(serialize($v))); Expected result: B Object ( [b:private] = 2 [a:private] = 1 ) Or B Object ( [b:private] = 2 ) I prefer the first one! But both could be correct!! Actual result: -- Notice: serialize() [function.serialize]: a returned as member variable from __sleep() but does not exist in __FILE__ on line 14 B Object ( [b:private] = 2 [a:private] = 1 [a] = ) -- Edit bug report at http://bugs.php.net/?id=45199edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45199r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45199r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45199r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45199r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45199r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45199r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45199r=needscript Try newer version:http://bugs.php.net/fix.php?id=45199r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45199r=support Expected behavior:http://bugs.php.net/fix.php?id=45199r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45199r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45199r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45199r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45199r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45199r=dst IIS Stability:http://bugs.php.net/fix.php?id=45199r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45199r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45199r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45199r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45199r=mysqlcfg
#33452 [NEW]: date('Y-W', strtotime('2005-1-1')) returns '2005-53'
From: mehran20 at hotmail dot com Operating system: winXP PHP version: 4.3.10 PHP Bug Type: Date/time related Bug description: date('Y-W', strtotime('2005-1-1')) returns '2005-53' Description: Well I've seen so many bugs reported in this discussion, but not exactly this one. The fact is, it's not a bug, more like a defect. Date function lacks a format to return the year when used with 'W'. For example mySQL has '%X' for function date_format. Reproduce code: --- date('Y-W', strtotime('2005-1-1')) Expected result: 2004-53 Actual result: -- 2005-53 -- Edit bug report at http://bugs.php.net/?id=33452edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33452r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33452r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33452r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=33452r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=33452r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33452r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33452r=needscript Try newer version: http://bugs.php.net/fix.php?id=33452r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33452r=support Expected behavior: http://bugs.php.net/fix.php?id=33452r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33452r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33452r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=33452r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33452r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=33452r=dst IIS Stability: http://bugs.php.net/fix.php?id=33452r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33452r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33452r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33452r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33452r=mysqlcfg