Jump to content
Latest News: (loading..)

Archived

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

Gil_e_n

A guide to the configure.php files

Recommended Posts

At some point, pretty much everyone's going to have to move their osc store. And figuring out the osc configure files can be kind of tough. When you move your website, there are two files that you'll need to change. One is the includes/configure.php, the other is the admin/includes/configure.php. I will be using widgetsofdoom.com in my example. Below is my includes/configure.php file.

 

// Define the webserver and path parameters
This is the osc team telling you what this page is.  It's where osc finds out what domain it's on and where links should be made.  An error on this page [i]will[/i] screw up your entire website.  
[code]// * DIR_FS_* = Filesystem directories (local/physical)
What this means, is when a definition starts with DIR_FS_something, you need the entire link.  Not the usual url, but the actual location of your file on the server.  If you don't know that, go to admin -> tools -> server info.  Look for document_root.  It should look something like this:

DOCUMENT_ROOT:  /htdocs/widgetsofdoom

Or it might not.  The address can look entirely different.  The important part is the document_root bit.
[code]// * DIR_WS_* = Webserver directories (virtual/URL)

This is what you usually think of as the address. I.e. the url. In this case, widgetsofdoom.com

  define('HTTP_SERVER', 'http://www.widgetsofdoom.com'); // eg, http://localhost - should not be empty for productive servers

...I don't need to explain this, right? This is the url of your website. Not of your oscommerce installation - that comes later. Just your website.

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

This is for the part of your site that is secured. If you don't have an SSL certificate, it's the same as the url above. If you do, it must be the exact same address that is on the certificate. I repeat, the. Exact. Same. Address. Any other address will get a nonsecure warning.

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

Or, if you don't have SSL, you can just have this as false, and it'll never direct you to the HTTPS_SERVER. For the most part, this should be true, though.

  define('HTTP_COOKIE_DOMAIN', 'www.widgetsofdoom.com');

Hell if I know what the cookie domain is used for. Anyone reading this who wants to explain, feel free. However, as far as I can tell, this should your url.

  define('HTTPS_COOKIE_DOMAIN', 'secure.widgetsofdoom.com');

And in a similar manner, this should be your secure url.

  define('HTTP_COOKIE_PATH', '/');

This should be the same as your DIR_WS_HTTP_CATALOG.

  define('HTTPS_COOKIE_PATH', '/');

And this should be the same as your DIR_WS_HTTPS_CATALOG.

 

  define('DIR_WS_HTTP_CATALOG', '/');

This is your catalog directory - where osc on your server. By default, this should be /catalog/ - if you have it in a catalog file. If you have in in the root of your server, just leave it the way I have here.

 

 define('DIR_WS_HTTPS_CATALOG', '/');

I don't think very many people actually have a separate directory for the secure part of their website, so just leave this the same as the above, unless you do have a separate directory. But that's a separate question, that'd just complicate things.

 

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

Just leave these be, unless you've been changing things around. These are defining the subfolders of oscommerce. If you want to add some folders, like, for example, a subfolder for videos on your website, here's where you put it. If you want to rename some of your subfolders, here's where you change it so that osc knows the new names.

 

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
Ditto on this.
[code]  define('DIR_FS_CATALOG', '/htdocs/widgetsofdoom/');
This is where you use that document_root thing I mentioned.  Copying it will get you to the root of your site.  If you have oscommerce installed in a subfolder, add catalog to the end, like this: /htdocs/widgetsofdoom/catalog/.
[code]  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

I don't deal with these, so I just leave them alone.

 

// define our database connection
 define('DB_SERVER', '127.0.0.1'); // eg, localhost - should not be empty for productive servers

This is the IP number of your database server. Or you might be able to use a URL - I have no idea. Both my sites use the IP number, because that's what our webhost provider told us to use. Just call your webhost provider, and do what they tell you.

  define('DB_SERVER_USERNAME', 'root');

The username you need to access your server. It probably isn't this, because this is the default username for mysql. Ask your webhost provider.

  define('DB_SERVER_PASSWORD', 'passwordgoeshere');

As I'm sure you can figure out by now that this is your password, and ask your webhost provider.

  define('DB_DATABASE', 'oscommerce');

This is the name of your database. If you had to ask your webhost provider to create it for you, ask them what it is. If you created it yourself from your webhost admin, you should know the name.

 

  define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

Just leave these like this. If you have a dedicated server, you can switch STORE_SESSIONS to '' if you like, but do not do it on a shared server.

 

Parts of admin/includes/configure.php are identical. I'll just cover the parts that are different.

 

  define('HTTP_SERVER', 'http://www.widgetsofdoom.com'); // eg, http://localhost - should not be empty for productive servers

Guess what! It's the same as http_server on includes/configure.php. Amazing. Note, however, if you want your admin area to be secured under your ssl certificate, which you probably do, this should be what you have under https_server in your file above.

  define('HTTP_CATALOG_SERVER', 'http://www.widgetsofdoom.com');

This is the link to your catalog. If you have your shop in the root of your website, it'll be the same as the above. If not, it'll be something along the lines of http://www.widgetsofdoom.com/catalog.

  define('HTTPS_CATALOG_SERVER', 'https://secure.widgetsofdoom.com');

Same as above, only pointing to the secured catalog. I.e. if your website's in the catalog directory, it would be https://secure.widgetsofdoom.com/catalog.

  define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

Set to true if you want ssl to be enabled when linking to the catalog from the admin, false if you don't.

Same as above, except it is the root folder, rather than the catalog folder.  Even if your site's in the catalog folder, this goes to the admin.
[code]  define('DIR_WS_ADMIN', '/admin/'); // absolute path required

Your admin directory, the url version. If your store is a subfolder in your root (i.e. it's in a folder called catalog), then it would probably be /catalog/admin/. If you want to change your admin location to deter hackers, here is one of the two places you change it.

  define('DIR_FS_ADMIN', '/htdocs/widgetsofdoom/admin/'); // absolute pate required

This is much the same as the document_root, except you add on the catalog folder, if needed, and the admin folder. This is the other place you change admin location.

  define('DIR_WS_CATALOG', '/'); // absolute path required
 define('DIR_FS_CATALOG', '/htdocs/widgetsofdoom/'); // absolute path required

Much the same as the two above it, except pointing to the catalog folder, or the folder containing oscommerce. Unless you're doing something funky with your website, just remove admin/ from the end of the previous two definitions, and it'll work.

 

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

Just defining all the subfolders. If for some reason you're integrating some more subfolders into osc admin section, here's where you define them. Otherwise, just leave them alone.

 

Please note that there are other ways of doing your configure file that can be slightly different, but will nonetheless work. Slashes tend to be a nagging problem when changing your configuration file - if your links are broken, and you're pretty sure you had it right, check for missing/too many slashes. Any comments/criticisms/questions welcome.


Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums.

 

Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums

 

Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller

Share this post


Link to post
Share on other sites

Thanx buddy...

I was having some troubles...

but after understanding that my root Dir was just wrong...

it cleared everything up...!!

 

Thanx for the awesome post!!!

 

DJBXP :thumbsup:

Share this post


Link to post
Share on other sites

I have tried this with no success. When I get to the last step, step 7. When I click catalog I get cant' find database, and when I click administration I get a blank page.

 

I've made the changes you explained above with the exception of one. "htdocs" I don't have that folder. I'm on a windows server, is that something I'm suppose to create or should I be pointing to something different? I just can't make this work, I can't get past step 7. Oh and I can't get into the admin to find out what the htdocs directory should be.

 

Thanks for any help you can give!!

Share this post


Link to post
Share on other sites

Sorry to jump in, I just know the Windows thing can be tough ;) ....

 

 

htdocs is equivalent to where your host told you to put your site files. It could have different names, like public_html, or maybe wwwroot ( a windows hosted site of mine uses wwwroot, but your mileage may vary >_< just have to check what your specific directory name is).

 

It's a folder name that you would only see when you upload files with FTP or the file manager that your host provided. It's never seen in a link.

 

For database not found ...double check the server name, user and password that you put in the configure.php files. And make sure you did create an empty database and assign a user/pass to it before you did this. Everyone always says use 'localhost' or '127.0.0.1' for db_server_name and that's true 98% of the time, but on the windows hosted site I have I had to enter a different IP address there and it worked. Ask your host.

 

 

 

I have tried this with no success. When I get to the last step, step 7. When I click catalog I get cant' find database, and when I click administration I get a blank page.

 

I've made the changes you explained above with the exception of one. "htdocs" I don't have that folder. I'm on a windows server, is that something I'm suppose to create or should I be pointing to something different? I just can't make this work, I can't get past step 7. Oh and I can't get into the admin to find out what the htdocs directory should be.

 

Thanks for any help you can give!!

Share this post


Link to post
Share on other sites
Sorry to jump in, I just know the Windows thing can be tough ;) ....

htdocs is equivalent to where your host told you to put your site files. It could have different names, like public_html, or maybe wwwroot ( a windows hosted site of mine uses wwwroot, but your mileage may vary >_< just have to check what your specific directory name is).

 

It's a folder name that you would only see when you upload files with FTP or the file manager that your host provided. It's never seen in a link.

 

For database not found ...double check the server name, user and password that you put in the configure.php files. And make sure you did create an empty database and assign a user/pass to it before you did this. Everyone always says use 'localhost' or '127.0.0.1' for db_server_name and that's true 98% of the time, but on the windows hosted site I have I had to enter a different IP address there and it worked. Ask your host.

 

Thanks for the input! I finally got the catalog site working but I'm still getting a blank page on the admin site. Catalog is nice that it works now but I can't do a thing with it. Any ideas on how to get the admin to show up? So far I've tried a coupld of fixes I've found and they haven't worked. Changing $this to $th_s and also changing line 31 to say (unset)$this;.

 

 

Any ideas??

Share this post


Link to post
Share on other sites

Ok ive made progress but it's still giving me an error.

 

Here's the code.

 

define('HTTP_SERVER',www.thesagesgrove.com/ ''); // eg, http://localhost - should not be empty for productive servers

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

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

define('HTTP_COOKIE_DOMAIN',www.thesagesgrove.com/'');

define('HTTPS_COOKIE_DOMAIN',www.thesagesgrove.com/ '');

define('HTTP_COOKIE_PATH',www.thesagesgrove.com/ '');

define('HTTPS_COOKIE_PATH',www.thesagesgrove.com//catalog '');

define('DIR_WS_HTTP_CATALOG',/ ''); <----- giving me an error in this line

define('DIR_WS_HTTPS_CATALOG',/ '');

Share this post


Link to post
Share on other sites

hi there Nimue

 

quick look and i think your HTTP and HTTPS needs to actually start with http:// and https:// respectively

 

however the PHP error is because your backslash is outside the '' where it shoudl be inside '/'

Share this post


Link to post
Share on other sites

Thank you for this topic. I finally got my site configure.php's working correctly after moving the store. Thank you very much !!!!!!

Share this post


Link to post
Share on other sites

Couple of things to note:

 

If your shop is in a sub-folder then specify the path in the admin definition e.g.:

 

define('DIR_WS_ADMIN', '/xen-commerce-1/catalog/admin/');

 

 

 

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT);

wasn't working for me so I hard coded the address e.g:

 

 

define('DIR_FS_DOCUMENT_ROOT', "/home/pete/public_html/");

 

 

I think because my shop in in a sub-folder and I'd changed admin (see above) I had to change backup as well to:

define('DIR_FS_BACKUP', 'backups/');

 

and then the backup procedure agreed to work (which was nice).

 

 

Still getting a problem with file manager though:

 

Warning: dir(/home/pete/public_html/): failed to open dir: Permission denied in /home/pete/public_html/xen-commerce-1/catalog/admin/file_manager.php on line 178

 

Fatal error: Call to a member function on a non-object in /home/pete/public_html/xen-commerce-1/catalog/admin/file_manager.php on line 179

 

 

anyone know what's happening there?

 

I'm running:

XenCommerce 1.0 osCommerce 2.2-MS2

PHP Version 4.3.10-16

Share this post


Link to post
Share on other sites

Bodged the above file manager error by putting the following line into file_manager.php at line 180:

 

$current_path = "/home/pete/public_html/xen-commerce-1/catalog/";

 

I think this may have something to do with my shop being in a sub-folder.

 

So far so good.

Share this post


Link to post
Share on other sites

Just had to change:

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

 

to

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

 

to get catalogue->reviews graphics (the line of stars) working.

Share this post


Link to post
Share on other sites
Just had to change:

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

 

to

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

 

to get catalogue->reviews graphics (the line of stars) working.

 

Hi there,

 

I have this problem. Just installes oScommerce and having a problem with a warning message being generated because of the configure.php file.

 

This file is installed in /puplic_html/includes. I've changed the CHMOD from 644 to 444 using SmartFTP, only to be reset itself to 644.

I thus cannot make a permanent change to this file, therefore the warning message still persists.

Anybody care to help?

Share this post


Link to post
Share on other sites
Hi there,

 

I have this problem. Just installes oScommerce and having a problem with a warning message being generated because of the configure.php file.

 

This file is installed in /puplic_html/includes. I've changed the CHMOD from 644 to 444 using SmartFTP, only to be reset itself to 644.

I thus cannot make a permanent change to this file, therefore the warning message still persists.

Anybody care to help?

 

You will need to change the CHMOD in File Manager of your cPanel. That is the only way it works.

Share this post


Link to post
Share on other sites
You will need to change the CHMOD in File Manager of your cPanel. That is the only way it works.

Thank you, came right

Share this post


Link to post
Share on other sites

Hi

 

My site is working, but noticed my listings are both www. & without. I think I haven't got the top part right, but still right enough to work. :blink:

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

Do I need it to have www.mysite? Don't have www. at the moment

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

NO SSL but do I need to put the site address 'http://www.mysite.co.uk' or leave blank?

 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'mysite.co.uk');
 define('HTTPS_COOKIE_DOMAIN', '');

Again do I need to say 'http://www.mysite.co.uk' in one or both COOKIE_DOMAIN?

 

Google is now set to use www.mysite so should these all read www.mysite or my listings will be affected?

 

Assume similar answers would be for admin configure file?

 

Thanks

Julie

Share this post


Link to post
Share on other sites

Hey this is brilliant - the order of the definitions actually fixed my SECOND to last problem with my install!!!!

 

BUT THE LAST ONE IS:

The PayPal module isn't really working - and there are no 'red and green' lights coming on next to any of the payment modules as the brochure suggests there should be... Perhaps I have not quite done some last step to activate things?? Can anyone tell me what we might be overlooking? And thanks! When we got as far as checkout in a test, no payment options are available, period, though we have enabled paypal apparently... Perhaps we need something else?

-Hannah

Share this post


Link to post
Share on other sites

This might sound like a stupid question, but does it matter if the name of the database on server #2 is different than the name of the database on server #1?

 

The hosting company that we are moving the site to uses cpanel and puts a prefix at the beginning of the database name.

 

For example: the database where the site is now currently on is named "os" - but when I try to create a new database at the new hosting companies Cpanel, it automatically adds a prefix to the name so it ends up being "prefix_os".

 

I've changed the settings in configure.php to reflect the new name/user/password and have followed all of the steps above and I'm still not getting anything to work.

 

I've submitted a help desk ticket with the hosting company and am crossing my fingers, I was just hoping maybe someone had already run into this issue and might be able to help!

 

thanks!!!

Share this post


Link to post
Share on other sites

Thanks for this post - it has helped me but I still have problems.

I am getting a Message Authentication error when people try to log in etc (anything that is secure on OZ).

 

 

includes/configure:

 

<?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.bonzabuy.com.au/');

// eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER','https://secure.bluehost.com/~bonzabuy/bonzabuyau/oz/');

// eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', 'true');

// secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.bonzabuy.com.au');

define('HTTPS_COOKIE_DOMAIN', 'secure.bluehost.com');

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', 'public_html/bonzabuyau/oz/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

I am thinking that the following line is at fault but can't get it to work:

define('DIR_FS_CATALOG', 'public_html/bonzabuyau/oz/');

 

As I get another error permanently at the top of the page - the url in this warning changes when I change the 'DIR_FS_CATALOG' line:

 

Warning: The downloadable products directory does not exist: public_html/bonzabuyau/oz/download/. Downloadable products will not work until this directory is valid.

 

Any help would be appreciated!

Share this post


Link to post
Share on other sites

For those who have Oz installed in a folder (ie not the root of your website) I thought I would copy what I have found is working [for now!].

If anyone can see if this is wrong let me know - I have tried & tried & this was the best I could manage....

 

includes/configure

 

<?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.bonzabuy.com.au/');

// eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER','https://secure.bluehost.com/~bonzabuy/');

// eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', 'true');

// secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.bonzabuy.com.au');

define('HTTPS_COOKIE_DOMAIN', 'secure.bluehost.com');

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

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

define('DIR_WS_HTTPS_CATALOG', 'bonzabuyau/oz/');

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/bonzabuy/public_html/bonzabuyau/oz/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

So far so good!

 

:unsure:

Share this post


Link to post
Share on other sites

Hi,

 

I was having problems with my installation and after reading this topic and manually editing my configure.phph files the error are gone!

 

My problem was that after a new installation for some reason voth configure.php files were not created or updated. Both showed 0 KB. I uploaded the files from the original zip archive and edited them following this guide here. walllaaa!!

 

T

Share this post


Link to post
Share on other sites

Hi everyone,

 

I have to move a shop, too. How does it work? Do I just have to copy the "catalog" directory to the new server, import the DB to the new server and change the configure.php file as mentioned above?

 

Thanks for helping! Hannes

Share this post


Link to post
Share on other sites

Hello everyone,

 

I transferred a OsCommerce shop to a new server as described above, I installed the database and installed a temporary SSL certificate. Single products can be shown, but when I try to show the products of a complete category, I get the following error message:

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

Moreover, one cannot log in.

 

I looked for this error message in the OsCommerce forum. All answers were about changing the source code, but the same source code is running well on the old server.

 

Did anyone ever have the same error after a tranferral to a new server? Has anybody got an idea why that is?

 

Thanks for helping!

Share this post


Link to post
Share on other sites

Hey everyone,

I have gone through the guide and I still cannot get my store to show up. I am running it on a subdomain where the full link to the store is yyy.mysite.com/shop/

the admin directory is yyy.mysite.com/shop/admin. All of the directory structures are the same. Below are my two configuration files.

 

/includes/configure.php:

<?php

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

define('HTTPS_SERVER', 'http://yyy.mysite.com');

define('ENABLE_SSL', false);

define('HTTP_COOKIE_DOMAIN', 'yyy.mysite.com');

define('HTTPS_COOKIE_DOMAIN', 'yyy.mysite.com');

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', '/srv/www/htdocs/shop/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

define('DB_SERVER', '127.0.0.1');

define('DB_SERVER_USERNAME', 'user');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'yyy');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

 

/admin/includes/configure.php:

<?php

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

define('HTTP_CATALOG_SERVER', 'http://yyy.mysite.com');

define('HTTPS_CATALOG_SERVER', 'http://yyy.mysite.com');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', '/srv/www/htdocs/shop/');

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', '/srv/www/htdocs/shop/admin/');

define('DIR_WS_CATALOG', '/shop/');

define('DIR_FS_CATALOG', '/srv/www/htdocs/shop/');

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

define('DB_SERVER_USERNAME', 'user');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'yyy');

define('USE_PCONNECT', 'true');

define('STORE_SESSIONS', 'mysql');

?>

Share this post


Link to post
Share on other sites

×