Page 1 of 2

WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Sun Feb 22, 2009 6:23 pm
by evilrizen
Hey,

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 :D :D :D

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Sun Feb 22, 2009 8:33 pm
by lmame
Why are you using Mssql?

This error:
  1. Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\libs\dmssql.php on line 35

Means you didn't install the "mssql" plugins for php, or it isn't loaded in php.ini so you should load it and restart your webserver...

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Sun Feb 22, 2009 11:25 pm
by evilrizen
I am using wampserver is that the problem?
and in the php settings in php extensions which one should I use?

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 12:07 am
by lmame
Never used it. Make php load the mssql module.

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 12:32 am
by evilrizen
I did it an i get the same error is it the configh.php file?

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 12:40 am
by lmame
If you got the SAME error it's because the module is NOT loaded in php.ini or you didn't restart your webserver (php mainly)...
  1. [PHP_MSSQL]
  2. extension=php_mssql.dll


Usually the php_mssql.dll is in folder "PHP/ext"... Perhaps you didn't install it...

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 12:51 am
by evilrizen
I did that the error is still coming.

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 12:57 am
by lmame
Check if the file exists, see last post for path.

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 4:19 am
by evilrizen
Here the full source of my website all the files are there i don't know whats wrong??
http://www.mediafire.com/?nietlmdxncy

Re: WEBSITE PROBLEM PLEASE HELP!!

PostPosted: Mon Feb 23, 2009 5:09 am
by soccerstar
I know it's not a solution, but it is a work around.

Try using xampp. A simple search in google will help you find it. I like it and it is pretty easy to use. I think it has the plugin built in. (I think)