Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with themplates -Unable to connect to database server!


monokou

Recommended Posts

I am tired of trying to install a new template on oscommerce. I am not an expert on pcs, so it is difficult for me :wacko: . Please help me if it is possible. I am trying to have an e-shop. I've updated a template from ftp to my server - rewrited on the other template via httpdocs folder. then my site started to show me this message ; Unable to connect to database server! I did not know what I were supposed to do.. so I changed some codes manually as I had seen from another topic... http://www.oscommerce.com/forums/index.php?showtopic=193738&hl= this one.. but the problem still exists! What shall I do? :'( please help me..

thank you

Link to comment
Share on other sites

Kons,

 

 

When you wrote over the files on your server, you more than likely wrote over the two configure.php files.

 

/includes/configure.php

/admin/includes/configure.php

 

Will need to be updated to reflect your server settings and database settings.

 

 

 

Chris

Link to comment
Share on other sites

Chris,

here are the documents.

includes/configure.php

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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.mysite.gr'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://secure.mysite.gr'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.mysite.gr');

define('HTTPS_COOKIE_DOMAIN', 'secure.mysite.gr');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

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', '/htdocs/mysite/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'myIPforVserver'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'myusernameforbecometheadmin');

define('DB_SERVER_PASSWORD', 'mypasswordtobecometheadmin');

define('DB_DATABASE', 'oscommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

 

admin/includes/configure.php

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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.mysite.gr'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.mysite.gr');

define('HTTPS_CATALOG_SERVER', 'https://secure.mysite.gr');

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

define('DIR_FS_DOCUMENT_ROOT', 'htdocs/mysite/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/htdocs/mysite/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_FS_CATALOG', 'htdocs/mysite'); // absolute path required

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', 'theIPforVserver'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'myusernametobecometheadmin');

define('DB_SERVER_PASSWORD', 'mypasswordtobecomeanadmin');

define('DB_DATABASE', 'oscommerce';

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

I am trying to get on my site...it loads very slowly and then it gives me the message Unable to connect to database server!

 

thank you for the fast response :)

Link to comment
Share on other sites

Kons,

 

 

When you wrote over the files on your server, you more than likely wrote over the two configure.php files.

 

/includes/configure.php

/admin/includes/configure.php

 

Will need to be updated to reflect your server settings and database settings.

 

 

 

Chris

 

 

 

Chris,

here are the documents.

includes/configure.php

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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.mysite.gr'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://secure.mysite.gr'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.mysite.gr');

define('HTTPS_COOKIE_DOMAIN', 'secure.mysite.gr');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

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', '/htdocs/mysite/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', 'myIPforVserver'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'myusernameforbecometheadmin');

define('DB_SERVER_PASSWORD', 'mypasswordtobecometheadmin');

define('DB_DATABASE', 'oscommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

 

admin/includes/configure.php

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 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.mysite.gr'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.mysite.gr');

define('HTTPS_CATALOG_SERVER', 'https://secure.mysite.gr');

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

define('DIR_FS_DOCUMENT_ROOT', 'htdocs/mysite/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/htdocs/mysite/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_FS_CATALOG', 'htdocs/mysite'); // absolute path required

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', 'theIPforVserver'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'myusernametobecometheadmin');

define('DB_SERVER_PASSWORD', 'mypasswordtobecomeanadmin');

define('DB_DATABASE', 'oscommerce';

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

I am trying to get on my site...it loads very slowly and then it gives me the message Unable to connect to database server!

 

thank you for the fast response :)

Link to comment
Share on other sites

Please do not bump your posts, Chris is sleeping now anyway.

 

However, 2 easy ways to go

1) replace the 2 configure files of the template with your original configure.php files from your backup

 

2)do following

- make a backup of your db

- run the installation program

- after installed import back your database

Link to comment
Share on other sites

Please do not bump your posts, Chris is sleeping now anyway.

 

However, 2 easy ways to go

1) replace the 2 configure files of the template with your original configure.php files from your backup

 

2)do following

- make a backup of your db

- run the installation program

- after installed import back your database

 

Γιωργο σε ευχαριστω πολύ,

Τωρα μια που εισια και Ελληνας.. δεν μου τα λες και στα ελληνικα μπας και καταλαβω τιποτα? ε? Σε ευχαριστω πολύ..

δεν ειμαι προγραμματιστης και ειμαι ασχετη...

μεσω μιας εταιριας πηρα το oscommerce... τι πρεπει να κανω? να ξανακατεβασω το oscommerce και να ανεβασω σε εμενα το configure.php ?

Link to comment
Share on other sites

The issue is that you try to install some old crappy "free" template that requires register globals to be on

 

Do not use it

 

Either design your store on a new original 2.3.1, or buy a proper template or hire a developer. There is no other way to go

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...