Architecture by Hand (an OmniGraffle Stencil) Create whiteboard-style information technology workflows and diagrams with this custom stencil for OmniGraffle. Includes iconography for networks, storage, devices, applications and document types. $4.99 w/ free updates
Blog Post

Fixing PHP Timezone Issue in Snow Leopard (10.6)

by Jonathan Brown on September 5, 2009

in code, programming

I always forget about my PHP development environment when I upgrade OS X.  Apple must think it’s really funny to make developers figure out what’s changed and how to fix it.  Snow Leopard brings us PHP 5.3, which apparently requires a value in the date.timezone setting or your code will produce warning messages.  Unfortunately, this value isn’t set in the php.ini file shipped with 10.6.  Here’s how to fix:

  1. Open Terminal
  2. Run this command to rename the php.ini.default file to php.ini:  mv /etc/php.ini.default /etc/php.ini
  3. Open the new php.ini file in vi (or other editor if you wish) with superuser: sudo vi /etc/php.ini
  4. Search for the date.timezone key and set it to your timezone.  Mine is America/New_York.  You can find a complete list here.
  5. Save the php.ini file.
  6. Restart Apache with this command:  sudo apachectl restart
  • Share/Bookmark

Related posts

blog comments powered by Disqus

Previous post:

Next post: