Jump to content



Photo
- - - - -

Access Denied for User


This topic has been archived. This means that you cannot reply to this topic.
30 replies to this topic

#1   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 11 October 2004 - 22:17

I should make this it's own thread.

I was having login trouble where the login was sending me to an error page. So I searched the forums, found out it has to do with the configure.php SSL settings. I made the changes, uploaded the file and now I get this error when I go to my store's URL: Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/northwes/public_html/catalog/includes/functions/database.php on line 19
Unable to connect to database server!

I undid my changes to configure.php and reuploaded the file, but I still got that error. I checked line 19 of database.php and it says exactly what it's supposed to say: $$link = mysql_connect($server, $username, $password);

My configure.php code still says:
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?

I do not have SSL enabled (that I know of).

What changed and how do I fix it?!

#2   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 11 October 2004 - 22:20

you have a few things wrong, first the root@localhost means you do not have the proper username and password to access the database.
second, the configure.php file needs to have your http://www.domain.com and https://www.domain.com and ssl needs to be set to true.
if this is a new installation/store, try doing the install again.
John Oligario

Knowledge Base   Contributions

#3   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 11 October 2004 - 22:31

you have a few things wrong, first the root@localhost means you do not have the proper username and password to access the database.
second, the configure.php file needs to have your http://www.domain.com and https://www.domain.com and ssl needs to be set to true.
if this is a new installation/store, try doing the install again.

<{POST_SNAPBACK}>



(No attitude, just asking a sincere question) Why would I need to have a username and password to access the database? I'm just trying to go to my store. Why does it think I'm trying to access the database?

Adding my http and https URLs and changing SSL to true is what triggered this database error.

This isn't a new install. I have hundreds of products already uploaded and am hours away from opening up. I was just trying to fine tune this log in error while we were trying to configure with Authorize.net.

Any other suggestions?

#4   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 11 October 2004 - 23:01

osCommerce information is stored in the database. without that, the store gives you the error you have.

if all you did was set to true, then you have problems.

post both catalog/includes/configure.php and catalog/admin/includes/configure.php files here without the database username, password.
John Oligario

Knowledge Base   Contributions

#5   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 11 October 2004 - 23:17

osCommerce information is stored in the database.  without that, the store gives you the error you have.


Ah, I understand better now.

if all you did was set to true, then you have problems.


You can say that again! /wink.gif' class='bbc_emoticon' alt=';)' />

post both catalog/includes/configure.php and catalog/admin/includes/configure.php files here without the database username, password.

<{POST_SNAPBACK}>


Here's the catalog/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 (c) 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.northwest-games.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://www.northwest-games.com'); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // 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'
?>

Here's the catalog/admin/includes/configure.php:
<?php
/*
  $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 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', '');
  define('DB_SERVER_PASSWORD', '');
  define('DB_DATABASE', 'osCommerce');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', '');
?>

Do they both have to have the same SSL settings? Also, both configure.php files say 'USE_PCCONNECT', 'false', but the catalog/indcludes/functions/database.php file where the error told me I had a problem with line 19 says 'USE_PCCONNECT' == 'true'. Could this be an issue?

I have an email in with iPowerWeb asking how to make sure I have an SSL in place.

Thank you for your help so far!

#6   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 11 October 2004 - 23:28

pconnect to false. do you know what your database name, username and password is supposed to be?
that must be working before we canget it all working
ask support to reset the password for the database for the store, NOT DELETE THE DATABASE
John Oligario

Knowledge Base   Contributions

#7   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 00:01

pconnect to false.


Alrighty, moving forward now. I set PCCONNECT to false and now I have this error on my website: Warning: mysql_pconnect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/northwes/public_html/catalog/includes/functions/database.php on line 17
Unable to connect to database server!

Line 17 says: $$link = mysql_pconnect($server, $username, $password); - the same thing line 19 (the one with the error last time) said.

do you know what your database name, username and password is supposed to be?
that must be working before we canget it all working


Yes, I do know what my database name, username and password. It seems to still be working. We can access it all from the admin side still and it is intact.

ask support to reset the password for the database for the store, NOT DELETE THE DATABASE


I reset the password. Now, do I need to tell osCommerce to use the username, password and database name to give everyone access to the database? The first time around, I did that during the install, right?

Edited by Sonrisa, 12 October 2004 - 00:03.


#8   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 12 October 2004 - 00:51

if you can access your store admin site (http://www.mydomain.com/catalog/admin) then use the database username, password, etc from and insert that into your catalog/includes/configure.php
John Oligario

Knowledge Base   Contributions

#9   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 01:13

if you can access your store admin site (http://www.mydomain.com/catalog/admin) then use the database username, password, etc from and insert that into your catalog/includes/configure.php

<{POST_SNAPBACK}>


What is the DB_SERVER supposed to be? http://? www? Just as I have it?
// define our database connection
  define('DB_SERVER', 'northwest-games.com'); // 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'

Also, I'm still getting this error with the code uploaded as seen above (with username and password entered: Warning: mysql_pconnect(): Access denied for user: '***@66.235.203.25' (Using password: YES) in /home/northwes/public_html/catalog/includes/functions/database.php on line 17
Unable to connect to database server!

Here are lines 13-20 of the catalog/includes/functions/database.php file:
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 == 'false') {
17      $$link = mysql_pconnect($server, $username, $password);
18    } else {
19      $$link = mysql_connect($server, $username, $password);
20    }

Thank you for sticking by me with this. I appreciate your time and insight and hope we can find a solution. Is there anything else I can provide to help youunderstand what's going on?

#10   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 01:16

Oh.. and is this correct for the SSL settings in the catalog/includes.configure.php file?
 define('HTTP_SERVER', 'http://www.northwest-games.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://www.northwest-games.com'); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // secure webserver for checkout procedure?


#11   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 12 October 2004 - 02:36

dont change any of the source code files at all, please set them to original. the only files i want changed are the configure.php files.
John Oligario

Knowledge Base   Contributions

#12   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 14:52

dont change any of the source code files at all, please set them to original.  the only files i want changed are the configure.php files.

<{POST_SNAPBACK}>


Ok, I set database.php back to USE_PCCONNECT=true. The configure.php files say USE_PCCONNECT=false.

Is DB_SERVER supposed to be http://www.northwest-games.com or www.northwest-games.com or northwest-games.com? Are the http and https servers the same?

ENABLE_SSL is set as true.

I'm getting this error message: Warning: mysql_connect(): Access denied for user: 'northwes@66.235.203.25' (Using password: YES) in /home/northwes/public_html/catalog/includes/functions/database.php on line 19
Unable to connect to database server!

The error has moved back to line 19 of database.php

What do I do next?

Thanks!

#13   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 12 October 2004 - 14:56

db is normally localhost
please place in your configure.php file the username, database name and password which you said works from the admin side of hte store (catalog/admin/includes/configure.php)
John Oligario

Knowledge Base   Contributions

#14   Vger

Vger
  • Members
  • 16,978 posts

Posted 12 October 2004 - 15:11

I see you're using iPower Web, so have you paid to purchase a full ssl certificate? Or are you using their shared ssl certificate? If the latter thenyour pathway to ssl won't be https://yourdomain.com. Contact iPower Web to find out the correct path to use for their shared ssl. Here are two sample config files, which should help you to see what it is you are doing wrong.

admin/includes/configure.php
<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 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://yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://path_to_shared_ssl/yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTP_CATALOG_SERVER', 'www.yourdomain.com');
  define('HTTPS_CATALOG_SERVER', 'https://path_to_shared_ssl/yourdomain.com');
  define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
  define('DIR_FS_DOCUMENT_ROOT', '/var/www/html/'); // where the pages are located on the server,change if yours is different
  define('DIR_WS_ADMIN', '/admin/'); // absolute path required
  define('DIR_FS_ADMIN', '/var/www/html/admin/'); // absolute pate required
  define('DIR_WS_CATALOG', '/'); // absolute path required
  define('DIR_FS_CATALOG', '/var/www/html/'); // absolute path required, change if yours is different
  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', '127.0.0.1'); // eg, localhost - should not be empty for productive servers
  define('DB_SERVER_USERNAME', '*******');
  define('DB_SERVER_PASSWORD', '********');
  define('DB_DATABASE', '********');
  define('USE_PCONNECT', 'false'); // use persisstent connections?
  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

includes/configure.php

<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 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.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://path_to_shared_ssl/yourdomain.com'); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');
  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', '/var/www/html/');  //change if yours is different
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// 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', '*********');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

This is for an install into the root of your website e.g. www.yourdomain.com/index.php. But if you have installed into the 'catalog' folder e.g. www.yourdomain.com/catalog/index.php,then this will have to be added into the equation.

Hope this helps.

Vger

Edited by Vger, 12 October 2004 - 15:13.


#15   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 16:34

I see you're using iPower Web, so have you paid to purchase a full ssl certificate?  Or are you using their shared ssl certificate?  If the latter thenyour pathway to ssl won't be https://yourdomain.com.  Contact iPower Web to find out the correct path to use for their shared ssl.


I have not paid for a private SSL. The shared path is: https://hostxxx.ipow...rname/page.html which I have set to host203.ipowerweb.com/~northwes/catalog since I installed to the catalog folder, not the root folder.

I set both my configure.php files as you suggested and now I have this error message on my site: 1046 - No Database Selected

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

Here's how my code looks now:

includes/configure.php
 define('HTTP_SERVER', 'http://www.northwest-games.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://host203.ipowerweb.com/~northwes/catalog'); // eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'www.northwest-games.com');

AND

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', '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
define('HTTP_SERVER', 'http://northwest-games.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
  define('HTTP_CATALOG_SERVER', 'www.northwest-games.com');
  define('HTTPS_CATALOG_SERVER', 'https://host203.ipowerweb.com/~northwes/catalog');
  define('ENABLE_SSL_CATALOG', 'true'); // 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)

AND

define('DB_SERVER', '127.0.0.1');
  define('DB_SERVER_USERNAME', '***');
  define('DB_SERVER_PASSWORD', '***');
  define('DB_DATABASE', 'oscommerce');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');

Thanks for your help so far, how do I handle this new error? I'm sure I just have something designated incorrectly, but I'm not sure what.

#16   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 16:55

db is normally localhost
please place in your configure.php file the username, database name and password which you said works from the admin side of hte store (catalog/admin/includes/configure.php)

<{POST_SNAPBACK}>


Yes, but does "localhost" need to include http://www. or is it just northwest-games.com? If I have "localhost" in the incorrectly and the correct username, password and database name, it won't work.

I've also made the changes Vger suggested. Thought?

#17   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 12 October 2004 - 18:41

no, per the knowledge base on installation the default should be localhost with nothing else
John Oligario

Knowledge Base   Contributions

#18   Sonrisa

Sonrisa
  • Members
  • 25 posts

Posted 12 October 2004 - 21:39

no, per the knowledge base on installation the default should be localhost with nothing else

<{POST_SNAPBACK}>


I'm not trying to be dense here... my website domain is http://www.northwest-games.com. Which part of that is "localhost"? Or am I just supposed to type in "http://localhost"?

Also, I did everything Vreg told me to do and now I have this error: 1046 - No Database Selected

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

Do you know what that means and where I need to look to fix it?

#19   Mibble

Mibble
  • Members
  • 13,404 posts

Posted 12 October 2004 - 23:22

this is from a working system:

<?php
/*
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 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.domain.com'); // eg, http://localhost - should not be empty for productive servers
  define('HTTPS_SERVER', 'https://www.domain.com');  
// eg, https://localhost - should not be empty for productive servers
  define('ENABLE_SSL', true); // secure webserver for checkout procedure?
  define('HTTP_COOKIE_DOMAIN', 'www.domain.com');
  define('HTTPS_COOKIE_DOMAIN', 'www.domain.com');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
  define('DIR_WS_HTTP_CATALOG', '/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/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', '/home/domain/public_html/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
  define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
  define('DB_SERVER_USERNAME', 'dbusername_osc');
  define('DB_SERVER_PASSWORD', 'dbpassword');
  define('DB_DATABASE', 'databasename_osc');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

John Oligario

Knowledge Base   Contributions

#20   Vger

Vger
  • Members
  • 16,978 posts

Posted 13 October 2004 - 00:19

Mibble - the config files I posted were also from a working system, but it depends upon which company you host with, and what set up they use as to whether you should use 'localhost' or '127.0.0.1' for DB_SERVER. Perhaps I should have made this clear in my post. From the error that's now being generated it looks as though 'localhost' is needed for this server.

My hosts used to use 'localhost', and then they upgraded their servers and all osCommerce sites had to be reset to '127.0.0.1' for them to work.

Vger

Edited by Vger, 13 October 2004 - 00:21.