Category Archives PHP

While working with PHP 5.3 scripts, you may have run into an error that tells you you need to set the time zone for PHP 5.3.0.  This might happen when upgrading or installing a CMS or other script in your hosted or local web environment. A comment error message I've run across several times when working with MODX, SilverStripe, Processwire, etc. is:

date.timezone option in php.ini must be set in PHP 5.3.0+
Another common error message is:
To use PHP 5.3.0+, you must set the date.timezone setting in your
In this brief post I'll describe a couple of different ways to deal with this.

If you're a PHP programmer and or have some interest in the Zend framework, you've probably run across Jon's name or heard his voice over at Zendcasts, where he produces and shares video tutorials/podcasts covering all aspects of the Zend Framework and PHP. He has also produced more video tutorial series over at KillerPHP, including a PHP Shopping Cart, Wordpress themeing, Advanced PHP, and more. jonlebensold11. Hi Jon, can you tell us a bit about yourself? Where do you live, what do you do for a living, etc. I'm a web developer living in Montreal, Quebec (that's in Canada). I spend most of my days working on web applications as a freelancer and managing a website I started called Zendcasts. Zendcasts is a collection of online training materials centered around Enterprise PHP development. I'm also a member of the Bahá'í community and I maintain a blog at

Part 0: Introduction Part 1: Write and Test the PHP Script Part 2: Create the Snippet Part 3 – MODx API, Placeholders, Chunks In the fourth part of this brief series on creating a custom MODx Evolution snippet, we're going to do some optimizing to make our snippet a little more efficient.  So far the snippet seems to be working as expected and is pulling in the feeds as needed.  However, it's a little inefficient.  The way things are set up now, every time someone refreshes the page, the script fetches a new copy of the rss feed from the coding pad, or whatever source you're pulling your feeds from. If you have a heavily trafficked site where people spend a lot of time on your site and visit many pages (thus, for example, constantly refreshing your snippet call in the sidebar), this can be resource heavy on both your side slowing your website down, and also on the web server that you're pulling the feeds from.  We can mitigate this by implementing caching.