Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help w/ configure.php


Guest

Recommended Posts

Posted

I'm going crazy trying to get the admin/configure.php correct. Background:

I'm running a test server on a Windows 2000 system (apache, php, mysql, etc)

Apache's webroot points to c:\webpages. The test site is located at localhost/dyc (c:\webpages\dyc). The catalog is localhost/dyc/catalog, the admin is at localhost/dyc/oscadmin.

 

define('HTTP_SERVER', 'http://localhost');

define('HTTP_CATALOG_SERVER', '');

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT);

define('DIR_WS_ADMIN', '/dyc/oscadmin/');

define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

define('DIR_WS_CATALOG', '/dyc/catalog/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

define('DIR_WS_IMAGES', '/dyc/oscadmin/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/');

 

Everything works fine for administration. But the Online Catalog link points to http://localhost/dyc/dyc/catalog/. If I modify

 

define('DIR_WS_CATALOG', '/dyc/catalog/');

 

to

 

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

 

then the link works ok (no double dyc/dyc) but then my images get messed up in Admin (with a message at the top " Error: Catalog images directory does not exist: C:/webpages/catalog/images/".)

 

I also tried define('HTTP_SERVER', 'http://localhost/dyc') and then modified relative paths, but when one piece works ok another has a screwed up reference.

 

Been going around in circles. Assistance much appreciated...

Posted

for this: define('HTTP_SERVER', 'http://localhost');

i would make it: define('HTTP_SERVER', 'http://localhost/dyc');

the above is line one

 

for line two, you still need to put something in there

define('HTTP_CATALOG_SERVER', '');

needs to be localhost or localhost/dyc

 

document root should be: c:\webpages\dyc if u use my example

 

this way, if you add more stores down the road, they each can be called by http://localhost/name and the admin is http://localhost/name/admin

Posted

I don't have any experience with local installs but I've found that this often causes problems.

 

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

Set that to an absolute path, not one defined by system calls.

 

ie: define('DIR_FS_CATALOG', 'root/path/to/catalog');

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

Very weird. I made the changes suggested by Mibble and then the Online Catalog link worked, but my images broke. Firefox's Web Developer extension showed that it was trying to reference, e.g.,

 

http://localhost/oscadmin/images/icons/error.gif, instead of

 

http://localhost/dyc/oscadmin/images/icons/error.gif

 

So I went back to my original configuration above to start again, hit refresh and everything worked properly. (I KNOW that I kept hitting refresh every time I made mods yesterday, because I could immediately see the changes reflected in the test site.)

 

I didn't have any problems when setting up an osCommerce install using default directories on a remote server, but had major problems when doing it this time on 1) localhost 2) using windows 3) creating different dir structures.

 

SO, let me ask a few general questions about configure.php:

 

define('HTTP_SERVER', 'http://localhost');

Do most folks define just the domain name here, or the top directory of the store?

 

define('HTTP_CATALOG_SERVER', '');

What does this define? It's now blank in my configure.php and everything seems to work fine.

Archived

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

×
×
  • Create New...