13 Replies - 1705 Views - Last Post: 22 May 2012 - 02:04 PM Rate Topic: -----

#1 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 07:29 AM

I am having a little trouble setting up my database. I keep getting this message.....Your database configuration file is present.....Cake is NOT able to connect to the database.....what seems to be the problem?? Any input would be much appreciated! Thanks!!


PS. I am running WAMP....
Is This A Good Question/Topic? 0
  • +

Replies To: CakePHP/Cake is NOT able to connect to the database.

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 07:40 AM

Not sure what version of CakePHP you're running, but here's the doc on configuring the DB for version 1.3.
Was This Post Helpful? 0
  • +
  • -

#3 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 07:41 AM

Yea Im running 1.3...Thanks!!
Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2896
  • View blog
  • Posts: 10,031
  • Joined: 08-August 08

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 07:42 AM

...and your configuration file contains what for login, password, database?
Was This Post Helpful? 0
  • +
  • -

#5 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 07:47 AM

I changed my login to root....pass = root...and my database name is samples
Was This Post Helpful? 0
  • +
  • -

#6 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2896
  • View blog
  • Posts: 10,031
  • Joined: 08-August 08

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 08:05 AM

So is that working for you?
Was This Post Helpful? 0
  • +
  • -

#7 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 08:12 AM

Here is what I keep getting....URL rewriting is not properly configured on your server.....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.
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 08:36 AM

CakePHP is very good about telling you everything that's wrong. Why not listen to it and fix the problems? You MUST have URL rewriting turned on in your web server. Your database configuration must be correct.
Was This Post Helpful? 0
  • +
  • -

#9 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 08:41 AM

There is a link on my localhost that offers to help me configure my URL rewriting...I went through all the steps and my localhost still displays........

URL rewriting is not properly configured on your server.
1.Help me configure it
2.I don't / can't use URL rewriting


What the crap!!! Somebody please point me in the right direction!! I am new to this PHP thing!!

Oh yea this is the link to the site that offers to help me with my URL rewriting....http://book.cakephp.org/1.3/view/917/Apache-and-mod_rewrite-and-htaccess

@Jack I would fix them if I KNEW how!!
Was This Post Helpful? 0
  • +
  • -

#10 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 08:49 AM

ok.. :smartass: ..I got the database configured and connected!! I had to remove the password that I had (root). I am guessing that I didn't have a password setup, but after I removed the password from the database.php file everything worked fine!! Now only thing is to get this URL rewriting configured!

This post has been edited by BarNunBoi: 09 April 2012 - 08:57 AM

Was This Post Helpful? 0
  • +
  • -

#11 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 09:25 AM

What is your web server and operating system? Did you restart the web server after you tried to enable URL rewriting?
Was This Post Helpful? 0
  • +
  • -

#12 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 09 April 2012 - 09:30 AM

OK!! We are in business!! I had to restart the server!! Everything is green (which means we are good to go)!! Thanks Yall!
Was This Post Helpful? 0
  • +
  • -

#13 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 22 May 2012 - 09:10 AM

Heres the deal....I started a new project and dragged CakePHP 1.3 framework into my project folder but now I am getting "Cake is not able to connect to the database!" Last time I fixed this by leaving the password blank. This time that fix is not working. Does anyone know why I am having this issue?
Was This Post Helpful? 0
  • +
  • -

#14 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

Re: CakePHP/Cake is NOT able to connect to the database.

Posted 22 May 2012 - 02:04 PM

problem solved!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1