PDA

View Full Version : error in config.inc.php


etts
9th November 2006, 23:16
hello all

I have just installed ISPconfig on sus10.1. The installation went fine, the problem i am having is that when i start the the ISP service i am getting this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /root/ispconfig/scripts/lib/config.inc.php on line 47
No results found!FreshClam is already running!
ISPConfig system is now up and running!

this is what the file looks like:


//////////////// DO NOT EDIT BELOW !!! //////////////////
$go_info["isp"]["server_root"] = "/root/ispconfig";
$go_info["isp"]["include_root"] = $go_info["isp"]["server_root"] . $go_info["server"]["dir_trenner"] ."scripts".$go_info["server"]["dir_trenner"]."lib";
$go_info["isp"]["classes_root"] = $go_info["isp"]["include_root"] . $go_info["server"]["dir_trenner"] ."classes";
$go_info["isp"]["server_id"] = 1;

/**************************************
* Server Einstellungen
* V1.0 ISPConfig SERVER Modules
***************************************

$link = @mysql_connect($go_info["server"]["db_host"], $go_info["server"]["db_user"], $go_info["server"]["db_password"])
or die("Could not connect to MySQL server!");
mysql_select_db($go_info["server"]["db_name"]);
$server_params = mysql_query("SELECT * FROM isp_server WHERE doc_id = '".$go_info["isp"]["server_id"]."'");
if(!$go_info["isp"]["server_conf"] = mysql_fetch_array($server_params)){
die("No results found!");
} else {
foreach($go_info["isp"]["server_conf"] as $key => $value) {
$value = trim($value);
while(strlen($value) > 1 && substr($value,-1) == "/") $value = substr($value,0,strlen($value)-1);
$go_info["isp"]["server_conf"][$key] = $value;
}
$key = NULL;
$value = NULL;
}

the red highlight is line 47

im a newbie to all this, so your help will be much appriated
thanks

till
10th November 2006, 10:48
Did you create the mysql database for ISPConfig manually before you installed ISPConfig or do you use a mysql user for the ISPConfig setup that did not has the same priveliges like the mysql root user?

etts
10th November 2006, 16:10
i created the database before the installation, and i created it in root if that makes any sense.

LionRock
10th November 2006, 16:34
Mybe you are accessing ISPC databse with different database user ? I think the problem is in permissions.

etts
10th November 2006, 20:08
the user and password are the same as in mysql

LionRock
10th November 2006, 21:18
Do you have more IP's on server mybe or something ?

etts
11th November 2006, 13:08
no there is only the one ip on the server. i think what im going to do it do a fresh install, and see if it changes anything. thanks LionRock for your help. :)

falko
11th November 2006, 17:37
i created the database before the installation, and i created it in root if that makes any sense.
This doesn't work. You must not create the ISPConfig database manually, you must have it created by the ISPConfig installer!