Archive

Posts Tagged ‘mysql’

Zend Server 4.0.6 + Framework 1.9 and PDO_MYSQL on Mac OS X always defaults to /temp/mysql.sock

December 8, 2009 Leave a comment

I always get an error like the one below when I first run Zend Server with a Zend Framework 1.9 app.

Fatal error: Uncaught exception ‘Zend_Db_Adapter_Exception’
with message ‘SQLSTATE[HY000] [2002] Can’t connect to local
MySQL server through socket ‘/tmp/mysql.sock’

Of course, recompiling PHP and so on might fix it, but I found, for time’s sake, it’s simpler to just to issue the command from the terminal. (You’ll need to be admin or know an admin’s password).

sudo ln -s /usr/local/zend/mysql/tmp/mysql.sock /tmp/mysql.sock

If you’re fed up of running this command every time you log in, just download Lingon and create a task that runs automatically on boot or login.

My New, Streamlined, Server Setup

July 17, 2006 Leave a comment

I’ve finally got my webserver back up and running after nearly three months of being too busy to even think about it. And what can I say? I’m back!

When I say I’ve got my webserver back up and running, that’s not quite true. My little broken linux laptop that I used for the last three years to host my web site is sitting forlornly on the floor under my desk.

So, have I sold out? Have I gone professional? Have I finaly shifted my blog to Blogspot and my photos to Flickr? Nope. I’ve moved my server; I’ve shifted it from the Mandrake Linux 128Mb RAM Transmeta Crusoe laptop with the broken screen over to my shiny Mac G4 Cube with 1.5Gb RAM and 300Gb hard disk. Which, up until this time was beloved but under-used.

And I’m not a fan of underused electronics, so what better use can you think for it than a 24 hour duty cycle as my webserver.

So, yet another operating system bites the dust! First it was Win2K and this time Linux! I can’t really see a compelling case for moving back to Linux either, now that I can do everything with Mac OS X.

It was less tricky than I thought moving my site across, and installing PHP5 and MySQL was a breeze with the packages from http://www.entropy.ch. I hardly seemed to be using Unix at all and to be honest, I almost feel like a cheat after the hoops I jumped through to build Apache, MySQL and PHP on my Mandrake box.

Categories: Mac Tags: , , , , , ,