Ticket #57 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

Backend sanity check failed D001

Reported by: jonefoley@gmail.com Assigned to: fox
Priority: major Milestone:
Component: backend Version: 1.1.4
Keywords: Cc:

Description

I seem to be meeting all the backend requirements (LAMP with MagpieRSS 0.72), though I get this error when attempting to load (Backend sanity check failed D001). It would be nice if there were some additional debugging output,but there doesnt appear to be a switch for this in the config.php. (http://rss.ignorami.com)

Change History

03/29/06 23:15:17 changed by fox

Please read [SubmittingBugs].

03/30/06 03:14:28 changed by jonefoley@gmail.com

  • version set to 1.1.4.

MySQL: mysql Ver 14.7 Distrib 4.1.15, for pc-linux-gnu (i486) using readline 5.1 PHP4: PHP 4.4.2-1 (cli) (built: Jan 18 2006 19:59:20) tt-RSS: 1.1.4.

I have traced the problem to calls to mysql_real_escape_string() which is called from db_escape_string(). It seems that the original link to the MySQL database is closed such that when mysql_real_escape_string() is called it attempt to connect to the database using the default user of the process www-data rather than the user and DB supplied by config.php.

b>Warning</b>: mysql_real_escape_string(): Access denied for user 'www-data'@'localhost' (using password: NO) in <b>/var/www/rss/db.php</b> on line <b>40</b><br /> <br /> <b>Warning</b>: mysql_real_escape_string(): A link to the server could not be established in <b>/var/www/rss/db.php</b> on line <b>40</b><br />

03/30/06 08:49:53 changed by fox

This is weird. Could you trace to what exact call to db_escape_string() fails?

Also, try requesting this url: backend.php?op=rpc&subop=sanityCheck and see if there are any errors reported.

03/30/06 20:30:34 changed by jonefoley@gmail.com

I will look into it. backend.php?op=rpc&subop=sanityCheck returns an XML document with error code 6.

03/30/06 20:50:44 changed by fox

Code 6 = not logged in. You actualy need to be logged in even in single user mode (tt-rss.php takes care of this).

Check session length related variables in config.php, toggle database_backed_sessions, etc.

03/30/06 21:11:50 changed by jonefoley@gmail.com

Ok. so it has nothing to do with db_escape_string(). The DB connection is closed after bailing from an earlier error. The problem seems to be in setting/retrieving session/authorization information in the database. If I set define('DATABASE_BACKED_SESSIONS', false); the front-page loads fine. When its enabled I get the fatal error.

03/30/06 21:52:36 changed by fox

  • status changed from new to closed.
  • resolution set to worksforme.

Well there you have it. DB-sessions just doesn't work for some people, I don't know why. Maybe it's a bug, maybe some local configuration error.