Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

changing root directory


mobilebyrd

Recommended Posts

I have a site I designed completely inside osCommerce. Unfortunately, when one leaves osCommerce all shopping cart data is lost. I would like to have my osCommerce "catalog" directory set as the root directory rather than "public_html." I have asked my host if they have any recommendations and this is what they said.

You can install osCommerce manually in your root directory. The cpanel installer does not support it.

 

If you already have a working osCommerce, then you can move all your files in the root directory and update the osCommerce configuration files accordingly. Making the root directory change to point to 'catalog' folder will disturb the default system settings of your account and may have unknown consequences.

 

Let us know if you need further assistance.

 

Regards,

Masood

 

I have a little apache server experience (host runs apache). I have no clue what "Masood" is talking about when he says to update the osCommerce configuration files accordingly. I can only assume he means to take all of the content from the catalog directory and then place it in public_html directory. This part seems to make sense. Unfortunately, I am unsure of how to reset the osCommerce configuration files accordingly. I will recheck the installation instructions for osCommerce and see if I can figure out what he is talking about.

 

Is this the only, or best, option for what I would like to accomplish? I was wondering if y'all had any suggestions.

Link to comment
Share on other sites

Masood is correct. Just copy ALL of your source files to the root directorey (public_html).

 

Basically the current setup you have ......public_html/catalog/...... becomes ...../public_html

 

You'll then need to update two files

 

....public_html/includes/configure.php (for the catalog)

 

and

 

.....public_html/admin/includes/configure.php (for the admin area)

 

In each file find ALL of occurances of 'catalog' and remove them from the "define" statement(s) in each configure.php file.

 

You should then be able to get to your osCommerce catalog as www.mydomain.com and your admin area as www.mydomain.com/admin.

 

Don't forget that you might need to re-secure the admin area/folder as it will have moved.

 

HTH

Tom

Link to comment
Share on other sites

THANX OceanRanch,

 

I tried moving the content of catalog into public_html but had not idea where/what the configuration files were. I will try this later on this afternoon/evening and repost.

 

THANX Again

 

Masood is correct. Just copy ALL of your source files to the root directorey (public_html).

 

Basically the current setup you have ......public_html/catalog/...... becomes ...../public_html

 

You'll then need to update two files

 

....public_html/includes/configure.php  (for the catalog)

 

and

 

.....public_html/admin/includes/configure.php  (for the admin area)

 

In each file find ALL of occurances of 'catalog' and remove them from the "define" statement(s) in each configure.php file.

 

You should then be able to get to your osCommerce catalog as www.mydomain.com and your admin area as www.mydomain.com/admin.

 

Don't forget that you might need to re-secure the admin area/folder as it will have moved.

 

HTH

Tom

Link to comment
Share on other sites

I cam, I tried, I screwed it all up.

 

I went into the configure files as you suggested and removed any occurence of the word catalog I found. Unfortunately, I really goofed it up somehow. I think that main problem is I have no clue what I am donig. So, I went in again and reanalyzed some of the things I was doing.

 

When I see the line of code that looks like:

 

define('HTTP_CATALOG_SERVER', '');

Should I comment it out completely or just remove _CATALOG?

 

 

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

Should I change it into this?

define('DIR_WS_IMAGES', . 'images/');

 

 

And when I see a line of code that looks like:

 

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

Should I just comment it out to look like this?

//define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

If I knew the syntax and parameters for these definitions (declerations) I would better understand what needs to be done. Without knowing this I am at a substantial disadvantage.

Link to comment
Share on other sites

Can you post your 2 configure.php here, preferably the ones before any modifications. (don't post your database details, for security)

Link to comment
Share on other sites

admin/includes

 

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

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

 

 

 

 

 

catalog/includes

 

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

define('HTTPS_SERVER', 'https://pfchowardjohnson.com');

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

define('HTTP_COOKIE_DOMAIN', 'http://pfchowardjohnson.com');

define('HTTPS_COOKIE_DOMAIN', 'https://pfchowardjohnson.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

define('DIR_WS_IMAGES', '/catalog/images/');

define('DIR_WS_ICONS', '/catalog/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/');

 

 

 

 

Can you post your 2 configure.php here, preferably the ones before any modifications. (don't post your database details, for security)

Link to comment
Share on other sites

First thing that you really want to do is to find out exactly what your correct SSL address is. The current one that you are trying to use is issued to secure66.nocdirect.com

Link to comment
Share on other sites

Whenever I try to get to https://www.pfchowardjohnson.com I get a default page I can only assume was created by the webhost. When I go to https://secure66.nocdirect.com/~jpfchowa/ I get a secure copy of my index page. The secure address (https://secure66.nocdirect.com/~jpfchowa/) was supplied to me by the webhost.

 

The webhost's supplied information regarding security is as follows:

 

To secure a file, create your form as usual and put it somewhere in your www directory. You can put your form anywhere you want to, but for this example, let's assume the normal URL for your form can be accessed from a browser with this URL:

 

http://www.yourdomain.com/signup/secureform.html

 

To call the form through the secure-order server, you need to use the following URL to access your pages via the secure server (even though your form resides on your own domain space): https://yourdomain.u-build-it.net/signup/secureform.html.

 

That would be the URL you would put as an <HREF> to link to your form from whatever page you have your visitors link from. Don't forget the "s" in "https."

 

To call scripts in your cgi-bin via the secure server you should use a URL like this:

 

Cgiwrap--Secure Server CGI Wrapper

We now have a cgi wrapper for the secure server called cgiwrap. We have configured it to be automatically invoked when you make a call containing "cgi-domain", like this:

 

https://domain.u-build-it.net/cgi-bin/script.cgi

 

 

PS: This sight is a learning process. I truly appreciate any and all assistance.

Link to comment
Share on other sites

Catalog's configure.php

 ?define('HTTP_SERVER', 'http://pfchowardjohnson.com');
?define('HTTPS_SERVER', 'https://secure66.nocdirect.com/~jpfchowa');
?define('ENABLE_SSL', true); // secure webserver for checkout procedure?
?define('HTTP_COOKIE_DOMAIN', 'pfchowardjohnson.com');
?define('HTTPS_COOKIE_DOMAIN', 'secure66.nocdirect.com/~jpfchowa);
?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/');

 

Not entire sure about this line:

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

 

What control panel did you use to set up osCommerce? cPanel, Plesk or something else?

Link to comment
Share on other sites

A quick alternative to get your site working is to download a fresh copy of osCommerce. Extract and upload the install folder and reinstall it (the install process will write your 2 configure.php files).

 

DO NOT use the import example database option.

Link to comment
Share on other sites

If I did this, will I once again be stuck with oscommerce running in the catalog subdirectory?

 

Also

 

What will happen to the content I have already created in osCommerce?

 

 

 

A quick alternative to get your site working is to download a fresh copy of osCommerce.  Extract and upload the install folder and reinstall it (the install process will write your 2 configure.php files).

 

DO NOT use the import example database option.

Link to comment
Share on other sites

If I did this, will I once again be stuck with oscommerce running in the catalog subdirectory?

 

Also

 

What will happen to the content I have already created in osCommerce?

No, the file structure remains as is. If the files are in the root directory, osCommerce installation will configure it self for that location.

 

Nothing will happen to the contents (but you must backup your database first).

 

Only 2 things occur during the installation process:

1. Import the sample database (you have the option to avoid this)

2. Write your catalog/admin/include/configure.php and catalog/include/configure.php

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...