Skip to main content.

Archives

This is the archive for September 2005

Sunday, September 25, 2005

NAJAX is a PHP Ajax framework. Not only does it look easy to use, it also appears to have well-written and well-documented code.

One of the examples is a PHP Exam. I managed to score only 7 out of 12. A list of my errors in in the extended section of this article.

Recent PHP versions offer a mysqli extension instead of the old mysql extension. Since Nucleus relies on the mysql_xxxx functions, it won't run when those are unavailable.

A database abstraction layer would be the ideal solution, but will take a long time to implement correctly and break most of the currently available plugins. Luckily, there is a workaround which works rather well: defining fake mysql_ methods that delegate the work to the new mysqli_ methods. This way, you can keep running the Nucleus core and most plugins.

Update 2005-09-28: These changes made it into CVS

Tuesday, September 20, 2005

After discovering about the debug_backtrace function (PHP >= 4.3.0); I was thinking about how wonderful it would be to attach a customized error handler to Nucleus when running in debug mode. This handler could output a stacktrace, which would be much more helpful than a message a la "Tried to call a method on a non-object at code.php line x" when this line of code is buried deep into the code.

Unfortunately -- as I discovered the hard way -- the error handler function that is passed to set_error_handler is never called for fatal errors. This behavior is listed in the manual, but I only bothered to read it carefully once things didn't quite work as expected. The reason why these fatal errors cannot be trapped is that the engine might not be in a stable state. Bummer. An extra class of errors (fatal unless trapped) would certainly be welcome.

Sunday, September 18, 2005

In this article, I'm re-creating the example from the Friendly Forms post using HTML_QuickForm (a PEAR package) and the Smarty template engine. I'm also looking into how to easily distribute PEAR with your application.

Monday, September 05, 2005

From the inbox:

Hi, I wrote an italian installation guide. I'm going to close my site if you are interested about it you can download it from ...

Best Regards, Elena.

I'm posting this document here, so it doesn't get lost: Italian Installation Guide for Nucleus CMS