- Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\libs\dmssql.php on line 35
I am setting up my website and i get the following errors when i tye loclahost in my web address bar.
I am using wampserver.
Notice: A session had already been started - ignoring session_start() in C:\wamp\www\libs\rosecp_ae.php on line 20
Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\libs\dmssql.php on line 35
here is the config.php file:
##### Template Dir ###########
$template = 'default';
##### Server Name
$title = 'roseon';
###### Your msSQL Info ########
$hostname = "localhost";
$username = "root";
$password = "root";
# databases, that if you changed db names. if not, dont change a thing
$seven_ORA = "roseon_ORA";
$sho = "SHO";
$sho_log = "SHO_LOG";
$sho_mall = "SHO_MALL";
Here is the dmssql.php:
class dmssql {
function dmssql($h,$u,$p,$d)
{
$this->host = $h;
$this->user = $u;
$this->pass = $p;
$this->db = $d;
}
function connect() {
$this->linkid = mssql_connect($this->host,$this->user,$this->pass) or die("Cant Connect to mssql [dmssql class]");
if ($this->linkid)
{
if (mssql_select_db($this->db))
{
return TRUE;
}
else
{
$this->dbclose($this->linkid);
echo "Cant Select $this->db [dmssql class]";
return FALSE;
}
}
else
{
echo "Cant Connect to mssql [dmssql class]";
return FALSE;
}
}
function query($q)
{
if ($this->connect())
{
$q = $this->clean($q);
$r = mssql_query($q) or die("FATAL ERROR");
return $r;
}
}
function clean($string)
{
$new_data = preg_replace("[^A-Za-z0-9@.]", "", $string);
return $new_data;
}
function num_rows($data)
{
return mssql_num_rows($data);
}
function qFirstRow($q)
{
if ($this->connect())
{
$ret = mssql_fetch_row($this->query($q));
}
return $ret[0];
}
function fetch_array($data)
{
return mssql_fetch_array($data);
}
function dbclose()
{
return mssql_close($this->linkid);
}
}
?>
Please help me thanks