phpmysqlcakephpeasyphpcakephp-1.2

Why can't CakePHP bake connect to MySQL running under EasyPHP on Windows Vista Ultimate?


I have CakePHP (cake_1.2.2.8120) and EasyPHP (3.0) installed on Windows Vista Ultimate. I followed the "baking" tutorials online and successfully set the database connection with the "cake bake" command from the CLI.

I baked the controller for my "Users" table using the "php cake.php bake controller Users" command - worked fine. However, when I tried baking the view similarly, I got this message:

Fatal error: Call to undefined function mysql_connect() in C:\Web\EasyPHP

\www\cake\cake\libs\model\datasources\dbo\dbo_mysql.php on line 374'

Also, the MySQL module is enabled for PHP on the phpMyAdmin page (web), but I can't find it in the CLI (using "php -m" from the command line) even though I've uncommented the "extension=php_mysql.dll" line in the php.ini file.

How can I fix this?


Solution

  • Grab XAMPP which has Apache with the MySQL and PHP modules setup and working together, as well at the MySQL and command-line versions. It just unzips to any directory, so it won't mess up any other Apache installs you have. Just be careful of any port conflicts between the different installations.

    Download XAMPP