01
In honor of this release's compatibility with nanoweb and the new SQLite PDO driver, I've written the first part of an article dealing with how to write your own virtual host control panel, or other embedded PHP servers.
You can build a PHP-CGI binary for 1 platform, compile in PDO and SQLite (since sqlite is just a C client library and not a server), and ship it with nanoweb. Now you have a full Web application stack in only about 14 Mb (depending on what you throw into the php-cgi and how much you compile statically).
I've just added a new "live cheat sheet" to the http://cognifty.com/index.php/tutorial/ section. I've seen some other projects which have these so-called "cheat sheets", but the cheat sheet is simply a huge PDF. These PDFs usually show a graphical representation of the software system as a set colored blocks and arrows with tiny variables written inside the blocks. These variables are supposed to help you remember which functions are available at which points in the system.
How can we capture 404 errors in MVC frameworks? Apache always finds the index.php file that kicks off the MVC application. So, should a missing controller constitute an error at all? Is sending a 404 the "right" thing to do?
I've seen a lot of people talking about mysql_real_escape_string() vs addslashes() vs addcslashes(). There seems to be a lot of real confusion about what these functions do (even with the php.net manual around), especially when it comes to character sets. I feel that some people are being scared into using some escaping methods with which they are not very familiar. So, I've decided to lay it all out in a few charts so there is no confusion about what each function does and how each can help protect against SQL injection attacks.