E
04-29-2003, 06:51 PM
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/fiendwor/public_html/forum/admin/db_mysql.php on line 40
I havent touched this file at all, & I have no clue why it has an error in it.
I went into the file & found line 40 [using EditPlus]
This is line 40
$this->link_id=mysql_connect($this->server,$this->user,$this->password);
& here are the codes surrounding it -
function connect() {
global $usepconnect;
// connect to db server
if ( 0 == $this->link_id ) {
if ($this->password=="") {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user);
} else {
$this->link_id=mysql_connect($this->server,$this->user);
}
} else {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user,$this->password);
} else {
$this->link_id=mysql_connect($this->server,$this->user,$this->password);
}
}
if (!$this->link_id) {
$this->halt("Link-ID == false, connect failed");
}
if ($this->database!="") {
if(!mysql_select_db($this->database, $this->link_id)) {
$this->halt("cannot use database ".$this->database);
}
}
}
}
^ That is from line 25 down to 53.
line 53 is just a space :-\
I'm not too familiar w/ PHP,
please help if you can,
I cant stand members messaging me asking "is the site down??"
lol, Thanks in advance - peace.
I havent touched this file at all, & I have no clue why it has an error in it.
I went into the file & found line 40 [using EditPlus]
This is line 40
$this->link_id=mysql_connect($this->server,$this->user,$this->password);
& here are the codes surrounding it -
function connect() {
global $usepconnect;
// connect to db server
if ( 0 == $this->link_id ) {
if ($this->password=="") {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user);
} else {
$this->link_id=mysql_connect($this->server,$this->user);
}
} else {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user,$this->password);
} else {
$this->link_id=mysql_connect($this->server,$this->user,$this->password);
}
}
if (!$this->link_id) {
$this->halt("Link-ID == false, connect failed");
}
if ($this->database!="") {
if(!mysql_select_db($this->database, $this->link_id)) {
$this->halt("cannot use database ".$this->database);
}
}
}
}
^ That is from line 25 down to 53.
line 53 is just a space :-\
I'm not too familiar w/ PHP,
please help if you can,
I cant stand members messaging me asking "is the site down??"
lol, Thanks in advance - peace.