First Glance: Apple’s Snow Leopard
August 28th, 2009 @ 8:00 pmFor those who like the newest in development tools, Apple has surely delivered with the Snow Leopard operating system upgrade.
Apple has compiled PHP 5.3, including many of the extensions they forgot in the PHP 5.2.x version included with Leopard. This includes GD, and the MySQL Native Driver (mysqlnd) that is available in PHP 5.3. They’ve also compiled Subversion 1.6.2, and Apache 2 is included as well (2.2.11).
It does not appear that MySQL is included with Snow Leopard, though. PHP also does not have a configuration file, resulting in a warning being emitted by PHP about the timezone not being set. These are relatively easy problems to correct, though I have not tested the full MAMP stack for compatibility with products such as WordPress or web2project.
Here’s a copy of the Apple ./configure line for PHP:
The original work of Brandon Savage.
No related posts.
Categories: PHP 5, ReviewsTags: , Apache, PHP, php 5.3, Snow LeopardKyle, you’ll want to copy the distribution php.ini file to the /etc directory and then edit the line date.timezone to your appropriate timezone.
See the timezone database (http://us3.php.net/manual/en/timezones.php) for the correct way to specify your timezone.
Hi Brandon, sorry for the stupid question, but where is the distribution php.ini file located? i tried to copy the php.ini.default file in /etc to php.ini but this had the knock on effect of disabling php altogether..
thanks
For me, there was a php.ini file located here:
/usr/local/php5/lib/php.ini-recommended
I copied it (rather than moving it) in case I ever wanted to replace it.
Anyone tried to install APC (Alternative PHP Cache) extension? I’ve tried some of the most recent versions but i got some strange and different compile errors while performing “make”. Maybe there might be some ./configure flags missing. Anyone?
I haven’t, but to be fair I typically don’t install APC on my development machines.
Make sure you’ve upgraded your Xcode installation (it’s on the Snow Leopard disk) because that’s not automatically installed, even if you had it installed for Leopard.
This is the first site that I’ve come across that really talks about Snow Leopard and PHP 5.3.
The timezone error kinda difficult to fix. The doc page for timezones says to add it in this format in the ini “America/New_York” which didnt work for me in the ini, it did work when using thedate_default_timezone_set() function. What worked was to define it like such in the ini:
date.timezone = Etc/GMT-5
Hiya Brandon,
I posted this on the Apple and WordPress Forums today:
http://wordpress.org/support/topic/306878
But for lack of having a blog of my own, I thought you might like to re-post it. It answers all these points and more of the MySQL install.
Cheers,
T
@Dave
His may have been in /usr/local/php5/lib/php.ini-recommended, but mine was /etc/php.ini.default from a fresh install of Snow Leopard.
Tady, your wordpress installation problems probably stem from the fact that WordPress doesn’t officially run on PHP 5.3 yet.
I upgraded to SnowLeopard and it killed my MySQL, PHPMYADMIN and APACHE. I think the PHPMYADMIN doesn’t work just because APACHE no longer functions. So, I installed MAMP. This gets it working, but I think it isn’t the same. I want my native Snow Leopard Apache and MySQL install to function on it. Realistically, the Apache seems to be my biggest problem. How do I reinstall this from scratch? From the install disc?
>> For me, there was a php.ini file located here:
>> /usr/local/php5/lib/php.ini-recommended
I just received a new iMac with Snow Leopard. I see references to php being in:
“usr/local”
Within my root level’s directory, “usr” there is *no* php5 (unlike my Powerbook with Tiger). [ even using TinkerTools to turn "hidden" files visible ]
I also read online that that is where mysql should be.
Why would I have no “local” directory? – and where else would php and/or mysql be?
Many thanks for any guidance you can provide. —richard
Richard, Apple should not install anything to /usr/local . Possibly, Brandon did his own installation / upgrade of PHP at some point?
“The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.”
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY
http://hivelogic.com/articles/using_usr_local
/etc/php.ini.default is the correct place for it, and the PHP lives at /usr/lib/php/ as one would expect.
WordPress already supported PHP 5.3 before 9/2/2009.
Lots of great information here otherwise.
Web developer, amateur photographer, traveller, and amatuer chef. Expect to find me writing code, visiting new places or trying a new recipe. I live with my wife in Olney, Maryland. Follow Me On Twitter!- Excited About PHP Again
- Rethinking The Technical Resume
- We The State, Not We The People
- Working To Defeat the Stop Online Piracy Act
- Diversifying This Blog
- What do you want the web to be?
- Why I Love Being An Engineer
- Validation Blind Spots Hurt Real Users
- Finding A Job Without A Recruiter
- Why Recruiters Are Bad For Your Career




Exactly how do you fix the timezone issue? I can’t seen to figure it out