wesupport

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

osCommerce database settings – Common errors and fixes

by | Sep 8, 2019

osCommerce website stores data in a MySQL database.

Hence, understanding osCommerce database settings are really crucial for site management.

Any sort of database error messes up the entire website.

At Bobcares, we often get requests to correct osCommerce database errors as a part of our Server Management Services.

Today, let’s have a look into the database settings of the osCommerce website and see how our Support Engineers fix it.

 

Database settings in the osCommerce website

Firstly, let’s discuss the database settings of the osCommerce website.

osCommerce uses PHP as the programming language and MySQL as the database. For any e-commerce site, a database is important for storing and fetching data related to the website.

By default, osCommerce takes note of the database details during the installation. But, for further editing these details, we need to edit the configuration file.

So, let’s have a look into the osCommerce configuration file and database details.

The default location of the osCommerce website is in the document root. Usually, there are two configure.php files. To make changes in the website front end we edit the file,

includes/configure.php

And for managing the administration area, we use the file,

admin/includes/configure.php

However, both files contain similar data. The typical database details in both files look like,

define('DB_SERVER', 'localhost');define('DB_SERVER_USERNAME', 'database_username');define('DB_SERVER_PASSWORD', 'database_password');define('DB_DATABASE', 'database_name');

 

These details are very important for a proper connection with the database. Therefore, incorrect or invalid database details, typo errors, extra white spaces in the database details, etc. result in database errors.

 

Common errors related to database setting

Now, let’s have a look into a few database settings that causes an error in the osCommerce website. Mostly, database errors occur either during the installation steps or while making changes in the configuration file.

 

Database errors during installation

First and foremost, osCommerce connects to a database in the second step of installation. Mostly, the common errors during installation are:

 

1.Incorrect database details

During installation, osCommerce verifies the database details by connecting to the given database.

If the given details are incorrect, or if the database with given details does not exist, it results in errors.

In some cases, the database user does not have enough privileges on the given database, and we get the error message as,

Access denied for user 'dbUser'@'localhost' (using password: YES)

 

In this case, the Support Team rechecks the database details in the configuration file and database user privileges.

Mostly, the database user may not have enough privileges on the given database. Hence we make sure that the database and the database user with all privileges exist.

 

2. MySQL service not working

Similarly, if the mysqld service is not running then, osCommerce cannot connect to the database and we get the following error,

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'(2)

 

For fixing this error, our Support Team restarts the mysqld service.

If the mysqld restart doesn’t work, we manually kill the process and then restart it again.

The successful restart of the mysqld service and reloading of the installation page resolve this error.

 

3. Missing MySQL extensions

In some cases, osCommerce installation shows up an error on missing MySQL extension. This error message appears as,

osCommerce database setting error missing mysql extenstion

 

When our customers have this error, our Support Team fix it by checking the file catalog/install/templates/pages/index.php.

We check the code in the file and correct it. Later, we save the file and reload the installation page.

 

Errors in Database configuration settings

Additionally, osCommerce can report errors due to incorrect database configuration too.

At times, the customer may have to change the database server to a remote host. In this case, there are a few important points to consider.

While changing the database server, we need to update the details manually in the configuration file.

Mostly, the manual entry of data in the configuration file results in syntax errors, typo errors, etc.

When our customers approach us with this error, the Dedicated Engineers check the file and correct the errors.

Most importantly, when the customer changes the database server to a remote host, then the configuration file must have the following update,

define('DB_SERVER', 'remotehost');

 

Usually, the support team checks and confirms the database server settings from the front panel. To find the details we navigate as, osCommerce Administration>> Tools>> Server info.

The server information will be updated as:

osCommerce database settings in server info

 

[Need help in osCommerce database settings? – We will help you]

 

Conclusion

In short, we saw the importance of the osCommerce database settings in managing the website. We also saw possible errors that occur due to improper database settings and how our Support Engineers fix it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags