Skip to content

Instantly share code, notes, and snippets.

@nolim1t
Created June 23, 2009 04:21
Show Gist options
  • Save nolim1t/134353 to your computer and use it in GitHub Desktop.
Save nolim1t/134353 to your computer and use it in GitHub Desktop.
Adding new PHP extensions to Mac OS X as well as building pdo_mysql
OS X PHP Extensions directory (Useful for installing addons)
/usr/lib/php/extensions/no-debug-non-zts-20060613
Installing PDO Mysql on OS X
1. Download and install MySQL 5.0 Downloads
2. cd /usr/local/mysql/lib
3. sudo ln -s . mysql
4. cd
5. Download PDO_MYSQL-1.0.2.tgz
6. gunzip PDO_MYSQL-1.0.2.tgz
7. tar -xvf PDO_MYSQL-1.0.2.tar
8. cd PDO_MYSQL-1.0.2
9. phpize
10. LDFLAGS='-arch x86_64' ./configure --with-pdo-mysql=shared,/usr/local/mysql
11. make
12. sudo make install
13. In /etc/php.ini, add “extension=pdo_mysql.so”. You might have to copy php.ini.default to php.ini first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment