VeVeto Posted December 31, 2010 Share Posted December 31, 2010 I am using wampserver to run my website but i keep getting error when i type in localhost in my address bar Is it the problem with wampserver or the coding? The Error Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: localhost in C:\wamp\www\libs\dmssql.php on line 35 Cant Connect to mssql [dmssql class] here is the config.php ##### 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 ##### 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 Quote 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); } } ?> Can you help me Please Guys :X i enbaled php_mssql.dll and i replaced from ;extension php_mssql.dll to extension php_mssql.dll Could you help me guys please X.x HERE IS The full website code im using http://uploading.com/files/get/8de48e5m/ Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/ Share on other sites More sharing options...
Maq Posted December 31, 2010 Share Posted December 31, 2010 i enbaled php_mssql.dll and i replaced from ;extension php_mssql.dll to extension php_mssql.dll Did you restart your web server after you enabled this? The server you're testing this on is windows, correct? Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1153406 Share on other sites More sharing options...
VeVeto Posted January 1, 2011 Author Share Posted January 1, 2011 yeah i rest it yes windows Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1153493 Share on other sites More sharing options...
VeVeto Posted January 1, 2011 Author Share Posted January 1, 2011 help please .. Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1153519 Share on other sites More sharing options...
VeVeto Posted January 3, 2011 Author Share Posted January 3, 2011 Bump Looking for help Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1154251 Share on other sites More sharing options...
ignace Posted January 3, 2011 Share Posted January 3, 2011 Click the wampserver icon in the tray and click on Localhost, maybe it's installed on another port. Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1154263 Share on other sites More sharing options...
VeVeto Posted January 4, 2011 Author Share Posted January 4, 2011 still same error Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1154449 Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 Obvious question but needs to be asked. You do have MS Sql installed and running? Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1154454 Share on other sites More sharing options...
ignace Posted January 4, 2011 Share Posted January 4, 2011 Are you sure you haven't installed anything that runs on port 80? Does Apache shows as running (click tray > Apache > Service)? Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1154572 Share on other sites More sharing options...
VeVeto Posted February 2, 2011 Author Share Posted February 2, 2011 i have installed MSSQL btw Port 80 is Blocked. i forwared but still blocked Quote Link to comment https://forums.phpfreaks.com/topic/223089-arcuturs-website-problem/#findComment-1168798 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.