Page 1 of 1

MySQL connect Error

Posted: Sat Oct 11, 2008 5:10 pm
by AbstractUtopia
Well, I have been using Serendipity for a long while now and I logged onto my account today to write something up. I changed my template using the quick template change and then changed my subtitle.

Then, all of the sudden I got this error:
Warning: mysql_connect(): Access denied for user: 'utopia@68.178.254.24' (Using password: YES) in /home/content/s/p/a/sparks4289/html/blog/include/db/mysql.inc.php on line 270

Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/s/p/a/sparks4289/html/blog/include/db/mysql.inc.php on line 271

Warning: mysql_select_db(): A link to the server could not be established in /home/content/s/p/a/sparks4289/html/blog/include/db/mysql.inc.php on line 271
serendipity error: unable to connect to database - exiting.
I got this error from both my serendipity admin log on and just the page view.

Now, I have no idea about any SQL stuff and I never play around with it just so things like this don't happen. I do have the ability to look at this stuff. I tried restoring my database through my hosting service and I updated to the latest version of serendipity.

I am lost and frustrated. Can you point me in the right direction to fix this? I have been reading through the forums already and have tried some fixes posted and none of them have worked.

Re: MySQL connect Error

Posted: Mon Oct 13, 2008 10:07 am
by garvinhicking
Hi!

Maybe you use FIrefox3? It has the nasty habit to change passwort input fields to match your remembered login password, which of course is usually not the same like your mysql password. Once FF3 autofills this password and you save anything in the configuration, your password is changed.

Sadly this is something that a web application can't change anything - it must be disabled or fixed in firefox.

To fix this situation you must now edit your serendipity_config_local.inc.php file and insert the right mysql password there.

HTH,
Garvin

Posted: Tue Oct 14, 2008 12:23 am
by AbstractUtopia
OKay, So I fixed the dbName and dbUser on my serendipity_config_locala.inc.php file to match everything properly.

Now I can log into my admin page, but as soon as I try to do anything on in my administration page, it logs me out and kicks me back to my sign in page. I also get these errors:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/p/a/sparks4289/html/blog/serendipity_config_local.inc.php:21) in /home/content/s/p/a/sparks4289/html/blog/include/functions_config.inc.php on line 627

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/p/a/sparks4289/html/blog/serendipity_config_local.inc.php:21) in /home/content/s/p/a/sparks4289/html/blog/include/functions_config.inc.php on line 627

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/p/a/sparks4289/html/blog/serendipity_config_local.inc.php:21) in /home/content/s/p/a/sparks4289/html/blog/serendipity_admin.php on line 11

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/s/p/a/sparks4289/html/blog/serendipity_config_local.inc.php:21) in /home/content/s/p/a/sparks4289/html/blog/include/functions_config.inc.php on line 353
I can, however, see my webpage now. I just can't do anything (like add entries or even look at any of the configurations in the admin profile).

Looking through the files, it has something to do with cookies, just not exactly sure what.

Posted: Tue Oct 14, 2008 10:03 am
by garvinhicking
Hi!

Check your editor, it seems it inserted a space before the first <?php or after the last ?>, this is causing the error. You must fix this in your serendipity_config_local.inc.php file.

HTH,
Garvin

Posted: Wed Oct 15, 2008 12:18 am
by AbstractUtopia
Ah ha! That was exactly the problem. Thank you so much, everything is now resolved. You are officially my hero.