in PHP 5, Reviews

First Glance: Apple’s Snow Leopard

For 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:


Frustrated with your company’s development practices?

You don't have to be!

No matter what the issues are, they can be fixed. You can begin to shed light on these issues with my handy checklist.

Plus, I'll help you with strategies to approach the issues at the organization level and "punch above your weight."

Powered by ConvertKit


  1. 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..


  2. For me, there was a php.ini file located here:


    I copied it (rather than moving it) in case I ever wanted to replace it.

  3. 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?

  4. 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.

  5. 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

  6. @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.

  7. Tady, your wordpress installation problems probably stem from the fact that WordPress doesn’t officially run on PHP 5.3 yet.

  8. 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?

  9. >> 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:
    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

  10. 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.”

    /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.

Comments are closed.