views:

1463

answers:

4

I CakePHP (cake_1.2.2.8120) and EasyPHP (3.0) installed on Windows Vista Ultimate. I followed the "baking" tutorials online, 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.

Any clues?

A: 

Don't know EasyPHP, but it seems to be Apache based. Check if you're using a Apache-module for the mysql-connection, as this will not work in CLI.

Thx for the reply, but would you mind telling me how could I know that? I'm still new to those stuff :$ :)
AlaaShaker
+5  A: 

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.

http://www.apachefriends.org/en/xampp-windows.html

Ryan953
WAMP is an alternative. (http://www.wampserver.com/en/)
dr Hannibal Lecter
Thanks, man .. it's was the silly EasyPHP!Now all's great (Y)
AlaaShaker
A: 

copy the apache/php.ini to php/php.ini.

A: 

The root cause of problem is that in EasyPHP 5.3 there is no php.ini file in php folder. Copy php.ini from EasyPHP5.3\apache to EasyPHP5.3\php to solve this nasty issue.

andrej