Repair_settings problem

Started by forexphil, November 07, 2013, 04:38:09 PM

Previous topic - Next topic

forexphil

Hi guys and gals,

Been running 2.0 SMF without trouble for about a month, then suddenly today my members cannot login with the message;

"Connection Problems Sorry, SMF was unable to connect to the database."

I uploaded Repair_Settings.php and ran it, and it asked me for the MySQL database details, which I provided.

Repair_Settings returned the error:


PHP Error Message

Warning: require_once(/Load.php) [function.require-once]: failed to open stream: No such file or directory in /home/a5552604/public_html/repair_settings.php on line 268

PHP Error Message

Fatal error: require_once() [function.require]: Failed opening required '/Load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a5552604/public_html/repair_settings.php on line 268

Any ideas on what I can do to fix the problem?

Kindred

please manually check your Settings.php file and confirm that the database connection information is correct.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

forexphil

Quote from: Kindred on November 07, 2013, 04:59:23 PM
please manually check your Settings.php file and confirm that the database connection information is correct.

Yes they are correct. When I first had the connection problem (before running repair_settings.php), the settings file was oddly not configured at all. By entering them, I was able to access the login page, but not able to login successfully. That is when I tried the repair_settings.php process

And I have tried with the default $db_server = format, as well as the $mysql_host =  format used by my host.


forexphil

Is the following correct for the settings.php?

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/public_html';      # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/Sources';      # Path to the Sources directory.
$cachedir = '/cache';      # Path to the cache directory.


And is the following correct?

$db_prefix = 'a5552604_';
$db_persist = 0;
$db_error_send = 1;

where I have changed it from 'smf_ ' given that the database is 'a5552604_forex'

Other than that, I feel I have settings.php configured correctly, but still get the repair_settings.php error as above.

Kindred

no....   the prefix is the TABLE prefix INSIDE the database not the database prefix
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

forexphil

#5
Quote from: Kindred on November 07, 2013, 09:04:30 PM
no....   the prefix is the TABLE prefix INSIDE the database not the database prefix

Hmmm, OK, I've put that back to 'smf_' per the table prefix for the database.

My settings.php is now as per below;

########## Database Info ##########
$db_type = 'mysql';
$db_server = 'mysql14.000webhost.com';
REMOVED
$db_passwd = 'withheld';
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/public_html';      # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/Sources';      # Path to the Sources directory.
$cachedir = '/cache';      # Path to the cache directory.

and the error messages as follows still persist;


PHP Error Message

Warning: require_once(/Sources/Load.php) [function.require-once]: failed to open stream: No such file or directory in /home/a5552604/public_html/repair_settings.php on line 268

PHP Error Message

Fatal error: require_once() [function.require]: Failed opening required '/Sources/Load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a5552604/public_html/repair_settings.php on line 268

Arantor

I just removed the username and database since these are also potentially useful details to a would-be attacker knowing your host and its configuration.

The problem is your $boarddir, $sourcedir and $cachedir are incorrect.

/public_html is not the absolute path to anything, there are going to be folders above this, e.g. /home/user/public_html (I forget how 000webhost does things exactly), and similarly these need to be represented in $sourcedir (e.g. /home/user/public_html/Sources) and $cachedir (e.g. /home/user/public_html/cache)
Holder of controversial views, all of which my own.


Kindred

from the error message it would seem to be

/home/a5552604/public_html/
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

forexphil

AWESOME Arantor!!! Settings fully restored, and I once again have access to the forum.

THANK YOU VERY MUCH

Quote from: Arantor on November 07, 2013, 09:21:56 PM
I just removed the username and database since these are also potentially useful details to a would-be attacker knowing your host and its configuration.

The problem is your $boarddir, $sourcedir and $cachedir are incorrect.

/public_html is not the absolute path to anything, there are going to be folders above this, e.g. /home/user/public_html (I forget how 000webhost does things exactly), and similarly these need to be represented in $sourcedir (e.g. /home/user/public_html/Sources) and $cachedir (e.g. /home/user/public_html/cache)

forexphil

Yes Kindred, that's where I got it from. Job done and all working now.

Thank you to both of you. VERY fast support here on the forum.

Phil

Quote from: Kindred on November 07, 2013, 09:31:27 PM
from the error message it would seem to be

/home/a5552604/public_html/

Advertisement: