News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[SMF 1.1.15] Database Error - Please try again. If you come back to this error

Started by sontaya, October 01, 2011, 09:16:59 AM

Previous topic - Next topic

sontaya

What happened with this version?

Please try again. If you come back to this error screen, report the error to an administrator.

Can i reload page same time it work and not work.

NOTE: MySQL 5.1

Oldiesmann

If you can login, go to your admin center and the actual error will be displayed in the error log.

If not, make this change to get the actual error:

Sources/Errors.php

Find
if (allowedTo('admin_forum'))
$context['error_message'] = nl2br($query_error) . '<br />' . $txt[1003] . ': ' . $file . '<br />' . $txt[1004] . ': ' . $line;
else
$context['error_message'] = $txt[1002];

// A database error is often the sign of a database in need of updgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
if (allowedTo('admin_forum') && !empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
$context['error_message'] .= '<br /><br />' . $txt['database_error_versions'];

if (allowedTo('admin_forum') && isset($db_show_debug) && $db_show_debug === true)
{
$context['error_message'] .= '<br /><br />' . nl2br($db_string);
}


Replace
$context['error_message'] = nl2br($query_error) . '<br />' . $txt[1003] . ': ' . $file . '<br />' . $txt[1004] . ': ' . $line;

// A database error is often the sign of a database in need of updgrade.  Check forum versions, and if not identical suggest an upgrade... (not for Demo/CVS versions!)
if (!empty($forum_version) && $forum_version != 'SMF ' . @$modSettings['smfVersion'] && strpos($forum_version, 'Demo') === false && strpos($forum_version, 'CVS') === false)
$context['error_message'] .= '<br /><br />' . $txt['database_error_versions'];

if (isset($db_show_debug) && $db_show_debug === true)
{
$context['error_message'] .= '<br /><br />' . nl2br($db_string);
}


That will cause SMF to show you the actual error message rather than the more user-friendly one.
Michael Eshom
Christian Metal Fans

sontaya

Error:
Table 'suseforum.smf_log_httpBL' doesn't exist
File: /home/www/virtual/susethailand.com/htdocs/suseforum/Sources/httpBL_Subs.php
Line: 263

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.15, while your database is at version 1.1.8. The above error might possibly go away if you execute the latest version of upgrade.php.


Line: 263 (httpBL_Subs.php)

db_query("
INSERT INTO {$db_prefix}log_httpBL
(logTime, ip, threat, last_activity, suspicious, harvester, comment, url, user_agent, errorNumber, username, raw, stopped)
VALUES (" . time() . ", '$ip', $threat, $last_activity, $suspicious, $harvester, $comment, '$url', '$user_agent', $errorNumber, '$username', '$raw', $stopped)", __FILE__, __LINE__);




Can't login to admin center

Oldiesmann

That's a problem with the httpBL mod. The table that it uses never got created.

To fix it: Download the httpBL mod package, extract install_1.php, upload it to your forum directory and run it (eg <url-to-your-forum>/install_1.php), then delete the file when you're done. That will create all the necessary tables and settings related to the mod.
Michael Eshom
Christian Metal Fans

sontaya

Quote from: Oldiesmann on October 01, 2011, 12:30:28 PM
That's a problem with the httpBL mod. The table that it uses never got created.

To fix it: Download the httpBL mod package, extract install_1.php, upload it to your forum directory and run it (eg <url-to-your-forum>/install_1.php), then delete the file when you're done. That will create all the necessary tables and settings related to the mod.

It worked for me. Thank you,

mohsinrawal

Hi,
I have upgraded from 1.1.13 to 1.1.15, But my Database is still 1.1.13

I keep getting this email
"There has been a problem with the database!
MySQL reported:
Lost connection to MySQL server during query

This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues."


My Knowledge about all this is very basic .. need help.  :'(

Illori

please open a separate thread for your issue, this thread belongs to someone else and is marked solved.

mohsinrawal


Advertisement: