OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: A guide to the configure.php files
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Tips and Tricks
Gil_e_n
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.

CODE
// 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
CODE
  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.
CODE
  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.
CODE
  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.
CODE
  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.
CODE
  define('HTTPS_COOKIE_DOMAIN', 'secure.widgetsofdoom.com');

And in a similar manner, this should be your secure url.
CODE
  define('HTTP_COOKIE_PATH', '/');

This should be the same as your DIR_WS_HTTP_CATALOG.
CODE
  define('HTTPS_COOKIE_PATH', '/');

And this should be the same as your DIR_WS_HTTPS_CATALOG.

CODE
  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.

CODE
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.

CODE
  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.

CODE
  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.

CODE
// 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.
CODE
  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.
CODE
  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.
CODE
  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.

CODE
  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.

CODE
  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.
CODE
  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.
CODE
  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.
CODE
  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.
[code define('DIR_FS_DOCUMENT_ROOT', '/htdocs/widgetsofdoom/'); // where the pages are located on the server[/code]
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.
CODE
  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.
CODE
  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.

CODE
  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.
djbxp
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.gif
shellqc
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!!
choosealogin
Sorry to jump in, I just know the Windows thing can be tough wink.gif ....


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 pinch.gif 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.



QUOTE (shellqc @ May 30 2006, 09:18 AM) *
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!!
shellqc
QUOTE (choosealogin @ May 30 2006, 02:36 PM) *
Sorry to jump in, I just know the Windows thing can be tough wink.gif ....
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 pinch.gif 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??
Nimue
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',/ '');
herbacious
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 '/'
mkelly1
Thank you for this topic. I finally got my site configure.php's working correctly after moving the store. Thank you very much !!!!!!
StevieC63
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
StevieC63
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.
StevieC63
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.
coelroy
QUOTE (StevieC63 @ Apr 19 2007, 03:03 PM) *
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?
boudie
QUOTE (coelroy @ Apr 20 2007, 05:20 AM) *
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.
coelroy
QUOTE (boudie @ May 4 2007, 08:47 AM) *
You will need to change the CHMOD in File Manager of your cPanel. That is the only way it works.

Thank you, came right
warrenerjm
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.gif
eg inc/configure.php
CODE
<?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
CODE
  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?
CODE
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
hannah_rl
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
aardvarkmultimedia
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!!!
maryus
pls help me with movement topic is here
bonzabuy
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!
bonzabuy
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.gif
bonzabuy
Nope - when trying to check out STILL getting Message Authentication Error....PLEASE HELP!!
tferrer
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
HackerJack
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
HackerJack
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!
gsxstylee
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');
?>
gsxstylee
My configs were all correct, the only thing wrong was my chmod, just call me lord newbworthy.
bonzabuy
For others who read this the only way I could sort my problem was to use new Config files.
A lot of my dramas were complicated through use of a shared ssl - and cleared up when I used fresh config files for the dedicated ssl.
Also the file permission settings (read / write etc when you upload the files with filezilla or similar) are vital.

Cheers
Stephie
I keep getting this error
CODE
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!


I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

Please help..
Jack_mcs
Reply removed since it was already answered.

Jack
Jack_mcs
QUOTE (Stephie @ Dec 30 2007, 09:49 PM) *
I keep getting this error
CODE
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!


I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

Please help..
That message usually means the database cannot be connected to so i would make sure the username, password and database name match those of the database.

Jack
teamfourllc
Everything works great by following the help found in this thread EXCEPT...

When I log into the admin page and use the file manager, I can only access the files found in the admin directory. I must have a wrong path in my admin/includes/configure.php. Can anyone find it?

CODE
<?php
define('HTTP_SERVER', 'http://www.smokin-n-style.com');
define('HTTP_CATALOG_SERVER', 'http://www.smokin-n-style.com/catalog/');
define('HTTPS_CATALOG_SERVER', 'https://tilton4.startlogic.com');
define('ENABLE_SSL_CATALOG', 'true');
define('DIR_FS_DOCUMENT_ROOT', '/home/users/web/b2995/sl.tilton4/public_html/smokin/catalog/admin/');
define('DIR_WS_ADMIN', '/catalog/admin/');
define('DIR_FS_ADMIN', '/home/users/web/b2995/sl.tilton4/public_html/smokin/catalog/admin/');
define('DIR_WS_CATALOG', '/catalog/');
define('DIR_FS_CATALOG', '/home/users/web/b2995/sl.tilton4/public_html/smokin/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/');
mazorkam
hei stephie....i have same problem with you...

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'goocek'@'localhost' (using password: YES) in /home/gooce05/public_html/includes/functions/database.php on line 19
Unable to connect to database server!


any body can solve my problem...help...help...help...SOS..SOS
mazorkam
QUOTE (Stephie @ Dec 31 2007, 09:49 AM) *
I keep getting this error
CODE
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'Mystoresname'@'host194.hostmonster.com' (using password: YES) in /home/mystoresname/public_html/store/includes/functions/database.php on line 19
Unable to connect to database server!


I am having trouble with this part : define('DIR_FS_CATALOG', '/home10/sub001/sc15761-LGKR/www/store/');

Please help..



hei stephie...i have problem like u....

with all my energy i'll try to break...

here's the answer.... thumbsup.gif thumbsup.gif

go to ur cpanel->mysql->klik add user to database...than, in below of the current databases yu'll find this code.

-------------------------------------------------
users in xxxx
yyyyyy (Privileges: ALL PRIVILEGES)

Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:xxxx:localhost","yyyy","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "yyyy", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xxxxx");


xxxxx mean yourdatabse
yyyyy mean user

that's what i do...okey warmest regard thumbsup.gif thumbsup.gif blush.gif blush.gif
-----------------------------------
tashumbe
Hello everyone,

I am new here and I have been using these forum topics successfully to help me debug the configuration files. The shop seems to be working fine. However, i still have a couple issues.

1. I am still unable to log into my admin section

2a. When i click on the "online catalog" link from the admin login page, i am being sent to a parent directory page - http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/
2b. When i click on the "top" link on the catalog page, i am being sent to a parent directory page - http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/

I have copied my admin configuration file below. Any help would be appreciated.

/*
$Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

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

Copyright © 2002 osCommerce

Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
define('HTTP_SERVER', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/'); // eg, http://localhost or - https://localhost should not be NULL for productive servers
define('HTTP_CATALOG_SERVER', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/');
define('HTTPS_CATALOG_SERVER', 'http://localhost/osCommerce/oscommerce-2.2rc2a/catalog/');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', 'osCommerce/oscommerce-2.2rc2a/'); // 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', 'osCommerce/oscommerce-2.2rc2a/catalog/admin/');
define('DIR_WS_CATALOG', 'osCommerce/oscommerce-2.2rc2a/');
define('DIR_FS_CATALOG', 'osCommerce/oscommerce-2.2rc2a/');
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', 'xxxxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxxxx');
define('DB_DATABASE', 'xxxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'yes');
?>
games4gamers
I've been having issues with my SSL for a while now. GoDaddy is my host and they have been no help. They tell me I need to contact OSC. Can anyone help?

Here's my config file:

CODE
<?php
define('HTTP_SERVER', 'http://www.games4gamersonline.com');
define('HTTPS_SERVER', 'https://www.games4gamersonline.com');
define('ENABLE_SSL', true);
define('HTTP_COOKIE_DOMAIN', 'http://www.games4gamersonline.com');
define('HTTPS_COOKIE_DOMAIN', 'https://www.games4gamersonline.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/content/g/a/m/games4gamers/html/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_BACKUP','/home/content/g/a/m/games4gamers/html/catalog/admin/backups/');

define('DB_SERVER', 'p41mysql103.secureserver.net');
define('DB_SERVER_USERNAME', '************');
define('DB_SERVER_PASSWORD', '*******');
define('DB_DATABASE', '************');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>


The main problem I'm having is when I try to use the customer login (to test) it just hangs/times out.
Jack_mcs
It may not fix your problem but these lines
CODE
  define('HTTP_COOKIE_DOMAIN', 'http://www.games4gamersonline.com');  define('HTTPS_COOKIE_DOMAIN', 'https://www.games4gamersonline.com');
should be
CODE
  define('HTTP_COOKIE_DOMAIN', '.www.games4gamersonline.com');  define('HTTPS_COOKIE_DOMAIN', '.www.games4gamersonline.com');


Jack
games4gamers
Thanks Jack...still no dice though. I was trying various configurations. The cert is issued to: www.games4gamersonline.com and it should work. I called my host and they said it works on their end and even on their external line too.
Mibble
do what jack said, and also this:

define('DIR_FS_CATALOG', '/home/content/g/a/m/games4gamers/html/catalog/');

to

define('DIR_FS_CATALOG', '/home/content/g/a/m/games4gamers/html/catalog');
games4gamers
Just tried that, still doesn't work, sigh...thanks though...
lightwarrior
I'm having trouble getting my site to work, but I can't even figure out if this is where I put the message. The problem is in the configuration file, but I've tried everything there is to try, every possible combination imaginable.

For now, just let me know if I am even posting in the right way.

Thanks
nmaster64
Can anybody graze over the differences between moving from something like

domainone.com/catalog

to

domaintwo.com/~test/catalog

???

This is driving me nuts. I can never figure out where the /~test/ should and shouldn't be...
morgan1
Regarding details of the Configure.php files:

My situation is:
When I upload Product/Category images they go to: 'domain.com/admin/images' folder.(not to 'domain.com/images')

Because of this, images don't display(in Admin), only a box outline, when you right click on & view properties of the box they indicate the path: 'domain.com/images/image.gif'. They don't display on shop pages either, no place-holder.

So, I have been uploading images via my webserver file manager to get them in the correct folder.

I'm hoping you know, which line of which configure.php file controls the image upload destination(and possibly which line of which configure.php file controls the image Admin and Shop display image path).

Thanks for any assistance anyone can offer.
Berlyn
I am attempting to move an existing OsCommerce site to another domain to use as a template. The new domain is Using Miva Merchant. I have copied the tables and imported them to the new database created on the new domain. Have made changes to the includes/configure.php and admin/includes/configure.php. I am able to bring the new site up by tying in the new domain by typing www.mysite.com/index.php. Admin side seems to be functioning fine. On the client side though I am thrown out when I click on a category. Any link that goes to an actual php file works well. Below is an example of a url that is executed when a category is clicked on. I would like some guidance in tracking down the problem. Thanks!

http://www.mysite.com/cooking-gear-c-8.html

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.