evilrizen Posted February 22, 2009 Share Posted February 22, 2009 Hey Everyone, I am using wampserver to run my website but i keep getting errors when i type in localhost in my address bar Is it the problem with wampserver or the coding? HERE IS THE FULL WEBSITE CODE I AM USING http://www.mediafire.com/?nietlmdxncy errors: 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: my MYSQL information is: host: localhost user:root pass:root DB:roseon ##### Template Dir ########### $template = 'default'; ##### Server Name $title = 'RoseCP AE'; ###### Your msSQL Info ######## $hostname = "localhost"; $username = "sa"; $password = ""; # databases, that if you changed db names. if not, dont change a thing $seven_ORA = "seven_ORA"; $sho = "SHO"; $sho_log = "SHO_LOG"; $sho_mall = "SHO_MALL"; And 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!!! Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/ Share on other sites More sharing options...
Mchl Posted February 22, 2009 Share Posted February 22, 2009 Are you connecting to MSSQL or MySQL? If MSSQL: You have to anable mssql extension, as it is disabled by default in WampServer Click on the WampServer icon in tray, go to PHP>PHP Extensions, then select php_mssql. Wait until server restarts Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768737 Share on other sites More sharing options...
evilrizen Posted February 22, 2009 Author Share Posted February 22, 2009 It still gives me that error am i configuring the congif.php file right? Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768742 Share on other sites More sharing options...
Mchl Posted February 22, 2009 Share Posted February 22, 2009 no. php.ini go to http://localhost/?phpinfo=1 and check if mssql is enabled. Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768747 Share on other sites More sharing options...
evilrizen Posted February 22, 2009 Author Share Posted February 22, 2009 I just get the following: Index of / Name Last modified Size Description Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768748 Share on other sites More sharing options...
Mchl Posted February 22, 2009 Share Posted February 22, 2009 Is your server running? Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768760 Share on other sites More sharing options...
evilrizen Posted February 22, 2009 Author Share Posted February 22, 2009 Yes i am running a server Rose online, a game server mysql is alos running and so is wampserver. Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768763 Share on other sites More sharing options...
Mchl Posted February 22, 2009 Share Posted February 22, 2009 Once again... do you want to connect to MySQL, or MSSQL? Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768778 Share on other sites More sharing options...
evilrizen Posted February 23, 2009 Author Share Posted February 23, 2009 MSSQL Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768785 Share on other sites More sharing options...
Mchl Posted February 23, 2009 Share Posted February 23, 2009 Ok then. 1. Is your WampServer's icon in tray white? 2. Did you go to WampServer's tray menu, selected 'PHP', then 'PHP Extensions' and then checked the 'php_mssql'? Link to comment https://forums.phpfreaks.com/topic/146423-php-erroe-need-help/#findComment-768963 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.