For the first time ever Apple failed me. A PHP horror story on mac os x.

Earlier today I was on the verge of smashing my macbook pro keyboard. I lost one whole day trying to make mssql support work on php5.

Apple ships a working php5, but obviously without any support for mssql. So I had to rebuild php from scratch.

I battle for 2 hours trying to compile freetds, then I discovered the latest version of freetds doesn’t work with php5.

When I finally compiled freetds I discovered the infamous iconv bug that doesn’t allow php to compile on mac os x with iconv support. I disabled iconv, and it compiled.

I was not finished though: apple shipped apache doesn’t want any recompiled PHP, so I had to recompile apache too.

When I thought it was all ok I discovered that symfony needs iconv so I threw all away and installed Macports (now I have macports and fink), and am trying to compile php5.

Wish me good luck.

4 Responses to “For the first time ever Apple failed me. A PHP horror story on mac os x.”

  1. Scott Baetz Says:

    how did it go?

    I’m about to begin this same process… did you ever get it to work?

    Thanks,

  2. Giovanni Intini Says:

    Scott I am running only on macports now, it was the wisest thing to do.

  3. Scott Baetz Says:

    Giovanni,

    Phew, it was a rough 48 hours, but I was finally able to get this to work. Turns out that for leopard server you need to compile the 0.64 freetds – with proper parameters, recompile php, and for that matter apache into a 32 bit variant, as the mssql libs are not 64 bit.. urgh..

    If I had a desktop and this wasn’t server grade, I would’ve followed macports.

  4. Giovanni Intini Says:

    I feel for you :)