From: Operating system: CentOS 5.4 PHP version: 5.3.2 Package: *General Issues Bug Type: Bug Bug description:Fatal Error "Call to a member function * on a non-object" occurring randomly
Description: ------------ We have several servers running PHP 5.3.2 on CentOS 5.4 and a few on PHP 5.2.9 on FreeBSD. Reviewing our error logs, I have noticed a pattern of fatal errors: "Call to a member function * on a non-object". This occurs usually daily, and sometimes several times a day. When it occurs, it occurs on a single server, several times over a 2-3 minute span, and across different PHP sessions and occurs in different functions in different classes. This issue does not seem to coincide with high traffic or with time of day. This issue has occurred on each of the webservers running CentOS, although I have noticed it occurring over several releases of PHP. There are no other fatal PHP errors that occur concurrently, nor are there any other external processes that are occurring concurrently. The only thing I can suspect is PHP garbage collection improperly deleting objects, although debug_zval_dump() shows the object correctly constructed and never destructed prior to calling a member function. After seeing this error occur on several functions in various classes, I picked one and added code to check is_object() and email me the results of debug_zval_dump() when false. Although is_object() returns false, the dump of the object shows the following: if (!is_object($this->flow_info)) { debug_zval_dump($this); } output: object(SEFlow)#13 (10) refcount(5){ ... ["flow_info"]=> object(FlowInfo)#14 (4) refcount(1){ ... Calling a function: $this->flow_info->getElementsUnderBranch(__MAIN_BRANCH, false); results in the fatal error: Call to a member function getElementsUnderBranch() on a non-object in /var/www/Qualtrics/Qualtrics/SurveyEngine/Flow/Flow.php on line 186 -- Edit bug report at http://bugs.php.net/bug.php?id=52083&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52083&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52083&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52083&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52083&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52083&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52083&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52083&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52083&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52083&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52083&r=support Expected behavior: http://bugs.php.net/fix.php?id=52083&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52083&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52083&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52083&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52083&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52083&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52083&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52083&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52083&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52083&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52083&r=mysqlcfg