Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Install Small Problem !!!


DarrenDunnage

Recommended Posts

Posted

I am installing osc on my hard disk, have installed EasyPHP and installed OSC which all went ok, unitl i clicked catalog and got this error:

 

Warning: mysql_pconnect(): Unknown MySQL Server Host 'localhost ' (11004) in c:\program files\easyphp1-8\www\catalog\includes\functions\database.php on line 17

Unable to connect to database server!

 

have looked at the file and it has :

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

function tep_db_close($link = 'db_link') {

global $$link;

 

return mysql_close($$link);

}

 

function tep_db_error($query, $errno, $error) {

die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');

}

 

function tep_db_query($query, $link = 'db_link') {

global $$link;

 

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {

error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

}

 

any help greatly appreciated !!

 

Thanks

Posted

'localhost' is not the name of your mysql connection. Try '127.0.0.1' instead.

 

Vger

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...