I stumbled on this handy function this morning when putting together a form that required a valid date (example: 02/30/2011 would not be valid because there are not 30 days in February). Very simple and useful!
checkdate ( int $month , int $day , int $year )
Checks the validity of the date formed by the arguments. A date is considered valid if each parameter is properly defined.
I recently ran into a situation where there were two versions of PHP on a server and I needed to make sure PHP 5 was being used. To pick the version – all you need to do is add the following into your .htaccess file (assuming you do not have access to your httpd config):
For PHP 5:
AddType application/x-httpd-php5 .php
For PHP 4:
AddType application/x-httpd-php4 .php
It does not get much more easier than that!
I learned an important and valuable lesson today. Before committing code to a live server, always run: php – l filename.php to check for syntax errors if you cannot view the file beforehand. Enough said.
Finally after two years of contemplating the updates to Apache 2.x, MySQL 5.x, and PHP 5.x, I finally updated my server to the latest version os Apache, MySQL, and PHP. I was not too concerned about custom work or any of my WordPress sites, but I was concerned XOOPS and/or XOOPS modules would have some problems, but it is now a week later and everything is running smoothly. Why finally? Well, as of the end of this month, support for PHP 4 will be discontinued. Better late than never. Time to update your servers too?
I just finished a four day live training session on PHP. I have to say – our instructor was very informative and patient. I learned quite a bit about PHP, object oriented programming, and most importantly – security. If you are ever looking for some PHP training, definitely consider PHP Architect training.
My online PHP training is now complete. I feel like I learned quite a bit and am ready to start tackling some exciting projects I have in my queue. Not only did I learn about some good practices, I also finally made time to look at some development environments. After some comparisons, I have choosen to play around with Komodo IDE Active State also offers a free editor called Komodo Edit if you are interested in a simple bare bones editor. If you are at all curious about Komodo IDE, be sure and check out the free Discover Komodo IDE 4.webcast.
What do I like about it?
- Syntax checking
- Clean interface
- Plays nice with subversion
I have to say I am enjoying the PHP Essentials training a lot more than I had originally thought. I am learning quite a bit and ended up working on my “homework” last night for a few hours. I have never had any formal training so it is nice to have someone start from the beginning to make sure I have a solid foundation. At the end of the month, I am going to also be taking the PHP Full Immersion class. If you are interested in getting some formal PHP training, I highly recommend PHP Architect training.
Today was my first day of PHP Training offered by PHP Architect. I am looking forward to having some formal training so I can improve on what I already know and use on a daily basis. I am hoping that by the end of this training session which will be completed by the end of February that I will be ready to tackle some big projects I have been thinking about for awhile. I will update everyone on how it is going in the next few weeks. As for the Super Bowl last night…well – at least we still have the possibility of the 2016 Olympic bid.
After working with Ben for almost eight years he had decided to move on. I wanted to wish Ben all the luck in the world. We had a great time working together for many years…as he put up with my on again off again relationship with Mac OS X Server and I put up with his “not as funny as he thought” videos and comics We also had a good time playing Carmageddon 2, Diablo, Diablo II and Quake 3 Arena. We did do some great work in between all the games and great music (I got him out of the “ambient” music mode and opened the door to electronica, DJs, etc). We did do a kick ass job of putting together a really sweet Mac OS X/Mac OS X Server server set up using Apache, MySQL, PHP, WebObjects complete with failover. Best of luck and thanks for the good times.
What a crazy and full weekend! Many thanks to Demitrious for helping me out this weekend with PHP. If you are a beginner, check out Demtrious’s article: Poor Man’s Debugger. This article helped me greatly over the past weekend and I feel like I now have a good handle on what to do when things go unexpectedly.
Go PSU and Bears!