Skip to content


Cake Bake – Fatal error: Call to undefined function mysql_connect() when using MAMP and CakePHP

If you receive an error like this make sure that your path has been added to and exported. Like a da so:

export PATH=/Applications/MAMP/bin/php5/bin:$PATH

Posted in Other.

4 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Dan Hilton said

    Sweet! Cheers, all hail the LazyWeb!

  2. Many thanks for this quick and easy fix. Dunno why I didn’t think of it myself!

  3. Rodrigo said

    or just in case you can try to put libmysql.php in system32

  4. Rodrigo: That might be a solution on Windows or with WAMP or XAMPP but Mac doesn’t have a System32, we are just like Unix and have to export paths to make things universal, suppose you could drop a SymLink into bin somewhere but easier to just add to path.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.