Thanks to Wieden+Kennedy for indirectly sponsoring this post!
This is a brief explanation of how you might be able to get pdo_mysql working on Leopard (OS X 10.5.6 and 10.5.7) with the stock Apache installation, on an Intel-based Mac, while conveniently updating PHP as well. I was able to scrape this together from a few blog posts, mostly this one, and also some guess work.
You need to know what kind of processor you have in your Mac. To find out, go to "About This Mac" in the Apple menu.
Instructions for Intel Core 2 Duo (64-bit)
1. Make a backup copy of this file: /usr/libexec/apache2/libphp5.so
2. Download and install the x86_64 Mac package of MySQL from the MySQL website. If you already have MySQL installed you can safely skip this step.
3. Download and unzip the PHP 5.3.0 source code from the PHP website.
4. Open a terminal window and move to the unzipped directory, then execute the following commands.
MACOSX_DEPLOYMENT_TARGET=10.5 \
CFLAGS='-O2 -arch x86_64' \
LDFLAGS='-O2 -arch x86_64' \
CXXFLAGS='-O2 -arch x86_64' \
./configure '--prefix=/usr/local/php-5.3.0' \
'--with-apxs2=/usr/sbin/apxs' \
'--with-ldap=/usr' \
'--with-kerberos=/usr' \
'--enable-cli' \
'--with-zlib-dir=/usr' \
'--enable-exif' \
'--enable-ftp' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--with-iodbc=/usr' \
'--with-curl=/usr' \
'--with-config-file-path=/etc' \
'--sysconfdir=/private/etc' \
'--with-mysql-sock=/var/mysql' \
'--with-mysqli=/usr/local/mysql/bin/mysql_config' \
'--with-mysql=/usr/local/mysql' \
'--with-openssl' '--with-xmlrpc' \
'--with-xsl=/usr' \
'--without-pear' \
'--enable-pdo=static' \
'--with-pdo-mysql=/usr/local/mysql'
make
sudo make install
sudo apachectl restart
See below for instructions on how to finalize and test.
Instructions for Intel Core Duo (32-bit)
1. Make a backup copy of this file: /usr/libexec/apache2/libphp5.so
2. Download and install the x86 (not x86_64) Mac package of MySQL from the MySQL website. If you already have MySQL installed you can safely skip this step.
3. Download and unzip the PHP 5.3.0 source code from the PHP website.
4. Open a terminal window and move to the unzipped directory, then execute the following commands.
MACOSX_DEPLOYMENT_TARGET=10.5 \
CFLAGS='-O2 -arch i386' \
LDFLAGS='-O2 -arch i386' \
CXXFLAGS='-O2 -arch i386' \
./configure '--prefix=/usr/local/php-5.3.0' \
'--with-apxs2=/usr/sbin/apxs' \
'--with-ldap=/usr' \
'--with-kerberos=/usr' \
'--enable-cli' \
'--with-zlib-dir=/usr' \
'--enable-exif' \
'--enable-ftp' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-sockets' \
'--with-iodbc=/usr' \
'--with-curl=/usr' \
'--with-config-file-path=/etc' \
'--sysconfdir=/private/etc' \
'--with-mysql-sock=/var/mysql' \
'--with-mysqli=/usr/local/mysql/bin/mysql_config' \
'--with-mysql=/usr/local/mysql' \
'--with-openssl' '--with-xmlrpc' \
'--with-xsl=/usr' \
'--without-pear' \
'--enable-pdo=static' \
'--with-pdo-mysql=/usr/local/mysql'
make
sudo make install
sudo apachectl restart
Finishing up on ALL platforms
Take a look at your phpinfo(), and if all went well, you will see MySQL listed in the drivers under PDO. If it doesn't work, the bailout is to put the original libphp5.so back into place... you know, the one you backed up in step 1... you did back it up, right?
If you want to use the command-line executables, I recommend adding /usr/local/php-5.3.0/bin to your PATH environment variable before /usr/bin.
PHP CLI users: If you are getting this warning:
PHP Warning: PHP Startup: Unable to load dynamic library './pdo_mysql.so' - (null) in Unknown on line 0
Comment out the following line in /etc/php.ini:
extension=pdo_mysql.so
Friday, July 10, 2009
Wednesday, July 1, 2009
ant
An ant, *really* up close. You must see this. The level of detail is stunning.
So, what else of creation can we not see with just our own eyes?
So, what else of creation can we not see with just our own eyes?
Friday, June 19, 2009
motive
I think one of my greatest fears now is being a fraud, even in the slightest way, and not being aware of it at all.
I re-examine my motives, my actions, a million times over, and I run myself in circles and I'm still not satisfied.
What can solve this one?
I re-examine my motives, my actions, a million times over, and I run myself in circles and I'm still not satisfied.
What can solve this one?
Sunday, May 31, 2009
the struggle
I've been thinking a lot about The Struggle lately; that is, the spiritual war over all of us, how that affects us, and how we react to it.
How difficult is it to embrace the hard times and to receive the reward, the wisdom, that is waiting for us there? Very! Even though it's spelled out in so many ways for us (dear to my heart is James 1:2-3) it's often so difficult to execute.
He gave us lives to live, but the more I live that life, the more I'm aware that what is in the foreground is so auxiliary. Well, except for the people around you, who you have been called by God to love. (John 13:34) And of course what is love if it is not an active pursuit of the feelings and well being of that person?
When we become aware (again) that this life is stale, what are we to do but drop everything and dig in to the truth? I just cracked open the Word and I feel so much better. So, why is that always the case?
How difficult is it to embrace the hard times and to receive the reward, the wisdom, that is waiting for us there? Very! Even though it's spelled out in so many ways for us (dear to my heart is James 1:2-3) it's often so difficult to execute.
He gave us lives to live, but the more I live that life, the more I'm aware that what is in the foreground is so auxiliary. Well, except for the people around you, who you have been called by God to love. (John 13:34) And of course what is love if it is not an active pursuit of the feelings and well being of that person?
When we become aware (again) that this life is stale, what are we to do but drop everything and dig in to the truth? I just cracked open the Word and I feel so much better. So, why is that always the case?
Monday, May 25, 2009
wireless reading

Amazon probably wants you to believe they invented "wireless reading", but the truth is that we've been able to read things without wires attached to them for thousands of years!
Despite this, Amazon has brought something very important to the table, but it's definitely not the Kindle. It's the Kindle's electronic book format, which, with Amazon's broad publisher and distributor relationships, is quickly bringing a vast number of titles to a growing number of mobile devices.
The Kindle, at a mere $360, is a big and clunky additional device that you have to carry around with you. It can be forgotten at home just like a real book. I say thee nay!
The Kindle App for iPhone and iPod Touch costs $0. Oops. And I'm here to say, the pleasure of reading a book from the bright iPhone screen is immense. It is actually easier than reading from paper pages in a lot of lighting situations. You can pop instantly to the table of contents and then click a link to go instantly to a different section of the book. After a while reading from the iPhone, paper books start to feel heavy and very clunky.
Plus, imagine the satisfaction you will feel when you realize you left home without your book, but then realize you bought it for Kindle and you actually have it with you because you have your phone. Yay!
Saturday, May 9, 2009
efficiency: lose the bookmarks bar
I'm currently thinking about ways to increase my efficiency during working hours. In my mind this morning I was trying to visualize how it happens that I get distracted while I'm trying to work.
As I started to watch the various scenarios, you know what happened every single time? I'd be looking straight at the screen, trying to work my way through a problem, and suddenly in front of me I see links to my favorite websites staring me in the face, beckoning me to read my life away. And they are:
Friends blogs.
News sites.
Craigslist!
Myspace.
Facebook.
Wikipedia.
And more.
These sites could keep me occupied for hours. And they have. Even clicking one a few times throughout the day causes my thought processes to be completely broken up and I lose a ton of time.
So away the bookmarks bar goes. I figure it is less ready opportunities to "get" distracted. Distraction then becomes an active pursuit rather than a passive one.
As I started to watch the various scenarios, you know what happened every single time? I'd be looking straight at the screen, trying to work my way through a problem, and suddenly in front of me I see links to my favorite websites staring me in the face, beckoning me to read my life away. And they are:
Friends blogs.
News sites.
Craigslist!
Myspace.
Facebook.
Wikipedia.
And more.
These sites could keep me occupied for hours. And they have. Even clicking one a few times throughout the day causes my thought processes to be completely broken up and I lose a ton of time.
So away the bookmarks bar goes. I figure it is less ready opportunities to "get" distracted. Distraction then becomes an active pursuit rather than a passive one.
consumerist nature
I observe this morning that we are bred with the notion that having stuff makes you more favorable. A child with big observant eyes approaches a table full of middle-age coffee shop patrons. The first observation spoken to the child? "Hi! I like your coat!"
Harmless... right?
Harmless... right?
Subscribe to:
Posts (Atom)
