Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help! Error message 'mysql_connect(): Unknown MySQL Server Host'


Guest

Recommended Posts

Hi, can anyone help!

 

Everything was fine until I changed the configuration files so my site could be SSL secured. Now the site wont show and I get this message:

 

Warning: mysql_connect(): Unknown MySQL Server Host 'http' (1) in /home/allgreen/public_html/allgreenorganics/includes/functions/database.php on line 19

Unable to connect to database server!

 

This is what the first part of this file says

 

' . $errno . ' - ' . $error . '' . $query . '[TEP STOP]');

}

 

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);

}

 

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

 

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

$result_error = mysql_error();

error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

}

 

return $result;

}

 

function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {

reset($data);

if ($action == 'insert') {

$query = 'insert into ' . $table . ' (';

while (list($columns, ) = each($data)) {

$query .= $columns . ', ';

}

$query = substr($query, 0, -2) . ') values (';

reset($data);

while (list(, $value) = each($data)) {

switch ((string)$value) {

case 'now()':

$query .= 'now(), ';

break;

case 'null':

$query .= 'null, ';

break;

default:

$query .= '\'' . tep_db_input($value) . '\', ';

break;

 

I also don't know whether the configuration is correct, what should I write for these?

 

define('HTTP_SERVER', 'http://www.mysite.com');

define('HTTPS_SERVER', 'https://myhost.com');

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'mysite.com');

define('HTTPS_COOKIE_DOMAIN', 'myhost.com');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

 

Is this right?

 

Many many thanks!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...