CakePHP installing MySQL on Mac Os X 10.5 (.x) Leopard with built-in PHP and Apache 2

December 22nd, 2008

cakephp with mysql running as virtual host on 10.5 os x leopardThe simpler alternative to running MAMP or XAMPP on Os X is using the built-in PHP, APache and getting a binary of Mysql. Although MAMP and XAMPP are simple ways also.

When I first installed mysql for my mac running Leopard just after it came out (end 2007), it was a bit flakey and casued a lot of people problems. So here is a mini tutorial for putting MySQL on Leopard now, since it is easy now, and more timely given cake php RC4 just got released :)

I can recommend these 2 guides as well as my notes here.

1) http://www.keithmedlin.com/2008/01/installing-cakephp-on-os-x-leopard-1051/

2) http://www.givegoodweb.com/post/53/cakephp-leopard-virtual-hosts

This pic is what we are aiming at with this install!


Right,let’s go! I am just installing Cake on a Mac mini running 10.5.2 and I noticed that finally Mysql seem to have provided a binary .dmg mac package on their website.(I think this came out in November as far as I can tell).

So go get the package from mysql:

http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg

make sure and pick the right processor type for your machine!

while waiting for that to download, I recommend also checking out the guides I linked above and set up your shell / profile and Apache for PHP with virtual hosts. This will allow easy development set-up where you can change from one app to another.

Now you should have your mysql .dmg ready by now, and you can just run that. So iside the .dmg you shd have a .pkg for mysql itself. install that first. Then run the start-up item and then finally the preference pane. ( this had problems before with Leopard, I think it is fixed now though!) When it asks I would install for all users, rather than current user only.

try a logout and back in and mysql should start automatically.

that’s pretty much it - check out the 2 linked tutorials to get any more info you need on PHP and so on!

The final gotcha is a weird one. I odn’t know why but if you put localhost as the @host@ in your cake database.php config…you’ll get a socket error in your PHP, when you load up a cakephp app (once you have followed the instructions for virtual hosts and so  on).

So, despite having a working mysql and mysql-connectability via something like CocoaMysql, or the terminal, it does not conenct via PHP.

Then I googled a bit and found arecent blogpost with a simple fix! Just put 127.0.0.1 instead. Or indeed read the rest of the blogpost and get a fuller answer/solution.

luv boobyWomack xxx and a Merry Chrimbo to all cakettes everywhere :)

couple of Glasgow poetry events this month

November 13th, 2008

RON BUTLIN Thursday 27th November, 7.30pm, Sloan’s
Edinburgh based Poet - hosted by Vital synz. ( website ) Tickets available on the night Thursday 27th November, 7.30pm, Sloan’s 108 Argyle St, Glasgow G2 8BG
And the following night

un homme qui dort review

November 11th, 2008

nice intro to the dvd released last year of this amazing film. nice stills too!

oh wow!!! Johnny Mathis Chic LP has surfaced after 30 years embargo!

November 10th, 2008

“Just to let you know on 9 November between 5 and 6 pm GMT on Jazz FM Radio the Johnny Mathis single “I Love My Lady” is to be played by DJ Ralph Tee as a special favour to me. He’s actually got the whole album but because of legal reasons is unable to play it or let anyone else hear it.”
:o
best album you have never heard!

Simon has commented on this justifiably, I omitted his name from the quote - my apologies, Simon. I was in some excitement :)

Norma Jean CD with Chic Organization selling on eBay at a good price of £30 GBP - considering Amazon has it from several people at 200€ euro plus!!!!

It is a great Chic CD, with all the extended mixes Norma Jean and Chic came up with. Features some classic Nile and Bernard stuff on Saturday, Sorceror and High Society. It’s got evrything Chic and Norma Jean Wright did together.

language - it’s all good!

November 10th, 2008

Haha!
At the end of the day, what does it really mean? I personally think it’s fairly unique if an individual can speak eloquently using any phrase, let alone these. However, at this moment in time, English language use is awful. It is absolutely horrifying what you hear today… it’s a nightmare! They shouldn’t of put this list out; instead, they should of focused on intelligible sentences by college graduates. I mean come on, using the English language is not rocket science, millions upon millions use it 24/7. With all due respect to the authors of this report…we’re good to go, IMHO.
(comment by Steve on that thread)
IT’S ALL GOOD!

Oulipo style, a nice little simple app written in Cake - quite fun.

November 4th, 2008

http://binspiration.com/
complete a sentence for 15 seconds of fame.
Get going!

a cartoon

October 15th, 2008

a wry one…

Marek Raczkowski 2.jpg

bbc iplayer on series 60 s60 nokia phones

October 10th, 2008

http://www.allaboutsymbian.com/news/item/8196_BBC_iPlayer_for_S60_goes_live_.php
read the comments to get it to work on your symbian phone…you need to adapt the app-min.js file in the download zip.

orlando

October 9th, 2008

http://www.gutenberg.org/etext/615
orlando furioso in english released at gutenberg!

prototyping

October 9th, 2008

2 website prototyping releases:
Pencil (why isn’t the Pencil?* ) http://www.evolus.vn/Pencil/
and Balsamiq
http://www.balsamiq.com/products/mockups/desktop
not sure whether omniGraffle isnt the best one though…
* because the Pen is