Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

connect to database server


ldmartisans

Recommended Posts

my web site www.ldmartisans.com has a button to enter my store

when that button is used i was getting the message in pink at the top of the monitor to change permissions

i did that last week and had to re install because i did the chat line with a "tech" and he just made it worse and then said

i had to re install. since it was fairly new i did re install however i was ready to let people buy from the site and wanted to remove that message and went to my file manager and change the attributes in the file includes/configure.php and then got this message. i tried the chat line again and he did not know so he told me to submit a ticket.

can anyone help--my store is still there because i can access in the admin section.

this is the message

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/l/d/m/ldmartisans/html/shop/includes/functions/database.php on line 19

Unable to connect to database server!

Link to comment
Share on other sites

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/l/d/m/ldmartisans/html/shop/includes/functions/database.php on line 19

Unable to connect to database server!

 

In /catalog/includes/configure.php do you have the same database settings exactly as you do in /catalog/admin/includes/configure.php?

Link to comment
Share on other sites

In /catalog/includes/configure.php do you have the same database settings exactly as you do in /catalog/admin/includes/configure.php?

 

this is includes/configure.php

<?php

/*

$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

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

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

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

define('HTTP_COOKIE_DOMAIN', '');

define('HTTPS_COOKIE_DOMAIN', '');

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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

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

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

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

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

?>

 

this is catalog/admin/includes/configure.pho

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

define('DB_SERVER_USERNAME', 'mysql');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', '');

Link to comment
Share on other sites

looks like there are differences. should i just update the differences?

 

Something is amiss here. How are you able to enter the admin side of oscommerce? There are no database setting. Also, please don't post your database setting and passwords for your sakes.

Link to comment
Share on other sites

Something is amiss here. How are you able to enter the admin side of oscommerce? There are no database setting. Also, please don't post your database setting and passwords for your sakes.

there were database settings how do i get this fixed other than deleting it and re installing?

Link to comment
Share on other sites

ok that was part of the new installation with the template install--where do i re enter it now?

 

In both configure.php files fill in the blanks.

 

define('DB_SERVER', 'localhost or whatever your host it');
define('DB_SERVER_USERNAME', 'your mysql username');
define('DB_SERVER_PASSWORD', 'your mysql user password');
define('DB_DATABASE', 'your mysql database name');

Link to comment
Share on other sites

In both configure.php files fill in the blanks.

 

define('DB_SERVER', 'localhost or whatever your host it');
define('DB_SERVER_USERNAME', 'your mysql username');
define('DB_SERVER_PASSWORD', 'your mysql user password');
define('DB_DATABASE', 'your mysql database name');

i did it as shown here but now i get another error message

/ define our database connection

define('DB_SERVER',h50mysql93.secureserver.net '');

define('DB_SERVER_USERNAME', ldmartisans37848);

define('DB_SERVER_PASSWORD', Ldm1331 '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', '');

 

the error message is

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/l/d/m/ldmartisans/html/shop/includes/configure.php on line 40

 

i put it all back again and now i cannot access my admin catalog

Link to comment
Share on other sites

i did it as shown here but now i get another error message

/ define our database connection

define('DB_SERVER',h50mysql93.secureserver.net '');

define('DB_SERVER_USERNAME', ldmartisans37848);

define('DB_SERVER_PASSWORD', Ldm1331 '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', '');

 

the error message is

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/l/d/m/ldmartisans/html/shop/includes/configure.php on line 40

 

i put it all back again and now i cannot access my admin catalog

 

 

this got way too complicated--i copied and pasted back the install files and i am entering all the info over again. i hope it all comes back--

Link to comment
Share on other sites

define('DB_SERVER',h50mysql93.secureserver.net '');

define('DB_SERVER_USERNAME', ldmartisans37848);

define('DB_SERVER_PASSWORD', Ldm1331 '');

 

Whoa! You put your usernames and passwords online. You need to change this and a word to the wise don't ever post this kind of information into a public forum.

 

Regarding the error if you take a look at your constants you have not put your info inside of the apostrophes. Should look like this:

 

define('DB_SERVER', 'h50mysql93.secureserver.net');
define('DB_SERVER_USERNAME', 'ldmartisans37848');
define('DB_SERVER_PASSWORD', 'Ldm1331');

 

Change your passwords. LOL!

Link to comment
Share on other sites

Whoa! You put your usernames and passwords online. You need to change this and a word to the wise don't ever post this kind of information into a public forum.

 

Regarding the error if you take a look at your constants you have not put your info inside of the apostrophes. Should look like this:

 

define('DB_SERVER', 'h50mysql93.secureserver.net');
define('DB_SERVER_USERNAME', 'ldmartisans37848');
define('DB_SERVER_PASSWORD', 'Ldm1331');

 

Change your passwords. LOL!

 

 

thanks for taking the time to reply. i was not in good shape when i sent that email and yes i will change it. my basement was flooding, things were flying around in my backyard and i was trying to get my web site store up and running for the holiday!!!!

my constant question and what started this is that in the purchased template once it is set up has two messages at the top of the store home page one is to delete the install files which i do with no problem the other is to change persmissions and that is where i am having problems. i have done it several times i guess in the wrong places and had to re install the entire store. the "tech help" is worthless and don't even understand the questions, they give you suggestions and when that fails they come back with "sorry i guess you will have to re install". i believe the correct answer is to go online to the file manageer of my provided and change the permissions there. they cannot be changed in explorer or total control or anywhere else that i can see.

if you understand this please repond and if not thanks for reading.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...