Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help with big problem


ErikOS

Recommended Posts

I had problems confiquring my cart on a cpanel server. The files were originally on an hsphere server. I put the files on the new server in the root. There were 2 folders /catalog and /admin. When I went to view the site, it was pointing to the old server. The graphics were still looking at the other servers folders. So what I did was leave these two folders on the new server and rename them. I up loaded the oscommerce 2.2 catalog folder with install files to the new servers root. I ran install and everything connected properly. So what I tried to do was take my original site files and replace them over the newly created cart. The site was all messed up. I realized that in the oscommerce 2.2 package that the directory structure was different. It was set up like this; /catalog and /catalog/admin. The original file folders were set up like this /catalog and /admin. So I ended up deleting the newly installed cart from the oscommerce 2.2 and rename my 2 old folders back to /catalog and /admin. Now the site still points to the old server but the admin tool is now looking for the /catalog/admin structure and not the original way of /admin. I also took the 2 confiq files that were created from the install and put them in the proper folders in the folders /catalog and /admin. Can someone help the setting up of these files on the new server. It seems like there are actually more files that need to be changed then just the 2 configs. Because the when I replaced the 2 configs in the site and checked the paths were correct pointing to the new server, but when you view the site everything is pointing to the old server with the wrong paths in the admin which is now this /catalog/admin but should be /admin in the root.

Link to comment
Share on other sites

dang, you need to break your post up into paragraphs.

 

you cant just move a site from one server to another without changing the configure.php files for the paths to the new server. you need to check your settings and match up to your current server.

Link to comment
Share on other sites

Thanks! I changed the properties in the confiq files but it still doesn't point to the new server. It there anything else that needs to be changed besides those 2 files? it seems like it must.

 

I installed a cart on the new server using the wizard. Then put my new files on this server and removed every file from the installed cart except the 2 config files because these were configured right. Then I put these 2 files into my cart files that I want to use for my store. but it still points to the old server still even with the right config in the 2 files.

 

Is there more that needs to be done?

Link to comment
Share on other sites

post your 'original' files from the first server, without the database info.

 

then post the configure.php files from the new server, without the db info.

 

also i need to know what your document root is

 

post this in the root, named phpinfo.php

 

<?php phpinfo(); ?>

Link to comment
Share on other sites

old server config for catalog

 

<?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.newsite.com'); // 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', '/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', ''); // 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', ''); // leave empty '' for default handler or set to 'mysql'

?>

 

*******************************************************

new config file for new server (catalog)

 

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

?>

Link to comment
Share on other sites

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '');


define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'your user name here');
define('DB_SERVER_PASSWORD', 'your password here');
define('DB_DATABASE', 'your database name here');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql'); //

 

Vger

Link to comment
Share on other sites

could some help and let me know if anything else is needed in configure for the catalog. I have placed notes in the properties to explain how I did this. even when I put the proper site url in the

 

define('HTTP_SERVER', 'http://www.Iputthedomainnamehere.com');

 

when I view the site it still points to my old database and server?? thanks

 

 

<?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.Iputthedomainnamehere.com'); // 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', '/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', '98.56.32.08'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'I put the username here');

define('DB_SERVER_PASSWORD', 'I put the password here');

define('DB_DATABASE', 'I put the exact database name here');

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

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

?>

Link to comment
Share on other sites

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '');
define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
define('DB_SERVER_USERNAME', 'your user name here');
define('DB_SERVER_PASSWORD', 'your password here');
define('DB_DATABASE', 'your database name here');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql'); //

 

Vger

 

 

HI, the funny thing is which I don't understand is that I did this exact thing. Can you look at the example I gave above. I did what you said

Link to comment
Share on other sites

Not from the example you gave above you haven't. Your cookie domain isn't in there, neither is your path to '/catalog/', and none of the details for your database are there (don't post your user name and password here).

 

Vger

HI, the funny thing is which I don't understand is that I did this exact thing. Can you look at the example I gave above. I did what you said

Link to comment
Share on other sites

Not from the example you gave above you haven't.  Your cookie domain isn't in there, neither is your path to '/catalog/', and none of the details for your database are there (don't post your user name and password here).

 

Vger

 

thanks for your help! this is what I put. one note: my servers document root is /home/shopshopping/public_html

 

all my folders catalog and admin are in the public_html folder I also noticed a www folder which have the same files. I wanted to see if these folders (catalog and admin) were the same files.

 

so I uploaded a file called test.php into public_html/catalog and the saw the file was there. Then I looked in the www/catalog folder and then I saw the same file. But this was only uploaded into the public_html/catalog folder. This lead me to believe they are actually the same folder with different name www and public_html

 

<?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.mydomain.com'); // 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', 'www.mydomain.com');

define('HTTPS_COOKIE_DOMAIN', ' ');

define('HTTP_COOKIE_PATH', 'www.mydomain.com');

define('HTTPS_COOKIE_PATH', ' ');

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

define('DB_SERVER_USERNAME', 'shop_shopping');

define('DB_SERVER_PASSWORD', 'Password');

define('DB_DATABASE', 'shop_Database');

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

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

?>

Link to comment
Share on other sites

This code:

  define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
 define('HTTP_COOKIE_PATH', 'www.mydomain.com');

Should be like this:

  define('HTTP_COOKIE_DOMAIN', '.mydomain.com');
 define('HTTP_COOKIE_PATH', '/');

This makes the cookie scope domain wide. The only reason why you would want to set it as ANYTHING else is because you have more than one store on the domain. For instance, domain.com/store1, domain.com/store2, domain.com/store3, etc. In this case the HTTP_COOKIE_PATH would be '/store1/', '/store2/', etc. so as to limit the scope. Do yourself a favor and a lot of debug headaches by just opening up the cookie domain wide...

 

Now, let's do some basic debugging. First, look at your phpinfo() file and see what it says. You would be surprised how much info is in there to help the cause. Alternately, create a test script on your server with the following code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Error - Debug Script</title>
</head>
<body>
<?
echo $_SERVER["SCRIPT_NAME"];
echo '<br>'.$_SERVER["argv"];
echo '<br>'.$_SERVER["argc"];
echo '<br>'.$SERVER_NAME;
echo '<br>'.getenv("PATH_INFO");
echo '<br>'.$PATH_TRANSLATED;
echo '<br>'.$SCRIPT_NAME;
echo '<br>'.$QUERY_STRING;
echo '<br>'.$REQUEST_URI;
?>
</body>
</html>

Call the error.php file in the browser and take a look at the output. Does any of it look out of place?

 

I worked with someone a few weeks back that had similiar troubles (on iPowerweb server). At any rate, instead of moving the entire domain to a new user directory they simply changed the user dir name and CHMOD:CHGRP'd -R all the files. The issue was that a few files were missed and belonged to the old user...therefore were not accesible to the new user.

 

So, if you have SSH access get in there and ls -l the directories to check the ownership.

Link to comment
Share on other sites

Hey everyone, thanks for your help on this. I found the problem and fixed it. there is another folder in the includes folder for catalog and admin call local

 

within this folder is a file called configure.php which overwrites any configuration you have in the other 2 config files ( admin/includes/config and catalog/includes/config)

 

when you install the oscommerce cart on a server this file is automatically created for the local server. When you move files to a new server make sure you also change this file along with the other 2 configs

 

I thought I had the ( admin/includes/config and catalog/includes/config) set up right.

 

Best Regards

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...