Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upgrade Problem


Guest

Recommended Posts

Hello,

 

I upgraded from osCommerce 2.2-MS2 to the latest RC2 build. I simply replaced the existing files. The front end is fine however the admin end gives the following error:

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql'@'localhost' (using password: NO) in /home/somethin/public_html/shop/admin/includes/functions/database.php on line 19

Unable to connect to database server!

 

Any ideas?

 

Thanks.

Link to comment
Share on other sites

The database section of your configure.php file in your shop/includes folder must be

identical to the one inside shop/admin/includes folder.

define('DB_SERVER', '');

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

The database section of your configure.php file in your shop/includes folder must be

identical to the one inside shop/admin/includes folder.

 

Hello,

 

OK, I coped it over so that it's the same.

 

Now here's the issues:

 

 

1.

 

http://www.somethingdifferentgiftshoppe.com/shop/admin/

 

This redirects to: http://www.somethingdifferentgiftshoppe.co...d066c9093476ee8 - which doesn't load.

 

 

2.

 

http://www.somethingdifferentgiftshoppe.co...admin/login.php

 

1054 - Unknown column 'id' in 'field list'

 

select id from administrators limit 1

 

[TEP STOP]

 

 

Any ideas?

 

Thanks for your help with this.

Link to comment
Share on other sites

Post your admin/includes configure.php file without the database section.

 

Here:

 

<?php
/*
 $Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

 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.somethingdifferentgiftshoppe.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://ssl111.securednshost.com/~somethin'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.somethingdifferentgiftshoppe.com');
 define('HTTPS_COOKIE_DOMAIN', 'ssl111.securednshost.com');
 define('HTTP_COOKIE_PATH', '/shop/');
 define('HTTPS_COOKIE_PATH', '/shop/');
 define('DIR_WS_HTTP_CATALOG', '/shop/');
 define('DIR_WS_HTTPS_CATALOG', '/shop/');
 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']) . '/home/somethin/public_html/shop/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

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

Link to comment
Share on other sites

... however the admin end gives the following error:

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql'@'localhost' (using password: NO) in /home/somethin/public_html/shop/admin/includes/functions/database.php on line 19

Unable to connect to database server!

The way I read the error message...

In your shop > admin > includes > configuration.php file, the password does not match what is set for your database access.

Check this line in the above highlighted file -

// define our database connection

define('DB_SERVER_PASSWORD', 'correctpassword');

 

Here:

 

 

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/home/somethin/public_html/shop/'); (See Note 1)

// define our database connection

define('DB_SERVER_PASSWORD', '*******'); (See Note 2)

 

Note 1:

Mine looks like -

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

 

Note 2:

Make sure your password matches that of what you have it set too for the database.

 

Your posted code looks like it is from shop > includes > configuration.php, NOT shop > admin > includes > configuration.php.

You will have to check your settings in shop > admin > includes > configuration.php.

 

 

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

OK, got it fixed apart from this error:

 

1054 - Unknown column 'id' in 'field list'

 

select id from administrators limit 1

 

[TEP STOP]

 

Here's my code for /admin/includes/configure.php

 

<?php
/*
 $Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', '');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // 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_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_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', 'somethin_admin');
 define('DB_SERVER_PASSWORD', '*******');
 define('DB_DATABASE', 'somethin_shop');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

Link to comment
Share on other sites

Here's my code for /admin/includes/configure.php

 

/*

$Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

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.somethingdifferentgiftshoppe.com');

define('HTTP_CATALOG_SERVER', 'http://www.somethingdifferentgiftshoppe.com');

define('HTTPS_CATALOG_SERVER', 'https://ssl111.securednshost.com/~somethin');

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

define('DIR_FS_DOCUMENT_ROOT', '/some/path/like/this/public_html/');

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

define('DIR_FS_ADMIN', '/some/path/like/this/public_html/shop/admin/');

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

define('DIR_FS_CATALOG', '/some/path/like/this/public_html/shop/');

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', 'somethin_admin');

define('DB_SERVER_PASSWORD', '*******');

define('DB_DATABASE', 'somethin_shop');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...