From: Operating system: PHP version: 5.3.5 Package: MySQL related Bug Type: Bug Bug description:with multiple Mysql Links, data disappears/reappears
Description: ------------ [please note: actually, this problem occurs with 5.3.3. I have currently no option to upgrade the php package. ] I am working with two mysql links. Basically, I observed that with entering another block / STACK frame, previously retrieved data disappears , upon return it re-appears. It is no SCOPE problem, because the problem goes away when working with just one mysql database link. Long story: There is some small amount of data retrieved from the first link, which is put into an array ( instance member $this->a ); Then, *inside* an switch-block the array is missing its elements retrieved from the database. But after the switch-block the array is intact again .. !! After years of PHP coding I never had such a case. Very curious indeed. I tried two workarounds: 1. copy the array into $_SESSION 2. convert the array via print_r ($a, true) to a string The truly NASTY thing is, even with option #2 the resulting string changes during the switch statement (looses data) - and is intact again afterwards. The same effect when calling an instance method: elements retrieved from the first database link have disappeared. The problem is only with data retrieved from the first mysql link. Helpful workaround: when I move the table from the first database to the second database (i.e. just working with one mysql link), the problem disappears altogether. The VERY strange thing is, that the data even disappears/reappears when converted via print_r( $x, true) ... Actual result: -------------- -- Edit bug report at http://bugs.php.net/bug.php?id=54046&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54046&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54046&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54046&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54046&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54046&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54046&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54046&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54046&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54046&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54046&r=support Expected behavior: http://bugs.php.net/fix.php?id=54046&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54046&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54046&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54046&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54046&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54046&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54046&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54046&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54046&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54046&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54046&r=mysqlcfg