Random Snippet of Code and Life


23
Jan

bake Fatal error: Call to undefined function mysql_connect()

The most likely cause for this problem is that php_mysql.dll is not enable for CLI (command line interface) version for PHP.

To resolve this,
(windows)
Create a copy php.ini-dist in the directory where php.exe is.
Rename it to php.ini.
Edit the file, uncomment php_mysql.dll and php_mysqli.dll

Run php bake.php, if you receive error about ./mysql.dll unable to load, copy and paste mysql.dll and mysqli.dll from /ext folder to where your php.exe is.

That should fix it..

(Linux)
Look for your copy of php for cli
/etc/php/cli-php5/php.ini <<<
/etc/php/apache2-php5/php.ini

and check that this line is uncommented “extension=mysql.so” in php.ini

or compile PHP with –enable-cli

Technorati Tags: , , ,

Popularity: 22% [?]

Related posts:
  • CakePHP Code: Notice: Undefined index: REQUEST_URI error
  • CakePHP: Bake more with IBM developerWorks!
  • Resolving Windows XP Generic Host Process for Win32 Services error
  • Leave a Reply

    Random Snippet of Code and Life is is proudly powered by Wordpress
    Navigation Theme by GPS Gazette