Matt points to a PHP script that uses shm memory to cache data.
I rather use the filesystem to cache data – disk access is an order of magnitude slower than memory accesses but the operating system is generally clever about caching filesystem reads in memory. I would presume that the algorithms used are more complex than can be practically achieved by a PHP script too.
AFAIR, Apache has problems with Shm segments too although that could be something I remember from long ago!
Tag Archives: PHP
Building Rich DHTML User Interfaces Revisited
This post by John Lim is a must-read for any web developer looking to develop a “rich client” on their sites.
He lists several tools and libraries to help in the process and I really like the look of JPSpan although it looks like I need to download it from the sourceforge CVS as there’s no tarball yet. I must have a play with it later as XmlHttpRequest looks dead useful!
Plethora of PHP stuff
Tony Marston has several PHP articles on his site..
There’s more but I haven’t around to looking through the site yet!
PHP, MySQL, and Smarty Programming
Looks like a very basic introduction and tutorial on using PHP and related technologies. Worth reading for the newbies!
Mach-II for PHP: A Preview
Here’s a preview of Mach II, a framework for PHP, “using standard OO techniques”. To look at later..
SQLite – The Swiss army knife of data storage.
Here’s a lengthy article on SQLite! That’s something I really need to look at!
Bah.. link is dead. Grrr.
Apache ForceType application/x-httpd-php and PHP CGI
To display “static” pages here I use the Apache “ForceType” directive so that all requests to /pages/something get processed by a php file called “pages”. Unfortunately that doesn’t work as easily when PHP is running as a CGI.
I found a possible solution in this Textpattern forum thread. Not sure if you can put “ScriptAlias” into a .htaccess file. I just checked and no, you can’t. That limits the usefulness of this solution dramatically!
Here’s how to use PATHINFO to create search engine friendly URLs. Again, it uses the ForceType idea.
Looks like it’s worth perceivering with mod_rewrite after all!
Calendar Script Tutorial
Here’s a nice way of adding a calendar graphic to your website – use the background= attribute of html to fool the eye!
Savant : GettingStarted
Savant is another PHP templating engine. Here’s the getting started guide, with a nice Model-View example.
PHP best practices
These guidelines are probably worth a read no matter what your favourite language is. Many are PHP specific but I’m going to digest some of the more appetizing ones. (you can tell it’s almost lunchtime can’t you?)