Posts Tagged ‘PHP’

  1. PHP and Date Errors

    If your use of the date() or similar function in PHP is throwing errors you may need to set your timezone in the php.ini file. Simply change it to you time zone, like so:

    date.timezone = "Europe/London"
  2. PHP5, GD and Mac’s

    Mac OSX has a handy installation of apache 2, PHP and all the good ness that comes with it. However, for reasons that escape me, it doesn’t have GD or any image manipulation library installed. So, to fix it I:

    • Found a new, handily packaged version of PHP5 for the mac from here
    • Commented out the PHP5 module in /etc/apache2/httpd.conf
    • Doubled clicked the package and installed
    • Restarted Apache 2, just in case

    And all was well – I now have the GD library.

  3. CodeIgniter Framework

    I’ve looked around again at the different PHP frameworks hat exist and have found my new favourite: CodeIgniter.

    I’ve tried using cakePHP before, and yes, it does have some pretty good documentation and does work well at some tasks like getting data out of your database very easily. I liked it, but could never get around the fact that all the database and MVC stuff had to conform to certain rules. CodeIgniter is a little bit different: you choose everything – do you want to use a database? Do you want to use a model? What do you want to call it?

    I find the flexibility much better; Just enough abstraction to be useful, but not too much as to be more confusing than helpful. Documentation is brilliant, with near enough everything described in detail and there are plenty of very helpful tutorials around to get you started. Overall it’s fast, easy to use and has plenty of supporting libraries that make putting things together a doddle.