Numloch Posted February 23, 2004 Posted February 23, 2004 I really hope someone can help me. I have set up my store, everything seems to be working well except the secure paying element. I have my website and database on one server and I have a shared SSL on a different server. I have copied the Os Catalog to both servers as I don't know how to set up the secure side of things. If I don't use enable ssl in configure.php then the catalog works OK but obviously it is insecure. If I enable ssl it goes to the secure site but gives me an error message cannot connect to MySql. So effectively I can't get my secure site to connect to my database on the other site. I hope this makes sense. Please can someone help me. My code at the moment is: define('HTTP_SERVER', 'http://webserver/catalog/') define('HTTPS_SERVER', 'https://securehost.com/user/') define('ENABLE_SSL', true) 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', 'localhost'); define('DB_SERVER_USERNAME', 'user'); define('DB_SERVER_PASSWORD', 'pass'); define('DB_DATABASE', 'database_name'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); I get this response when I go to the checkout (secure part) Warning: mysql_connect(): Access denied for user: '[email protected]' (Using password: YES) in /home/hjs601/public_html/catalog/includes/functions/database.php on line 19Unable to connect to database server! Please help me, this is driving me crazy. thanks
Guest Posted February 23, 2004 Posted February 23, 2004 Try this: define('HTTP_SERVER', 'http://webserver') define('HTTPS_SERVER', 'https://securehost.com/user') define('ENABLE_SSL', true) define('HTTP_COOKIE_DOMAIN', 'webserver'); define('HTTPS_COOKIE_DOMAIN', 'securehost.com/user'); 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', 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', 'localhost'); define('DB_SERVER_USERNAME', 'user'); define('DB_SERVER_PASSWORD', 'pass'); define('DB_DATABASE', 'database_name'); define('USE_PCONNECT', 'true'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); Matti
Numloch Posted February 23, 2004 Author Posted February 23, 2004 Thanks Matti I'm definitely headed in the right direction, but I'm still getting this error message: Warning: mysql_pconnect(): Access denied for user: 'user@localhost' (Using password: YES) in /home/user/public_html/catalog/includes/functions/database.php on line 17Unable to connect to database server! Can you tell me do I use the same config in catalog/includes/configure.php on both the webpage/database site and the secure site?
hillbilly Posted February 23, 2004 Posted February 23, 2004 Can you access shared ssl with just 'https://securehost.com/user/ I have to use 'https://securehost.com/~user
Numloch Posted February 23, 2004 Author Posted February 23, 2004 My code is a bit misleading it is actually https://securehost.com/~user . Do you think I should try it without the ~?
Numloch Posted February 23, 2004 Author Posted February 23, 2004 Is it neccessary to have the catalog in both the secure and insecure servers? Should I just have the entire catalog on the secure server? In which case do I have to start from the beginning on the secure server to set up the configurations? I really don't know what to do next. This is so frustrating as there is just this secure connection which is preventing me from selling online, everything else seems to be working fine? Heeeeeeeelp!!
♥ecartz Posted February 24, 2004 Posted February 24, 2004 If you are using localhost for the DB on one server but have two servers, you will need to specify the database differently on the other server. You may also want to write the file system configurations differently on the two servers. You would want to check with your host as to how to configure this. I would also turn persistent connections off, but YMMV. This is not currently your problem. Btw, if you are hosting your own servers, it would be easier to run SSL and non-SSL on the same server (both pointing to the same directory) with osCommerce. Makes it easier to configure and manage. Hth, Matt Always back up before making changes.
Numloch Posted February 24, 2004 Author Posted February 24, 2004 What do you mean by file system configurations? Is that a file that you can change manually or is it an admin thing?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.