Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with database


rklamot

Recommended Posts

I am unable to access my website because of an error in my database. My hosting technician replied, saying:

 

This seems to be misconfig of store setup on your website. Make sure you have config for connecting webpage to SQL database created within plesk to be set server as : localhost

 

As you can see, at My Webpage the message pops up. How do I restore this?

 

God bless,

 

Ryan

Link to comment
Share on other sites

ok, what do I do? I am totally lost once again

 

You need to define your MySQL server within catalog/includes/configure.php.

It should look something like this:

 

// define our database connection
?define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
?define('DB_SERVER_USERNAME', 'your database user name');
?define('DB_SERVER_PASSWORD', 'your database password');
?define('DB_DATABASE', 'name of your database');
?define('USE_PCONNECT', 'false'); // use persisstent connections?
?define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Good luck!

Link to comment
Share on other sites

I tried your suggestion, and thank you. However, my configure.php setting are correct. This means something in my database is wrong. And in my database everything appears to be set properly. I need help, please.

Link to comment
Share on other sites

lol my code is the same as yours, Elizabeth. THat end is fine. My database on the other hand is wrong, although it says its running on localhost. I dont know what to do

 

Well I hope it's not really the same as mine. :huh: And if it's right it should work! :o I really don't know what else to tell ya without any more info, but good luck to ya!

Link to comment
Share on other sites

ok, my configure.php info is

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'Ryanklamot');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osc1');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

Link to comment
Share on other sites

ok, my configure.php info is

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'Ryanklamot');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osc1');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Ryan, try logging into your control panel and checking the name of the database again. For example; I named my database simply db but when the database was created the actual name was mystic_db. The same was true for my username.

Link to comment
Share on other sites

I did, and whaddayaknow, it matches  :o  hmm im screwed

 

LOL Well until someone more knowledgable than me can help ya... yeah I guess you are! Hang in there... hasn't been a problem I have encountered yet that couldn't be fixed with the right expert advice! Unfortunately I am not that expert so I'm signing off since nobody's answering my problem post yet! :blush: I wish ya luck!

Link to comment
Share on other sites

Thank you very much Elizabeth!

 

And yes, I have checked the db info

 

 

Ryan here is my complete configure code... just something to compare to... don't know if it will help you or not!

 

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.mysticbluesgifts.com/'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.mysticbluesgifts.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'mystic_blues');
 define('DB_SERVER_PASSWORD', 'xxxx');
 define('DB_DATABASE', 'mystic_db');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

// moved to application_top.php
// WebMakers.com Added: Shoppe Enhancement Controller
//  require(DIR_WS_INCLUDES . 'configure_added.php');
?>

Link to comment
Share on other sites

There's a good reason why no one is able to help you. The problem is that the error message displayed is not descriptive enough. It is IMO impossible to troubleshoot.

 

Typically, mySQL throws error messages (that osC displays) to help you figure out what the problem is.

To see some common errors click here:http://www.oscommerce.com/forums/index.php?showtopic=94283

 

You claim that you have no problems accessing it using phpmyadmin, then double (triple) check that your defines are correct. If you really think that there is something wrong with your database, kill it and start over.

 

I also suggest that you write a simple php script called whateveryouwant.php that connects to your database. Whether or not it works will help you troubleshoot your problem.

 

HTH,

Robert

 

Oh yeah... whether or not you fix your problem, you should consider changing hosts. 'cause you get what you pay for.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...