Installing the MSSQL module in MAMP under Mac OS X Lion

This was a big challenge and after much reading and recompiling this is what finally worked for me.

My environment: MAMP 2.0.5 running php 5.3.6

credit: http://blog.benjaminwalters.net/?p=10 troubleshooting help came from: http://www.robert-gonzalez.com/2009/02/18/building-the-php-ms-sql-server... http://tomasztomczyk.com/blog old reference: http://www.tumblr.com/tagged/mssql+mamp+php+mac+osx

Install FreeTDS

  • Create the directory /usr/local/freetds
  • Download freetds - the .82 version worked for me: ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/old/0.82/freetds-0.82.tar.gz
  • Open a terminal window
  • Untar/zip the freetds file and cd into that directory in terminal
    i/e cd ~/Downloads/freetds-0.82
  • paste this in terminal
    ./configure --prefix=/usr/local/freetds --sysconfdir=/usr/local/freetds/conf/freetds --disable-libiconv --disable-odbc
  • type "make" and press enter
  • type "sudo make install" and press enter
    Enter your password
  • You're done with freetds.....

Compile PHP

  • Download and untar/zip the latest source (http://php.net/downloads.php)
  • Cd into the php directory in terminal
    i/e cd ~/Downloads/php-5.3.14
  • Configure PHP
    Type "./configure" and press enter
    Type "make" and press enter
  • Go into the mssql extension directory
    i/e cd ~/Downloads/php-5.3.14/ext/mssql
  • phpize it! (type phpize)
  • Configure mssql to run with freetds
    Type
    ./configure --with-mssql=/usr/local/freetds
    and press enter
  • open a text editor and edit the file: ~/Downloads/php-5.3.14/ext/mssql/php_mssql.c
    change line 181 from PHP_FE_END to {NULL, NULL, NULL}

  PHP_FE(mssql_guid_string,			arginfo_mssql_guid_string)
	PHP_FE_END
};

  PHP_FE(mssql_guid_string,			arginfo_mssql_guid_string)
	{NULL, NULL, NULL}
};

  • go back to terminal - you should be in ~/Downloads/php-5.3.14/ext/mssql
  • Type "make" and press enter
  • Open finder and go to the mssql module directory (~/Downloads/php-5.3.14/ext/mssql/modules/)
  • Copy mssql.so to the extension directory of your php installation
  • MAMP on my machine is located here /Applications/MAMP/bin/php/php-5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
  • Drag a copy of the mssql.so into this folder (there should be a bunch of other .so files)
  • Go up a few directories to /Applications/MAMP/bin/php/php-5.3.6/conf/php.ini and open it.
  • Search for "extension="
  • Paste "extension=mssql.so" on the line below the other extensions
mine looks like this after editing:

    ; Extensions

;extension=apc.so

extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so
extension=mssql.so

Restart MAMP... Test it!!!!!

raising the dead

thinkinkless.com was sporting a super simple page that just read "back later..." for the last few weeks.
The ill-advised test install of a drupal 7 pre-alpha version I loaded up last summer finally blew up, and today I finally did something about it.
Porting all the old posts over was - well - superfun.

Now we're legit, and using git!

do you belieb?

it's that time of year again... do you belieb?

http://bit.ly/h0oXhG

happy V.D.
suz

yay for drupal 7

welcome to the new and improved thinkinkless.com -- upgraded yesterday from drupal 5 to drupal 7.
ok that's enough talking for today.

happy VD - retard love

347,144 and counting

Michael Jackson died.
Within 24 hours we built and launched a custom application for him that lives on a cloud.
It gets about 100 posts per minute. As of this moment the app contains 347,144 memories from Michael Jackson fans worldwide...
and a crapload of spam.
and a lot of posts from disturbed individuals.

http://www.michaeljackson.com/

I heart the Jackson 5 on vinyl.

ps this is the first thing not Drupal I have worked on since i can't remember when.

Drupalcamp in the NY Times

Sony's global drupal sites

We have a pile of global sites now - many more to come...

P!nk
http://www.pinkspage.com

Beyoncé
http://www.beyonceonline.com

K-Fed's ex-wife
http://www.britney.com

Mr. Legend
http://www.johnlegend.com

Kelly Clarkson
http://www.kellyclarksonweb.com

Happy VD! Be mine....

It's that time of year again!

Be Mine

http://www.thinkinkless.com/happy_vd/vd2009.html

happy V.D.

greatest hits: http://www.thinkinkless.com/happy_vd/index.html

Drupalcon DC + happy belated!

I want to call it ObamaCon.
Drupal turned 8 yesterday. Wow.
My dog is older than Drupal.

Pages

Subscribe to think inkless RSS