Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database Access Problem


starmakersandy

Recommended Posts

Posted

Hello,

 

I installed osCommerce a couple of months ago without a SSL, and recently added one (about two-three weeks ago).

 

I wasn't having any difficulty getting into the catalog admin when I made the change. A few days ago, I updated

all the links on my website to refer to the secure https addy. Today I could not login to the admin for my catalog.

 

The error message:

 

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

Unable to connect to database server!

 

I checked the database.php file (not that I would know if I saw anything wrong). Lines 13 through 20 are:

 

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

14 global $$link;

15

16 if (USE_PCONNECT == 'true') {

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

18 } else {

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

20 }

 

Next, I went into my webhost control panel to check the database. The user and password I'd had set up for the database were missing. So I reinstalled them, reconnected them to the database and tried again.

 

I still can't get into my catalog admin section.

 

I will be forever grateful for any help anyone can give me.

 

Sandra

P.S. the website catalog address is https://www.asylett.com/catalog

Posted

That error is a little misleading. The database.php won't help you. You need to open admin/includes/configure.php. Make sure your database info is correct (at the bottom).

Other great Open Source (Free) programs: (Free as in free speech not free beer)

The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS

How do I find these programs? Google Search!

Posted
That error is a little misleading. The database.php won't help you. You need to open admin/includes/configure.php. Make sure your database info is correct (at the bottom).

 

 

Nate,

 

Thank you!!! Thank you so much!!! I'm back in, now. Whew!

 

The information was correct in the catalog/includes/configure.php but not in the admin/includes/configure.php

 

There, it was set as follows:

 

// define our database connection

define('DB_SERVER', '');

define('DB_SERVER_USERNAME', 'mysql');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', '');

 

I had wondered about those settings when I first saw them, but I wasn't sure if I should change them. For one thing, I hadn't altered these settings, so I thought they were established during the setup and should remain as they were... and that thought was reinforced by the fact that it was working fine before.

 

Again, thank you so much for your assistance.

 

Sandra

Posted

I think I may have spoke too soon... I was able to login, but when I tried to access Reports, I received the following error:

 

The requested URL /admin/stats_products_purchased.php was not found on this server.

 

The same with Configuration, Modules, etc... I receive an error message for each that says they're not there.

 

Yikes!

 

Can anyone help?

 

Sandra

Posted

could it be that in that same config file you did not specify the https address?

 

mine says for example:

 

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

define('HTTPS_CATALOG_SERVER', '');

 

I would imagen youd have to add your address in the difine https section

Posted
let me know how you sole it, I want to change to https as well

 

Lady M

 

I have lines 16, 17, 18 (define HTTP SERVER/HTTP CATALOG SERVER/HTTPS CATALOG SERVER) all set to https://www.asylett.com in both configuration.php files.

 

Now I can get to the Admin main page, but it won't access the database. Every option says the files are not on the server.

 

I'll let you know when it's resolved.

 

Sandra

Archived

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

×
×
  • Create New...