Mysql error


#1

Hey guys, i am installing a script called fileshare to upload schoolfiles for my school as a service but i get error:

  1. CGI Bin is not setup correctly! Please contact your webhost about allowing CGI to be accessed/excuted publicly.

  2. Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/x/x/install/install-db.php on line 8

Warning: mysql_select_db() [function.mysql-select-db]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/x/x/install/install-db.php on line 9

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/x/x/install/install-db.php on line 9
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

this is install-db.php:

[font=Verdana]<?php

[size=small]// define valid
define(‘VALID’, ‘1’);

if(isset($db_host))
{
$link = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name) or die(mysql_error());
}else{ Line 8
$link = mysql_connect(host, user, pass); Line 9
mysql_select_db(database) or die(mysql_error());
}

if(!$link){ print "ERROR: " . mysql_error() . "\n "; }

?>[/font]
[/size]

Thanks!


#2

fixed!