3 Replies Latest reply on Sep 7, 2009 10:43 PM by MartinBrändle

    PHP API crashes httpd when running under PHP 5.3.0 (Snow Leopard)

    jnouwen

      Summary

      PHP API crashes httpd when running under PHP 5.3.0 (Snow Leopard)

      Description of the issue

      This is both a bug report and a warning to other devs. After upgrading to Snow Leopard on my work machine, I'm having httpd crash whenever attempting to load a page on our site that makes use of the PHP API. For reference, httpd is running as a 64-bit process.The problems are all in FileMaker/Implementation/Parser/FMResultSet.php; the rest of the API files seem to be ok.Through selective code removing, I've narrowed down at least one line that causes crashes, but there are others and didn't feel like tracking them all down. This is line 80 in the setResult() function:$V4a8a08f0 =& new $V561b2299($Vb4a88417->_impl->_layout->getRelatedSet($Vaca007a7));Here's the top chunk of the crash log:Thread 0 Crashed:  Dispatch queue: com.apple.main-thread0   libphp5.so 0x0000000101342ab5 ZEND_SWITCH_FREE_SPEC_VAR_HANDLER + 711   libphp5.so 0x00000001013254d8 execute + 5882   libphp5.so 0x00000001012f8da6 zend_call_function + 18373   libphp5.so 0x00000001012f910d call_user_function_ex + 764   libphp5.so 0x0000000101302fb3 zend_error + 12245   libphp5.so 0x00000001012d73d3 zendparse + 80596   libphp5.so 0x00000001012da4c8 compile_file + 2387   libphp5.so 0x000000010117e37f phar_compile_file + 8488   libphp5.so 0x000000010132ea2b ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER + 5089   libphp5.so 0x00000001013254d8 execute + 58810  libphp5.so 0x0000000101302284 zend_execute_scripts + 37611  libphp5.so 0x00000001012b5cf6 php_execute_script + 70512  libphp5.so 0x000000010137cf74 php_handler + 1237And here's the kicker: if I turn off PHP's deprecation warnings (via E_ALL & ~E_DEPRECATED), then no crashes occur. Use of =& has been deprecated in PHP 5.3.0, and what seems to be the cause of the crashes here is they're stacking up and overwhelming httpd ... maybe. If I replace all the instances of =& with = in FMResultSet.php, which is the prescribed fix for the deprecation, then no crashes occur even with the deprecation warnings re-enabled. The interesting bit is that it's only that one file that was causing the crashes. There's lots of usage of =& in our solution, including other PHP API files (that all need to be fixed to make it 5.3.0-compatible), but they're fine.Has anyone else experienced similar problems, and are there any plans for an official PHP API update that properly supports PHP 5.3.0?- Jeff