If you are looking for the epic motorcycle journey blog that I've written, please see the Miles By Motorcycle site I put together. 
  • Subscribe to this RSS Feed
  • (for PHP developers)PHP 5 Bug - losing $this var.
    01/12/2005 6:34PM
    This is additional info intended for the PHP developers.

    This has been submitted as bug: http://bugs.php.net/31525

    This may be related to the PHP 4.3.10 bug as it's occurring in the same general area as this bug. I've focused on this bug in PHP 5 because it's easily reproduced. The demonstrator file is located at:

    http://www.yml.com/uploaded_files/php_5_bug.tar

    Redhat 9, Apache 1.3.33, PHP 5.0.3 with the recommended php.ini with all warnings and messages turned on, using Apache 1.3.33 and running without PHP4 compatibility mode turned on will cause an object reference to get dropped after the object is constructed by calling a method that returns a reference to '$this'.

    Debug messages are included and the code is commented. Search for "PHP 5 BUG" in the code. See getAttributeValue() in fv_baseWidget, varLookupsATTRS() in fv_baseComponent.

    If you have any questions please use the Contact_Yermo form on the left.

    Output from test.php is:

    test.php:30 - before class includes

    test.php:30 - Creating fv_staticCtrl instance

    test.php:30 - fv_baseComponent Constructor: Before getAttributeValue() call. Type of 'this' is 'object'

    test.php:30 - fv_basewidget::getAttributeValue() - Object id #1 is 'object'

    test.php:30 - fv_baseWidget::getAttributeValue() - value 'Hello from varLookupATTRS' - type of parentComponent object is 'object'

    test.php:30 - fv_baseComponent Constructor: after getAttributeValue() call. Type of 'this' is 'object'
    Warning: Attempt to assign property of non-object in /usr/local2/WWW/mobie.yml.com/mobie/admin_ui/tests/php_5_test/base_component.php on line 125

    test.php:30 - After creating fv_baseComponent - currentComponent type is 'object'

    test.php:30 - fv_basewidget::getAttributeValue() - Object id #1 is 'object'

    test.php:30 - fv_baseWidget::getAttributeValue() - value 'Hello from varLookupATTRS' - type of parentComponent object is 'object'

    test.php:30 - after getAttributeValue() call - currentComponent type is 'unknown type'
    Fatal error: Call to a member function setName() on a non-object in /usr/local2/WWW/mobie.yml.com/mobie/admin_ui/tests/php_5_test/test.php on line 59


  • PHP 4.3.10 busy loop in Apache 1.3.33 under RedHat 9
    01/11/2005 10:26PM
    The joys of PHP. For not the first time and probably not the last, I've managed to get PHP to alternatively crash Apache or cause it to sit and spin at 99.9% CPU utilization. I've posted a bug report with the PHP group at:

    http://bugs.php.net/31508.

    I've also just submitted what may be a related bug:

    http://bugs.php.net/31525

    It's probably due to the classic core dump/malloc corruption do to calling a method through an undefined object reference as in:

    $obj1 = new someobject();
    $obj_mistaken->some_method();

    more times than not PHP will segfault on the above. About 1 in 10 it'll display the "no such object" message. I particularly enjoy the times that the $this reference gets dropped ...

    Update 2005-01-13: Configuring PHP with the --enable-debug option seems to prevent both the crash and the busy loop. You will probably want to turn off logging of messages in php.ini as your logfiles will grow extremely fast with --enable-debug.


  • Incredible tsunamic photos
    01/11/2005 3:56PM
    Carol sent me a link to some incredible tsunamic photos taken from the water as the waves were coming ashore:

    http://www.yachtaragorn.com/Thailand.htm


  • Hackers break into George Mason University
    01/10/2005 4:29PM
    If you know anyone who attended or works for George Mason University, you should let them know to watch their accounts carefully. Apparently they just had a major hacker break-in and steal something like 30,000 personal information files.

    More info in this article on news.com

  • Open Source Content Management
    01/09/2005 5:34PM
    A link from Ryan for when we open source MOBIE. See the mobie.biz site once I put it up.
    http://www.oscom.org/