Edit report at http://bugs.php.net/bug.php?id=52083&edit=1
ID: 52083
User updated by:darylp at qualtrics dot com
Reported by:darylp at qualtrics dot com
Summary:Fatal Error "Call to a member function * on a
non-object" occurring randomly
-Status: Feedback
+Status: Open
Type: Bug
Package:*General Issues
Operating System: CentOS 5.4
PHP Version:5.3.2
Block user comment: N
New Comment:
The development snapshot provided has been in place for two weeks on one
of our
production servers and we have not seen these errors since. We are
hesitant to put
a development snapshot on all of our production machines however. Is
there a
release schedule for PHP 5.3.4, and will the changes that fixed this bug
in the
development snapshot be released with it?
Previous Comments:
[2010-09-13 20:06:18] darylp at qualtrics dot com
We attempted downgrading one of our production webservers to PHP 5.2.14
3-4 weeks
ago and haven't seen these errors since on that server. We continue to
see the
issue with our other webservers running PHP 5.3.2. I think that's a good
indication that the problem stems from the version upgrade. We will be
trying the
latest version on one of our servers as suggested.
[2010-09-11 18:04:02] fel...@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
[2010-06-22 23:27:26] darylp at qualtrics dot com
Unfortunately, this issue is occurring only in our production
environment and is
occurring sporadically. It is happening in 2-5 minute bursts on a single
server
and across different functions. For most of the other 24 hours those
scripts are
running, there are no problems. We have not been able to correlate the
times the
error occurs with any events on our servers or traffic load. We will
continue to
attempt to reliably reproduce this issue and submit code when available.
Are there
any other suggestions on testing to be able to reproduce this?
[2010-06-15 16:04:25] pierr...@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
[2010-06-15 02:01:26] darylp at qualtrics dot com
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 this bug report at http://bugs.php.net/bug.php?id=52083&edit=1