Hi, A couple of days ago, my directory crashed for some reason. I didn't touch anything, and it was working fine for the last 2 years. Now I'm getting this error: Could it have anything to do with my webhost? I think they recently made updates to their server. Thanks!
This happens often if your database connection was not initialized. Maybe a problem with database connection or changed settings for it... Maybe also a problem with db library files or functions... You won't find easy answer until someone will see your files and/or db settings.
Can you still login to your admin area? Also the file you need to look at is index.php to begin with. The line that the error references should state: $row['SUBCATS'] = $rs2->GetRows(); Code (markup): On an unmodified version of that file. If it doesn't, tell us what it does have on that line.
The admin log-in page opens up, but it won't accept my user and password. I did find the line you specified: What now?
login to your phpmyadmin and find a command repair table, i believw youll have to repair each table seperately,... did that a long time ago ...so forgot. [or you could ask your host to do it for you] problem being $rs2 is empty and is erroring out. Just my 2c, M.
If you cannot login to your admin and that line is correct then it is your database that is at fault. I would suggest msolution's method because this will ensure that the database is running and that the tables are all present and correct. If that fails to solve the problem and you can access the database fine via phpMyAdmin then I would suggest adding a new user/pass combination to MySQL and resetting the information in your config.php file. If you cannot access the database via phpMyAdmin then contact your hosting company and ask them to ensure that MySQL is running.
If you have a reputable host they should keep weekly backups. Just ask them to reset the site to a week ago.