THT Community (TCom)

Full Version: Error at upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm getting this error when trying to upgrade from patch 2 Sad

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/user/public_html/tht/install/index.php on line 111

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/user/public_html/tht/install/index.php on line 112
Your current version doesn't match the required upgrade version. Please upgrade to every version, you can't jump versions.
That's because your conf file was deleted (overwritten).
But in no place said anything about it! Sad
I know. I had the same problem. Here is how to fix it.

In your now empty conf file put this:
PHP Code:
<?
//////////////////////////////
// The Hosting Tool
// SQL Config
// By Jonny H
// Released under the GNU-GPL
//////////////////////////////

//Are we being called by the script?
if(THT != 1){die("FATAL: Trying to hack?");}

//MAIN SQL CONFIG - Change values accordingly
$sql['host'] = "%HOST%"#The mySQL Host, usually default - localhost
$sql['user'] = "%USER%"#The mySQL Username
$sql['pass'] = "%PASS%"#The mySQL Password
$sql['db'] = "%DB%"#The mySQL DB, remember to have your username prefix
$sql['pre'] = "%PRE%"#The mySQL Prefix, usually default unless otherwise
?>

Change your details to yours. It should work after this! Smile
That seemed to work, thanks a lot Smile
It wiped your conf? Oh ok. Why did it work with mine? You know you shoudl CHMOD your config back right? Leaving it at 777 will leave it open to some nasty hacks.
(12-04-2008 12:31 AM)Erizo Wrote: [ -> ]That seemed to work, thanks a lot Smile

No problem. Wink
(12-04-2008 09:10 AM)Jonny Wrote: [ -> ]It wiped your conf? Oh ok. Why did it work with mine? You know you shoudl CHMOD your config back right? Leaving it at 777 will leave it open to some nasty hacks.

Well the manual doesn't say to CHMOD it back to 644 or whatever. Tongue Some programs require to have your conf file writable by php.
But i didn't had it at 777 o.o
Did you have it at 644?
Hmmm, you do know the conf.inc.php will get wiped when you upload all the includes folder? I updated the upgrade doc to make it clear.
Pages: 1 2
Reference URL's