JibberBook XML Update

I recently discovered a bug that occurred when simultaneous reading from and writing to the XML file was attempted that sometimes resulted in the deletion of all of the comments. Pretty serious I’d say, which is why I’ve been working hard to patch it. You can download the Comments class directly and place it in the ‘inc’ directory, or you can find it in the main package.

I used PHP’s flock(), or file locking, method to fix the problem. It’s a few milliseconds slower, but it’s worth not losing all your comments! If you don’t plan on extending the Comments class at all, it can be optimized to read quicker by saving the results in the constructor function.

As this has nothing to do with JibberBook’s core, its version number will remain at 2.0.

3 Responses to “JibberBook XML Update”

  1. Chris

    Sorry, but this comments.php is bugy. The JibberBook is a fine program only this works not yet.

    I hope you can solve the problem. ;) thank you. here the ERROR:

    Fatal error: Class ‘SimpleXMLElement’ not found in /usr/export/www/vhosts/jibberbook/inc/comments.php on line 165

  2. Chris

    JibberBook requires PHP5. SimpleXML, for example, is not available in PHP4.

  1. simply24 » Blog Archive » JibberBook XML Update
    Pingback on November 7th, 2007 at 12:24 am

Leave a Reply