TIP: Get rid of “It is not safe to rely on the system’s timezone settings.”
April 8, 2010 by Reboot · Leave a Comment
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
; Copy this line into the php.ini
; http://php.net/manual/en/timezones.php
date.timezone = “Europe/Amsterdam”
Zend Code Generator on Google Code
September 17, 2009 by Reboot · 4 Comments
I started a project to create a zend code generator. It’s a pretty basic 3 layer model that it generates right now, tests included. Take a look at http://code.google.com/p/zend-code-generator/
Quick and Dirty RegEx Tester in Zend Framework.
August 19, 2009 by Reboot · Leave a Comment
1 public function indexAction()
2 {
3 Zend_Layout::startMvc();
4 self::getFrontController ()->setParam ( “noViewRenderer”, true );
5
6 $subject = $this->_getParam(“subject”,”");
7 $pattern = $this->_getParam(“pattern”,”//”);
8 $result = preg_match_all($pattern, $subject, $matches);
9
10 $form = new Zend_Form();
11 $subjectElement = new Zend_Form_Element_Text(“subject”);
12 $subjectElement->setValue($subject);
13 $form->addElement($subjectElement);
14
15 $patternElement = new Zend_Form_Element_Text(“pattern”);
16 $patternElement->setValue($pattern);
17 $form->addElement($patternElement);
18
19 $form->addElement(“submit”,”send”);
20
21 echo $form;
22 echo Zend_Json::encode($matches);
23 }
Thanks for the html conversion of this code:
http://www.phpdebutant.com
Regex Tutorial/Reference:
http://www.phpro.org/tutorials/Introduction-to-PHP-Regex.html
Google Favicon PHP Proxy.
July 9, 2009 by Reboot · Leave a Comment
A little code snippet to fetch and cache favicons via the google s2 favicon service.
It uses the PHP Zend framework to store and retrieve the favicons from a (MySQL) database …