Question

I've got xampp installed on my laptop runing XP, and it's been running without any problems for ages.

I've just tried installing cakephp, and have altered the database config and enabled mod_rewrite.

But now I get the following on the welcome page:

Your tmp directory is writable.

The FileEngine is being used for caching. To change the config edit APP/config/core.php

Your database configuration file is present.

Cake is NOT able to connect to the database.

I have no idea why it's not connecting to the database. Has anyone else ever come across this problem and have any idea how to resolve it?

*edit Advice on configuring datalogging in cake would be a great help too

Was it helpful?

Solution

First, edit ~/app/config/core.php and raise debug to 2, this will give you more detailed error reporting.

Second, triple check your ~/app/config/database.php and be 110% sure there is no typo in there. If there is no typo, try connecting with that same data with a non-cake script.

If that fails too, you might want to check Apache and MySQL log files, or even your firewall if you have one.

OTHER TIPS

When using phpmyadmin to add a user for phpcake to connect with I had to set the host to localhost instead of %.

Have you checked if your database user name and password is correct?

Also ensure that your database does exist.

The following is the default username and password (actually, no password) XAMPP uses:

var $default = array(
    'driver' => 'mysql',
    'persistent' => false,
    'host' => 'localhost',
    'login' => 'root',
    'password' => '',
    'database' => 'db_name',
    'prefix' => '',
);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top