Author Topic: Could not connect to the database. Please verify your login details and database  (Read 107 times)

techshots

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Hi,

I've edited the 

C:\wamp\www\CompactCMS\lib\sitemap.php

file, but get that error.

Before that error, I received the following:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\CompactCMS\lib\sitemap.php on line 218

My edit is as follows (I've left " db_pass " alone because my password is blank)

= @mysql_connect($cfg['localhost'], $cfg['root'], $cfg['db_pass']);
           @mysql_select_db($cfg['compactcms'], $link);


This is all done with wamp = php ver 5.2.0  | mysql 5.3.1  | apache 2.2.11 windows vista


And my install is here:

C:\wamp\www\CompactCMS

Thanks,
HN


Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 232
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Hi Techshots,

I realize that due to my absence, chances are that you already moved on. But just to make sure: have you edited the database settings in /lib/config.inc.php? You mention editing sitemap, but should not be necessary. The error you're getting indicates incorrect values of the login details, which could thus be explained by not having edited config.inc.php.

Also just to check (if still applicable): what version are you using?

Cheers!
Xander.
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!