Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to connect to Database Server Error


DjaieW

Recommended Posts

Have you checked includes/configure.php and admin/includes/configure.php to make sure that the path is correct. The paths are specified near the bottom of the file

 

As an example

// define our database connection
 define('DB_SERVER', '127.0.0.1'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osc1'); //this is the name you have specified for the osc database

 

Is the store on a local computer or with a host.

Link to comment
Share on other sites

Have you checked includes/configure.php and admin/includes/configure.php to make sure that the path is correct. The paths are specified near the bottom of the file

 

As an example

// define our database connection
 define('DB_SERVER', '127.0.0.1'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osc1'); //this is the name you have specified for the osc database

 

Is the store on a local computer or with a host.

 

 

my site is with a host. Also, I get an error message when I try to upload the .htaccess files to the server. Could this have something to do with it?

Link to comment
Share on other sites

Until you delete the install folder the programme does not look at the two configure.php files - so this is why you only see the error when you delete that folder.

 

As per the advice above check in both your includes/configure.php and your admin/includes/configure.php file - because it sounds as if the installation did not write any data into them.

 

If you are getting errors when uploading a .htaccess file then it's probably because your host doesn't allow the use of them.

 

Vger

Link to comment
Share on other sites

Thanks Vger! however, both of the configure.php files appear to be correct. I am using Yahoo! Small Business to host my site and I cannot find a way to make the configure.php files 'read only'. I found that I can add a chmod() script to a file but I have no clue where. I can email you a copy of my configure.php files if you would like to take a look at them. at this point in time...I have moved the 'install' folder into my 'admin' folder (except it's renamed) and now the only error I get is the write-access to the configure.php files......I'm half way there!

Link to comment
Share on other sites

Yahoo is the problem - hopeless for osCommerce sites. To 'chmod' the file using another file, do this:

 

Create a new text document on your desktop and rename it to chmod.php. Put this code in it:

 

<?php
chmod ("includes/configure.php", 0444);
?>

 

Upload it to the root of your website and go to it in a browser e.g. http://www.yourdomain.com/chmod.php - you won't see anything but it shuld change the permissions. Delete the 'chmod' file after using.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...