Re: [PHP-DEV] Intermittent problem: can't write to properties of $this
On Thu, October 21, 2010 6:04 pm, Tim Steiner wrote: Greetings, I'm currently trying to troubleshoot an intermittent problem on one of our servers. After some time of running just fine (usually a couple of hours), scripts will start throwing the warning Attempt to assign property of non-object when writing to a property of the $this object. Once it starts, it seems to keep happening every few requests (with other requests running as expected). The poster at http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/warning-attempt-assign-property-non-object-zend_config-5469.html seems to be having the same issue. I've traced the warning output to line 576 of Zend/zend_execute.c, which means that something is happening to the write_property of the object. At this point, I don't have enough knowledge of the internals to continue tracking this bug down. Any help would be appreciated. Try dumping out the value of $this or your variable or the moral equivalent in C, and see exactly what it *IS* that you are trying to set a property on... Once you figure that out, you can often realize how you managed to get in this state of existence, or at least start backtracking to see how that value got in there in the first place. It probably is in Userland code, with something that you think should persist but actually doesn't... A resource, session data, an object that got destructed and is now GC-ed, etc are the usual suspects. In particular, if you have any register_shutdown_function or destructors on your classes, note that PHP does *NOT* guarantee any particular order of destruction, nor even consistency of the same from request to request. Once your server gets busy, GC may be kicking in more, and objects you think are still valid in a destructor probably aren't -- they're halfway torn apart by PHP as it shuts down the script. PS Don't try to use echo in a destructor nor shutdown function. http://php.net/error_log is your friend. -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclickhosted_button_id=FS9NLTNEEKWBE -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Intermittent problem: can't write to properties of $this
On Thu, Oct 21, 2010 at 5:04 PM, Tim Steiner tstei...@nerdclub.net wrote: Greetings, I'm currently trying to troubleshoot an intermittent problem on one of our servers. After some time of running just fine (usually a couple of hours), scripts will start throwing the warning Attempt to assign property of non-object when writing to a property of the $this object. Once it starts, it seems to keep happening every few requests (with other requests running as expected). The poster at http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/warning-attempt-assign-property-non-object-zend_config-5469.htmlseems to be having the same issue. I've traced the warning output to line 576 of Zend/zend_execute.c, which means that something is happening to the write_property of the object. At this point, I don't have enough knowledge of the internals to continue tracking this bug down. Any help would be appreciated. Tim, this sounds much more like a typical userspace issue than an internals one. You might have better luck getting help if you start out on the php-general list. -nathan
[PHP-DEV] Intermittent problem: can't write to properties of $this
Greetings, I'm currently trying to troubleshoot an intermittent problem on one of our servers. After some time of running just fine (usually a couple of hours), scripts will start throwing the warning Attempt to assign property of non-object when writing to a property of the $this object. Once it starts, it seems to keep happening every few requests (with other requests running as expected). The poster at http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/warning-attempt-assign-property-non-object-zend_config-5469.html seems to be having the same issue. I've traced the warning output to line 576 of Zend/zend_execute.c, which means that something is happening to the write_property of the object. At this point, I don't have enough knowledge of the internals to continue tracking this bug down. Any help would be appreciated. Thanks! Tim Steiner tstein...@unl.edu Relevant Server Specs: Red Hat Enterprise Linux 4 Apache 2.0.52 PHP 5.3.3 compiled from source with configure line at http://pastebin.unl.edu/1487 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php