Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Can't Connect To Database


Recommended Posts

I'm a FeaturePrice refuge, setting up my cart on a new server.

I went from a Plesk server to H-Sphere. FTP'd all the files. Installed the sql database and inserted the back up. It all looks fine. But when I try to run my admin or catalogue I get: Unable to connect to database server!


Here's my admin/includes/configure.php





$Id: configure.php,v 1.13 2002/07/20 09:08:31 project3000 Exp $


osCommerce, Open Source E-Commerce Solutions



Copyright © 2002 osCommerce


Released under the GNU General Public License



// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

define('HTTP_SERVER', 'http://www.hand-dyedfibers.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.hand-dyedfibers.com');

define('HTTPS_CATALOG_SERVER', 'https://www.hand-dyedfibers.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/hsphere/local/home/vikkic/hand-dyedfibers.com'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/admin/');


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


define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');


// define our database connection

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'vxxxxx');

define('DB_SERVER_PASSWORD', 'xxxx');

define('DB_DATABASE', 'xxxx');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');


Link to comment
Share on other sites

Check that vxxxxx@localhost has access permissions to the database...This does *not* get set up automatically. Also, you may want to check with your host and see if the database is on the same server as the web pages (it does not have to be!). If not, localhost is not the correct value. Also, does your host have the php/MySQL links turned on (they probably do, but never neglect the simple explanation).


In general, your host should be able to help you better with this than we could. They are the ones who can check database setup, etc. We can mainly suggest questions to ask them.


Good luck,


Link to comment
Share on other sites


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

  • Create New...