Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Conplete file paths..


Guest

Recommended Posts

Hi

Is it possible to use complete paths in the config file?

 

Like this: ?

define('DIR_WS_CATALOG', '/full/path/to/httpdocs/'); define('DIR_WS_IMAGES', '/full/path/to/httpdocs/images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', /full/path/to/httpdocs/includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . '/full/path/to/httpdocs/includes/boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . '/full/path/to/httpdocs/includes/functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . '/full/path/to/httpdocs/includes/classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . '/full/path/to/httpdocs/includes/modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . '/full/path/to/httpdocs/includes/languages/');

 

Would there be anything else that needs to be changed.

 

Thanks

Tracy

Link to comment
Share on other sites

Posting without thinking... augh.. obviously the above wont work..

This is what I am trying to do..

 

I want to incorporate my forum with osC, but keep running into path problems.

 

My main forum page is forum/index.php

If I add require('includes/application_top.php'); obviuosly it doesnt find it..

If I add require('../includes/application_top.php'); it does find it.. but then I get more path errors from application_top.

Is there anyway I can set the the paths so anything in any other directory will find where app_top and config are?

 

I hope I explained this well enough

 

Tracy

Link to comment
Share on other sites

You need to remove the trailing slash from your main server path... then adjust all other forum calls accordingly... or, do the reverse with the osc paths.... perhaps fo me the latter is easier... eg. like this, only 3 lines in each configure.php - (look carefully):

 

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

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

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

 define('DIR_WS_CATALOG', 'catalog/'); // absolute path required

 

Not sure about your file system path.. you'll figure it out!

Link to comment
Share on other sites

Ohhhhh.. I am soooooo close...

I got the template working fine.. but the forum/index.php is causing an error..

 

Osc is located here in httpdocs:

define('DIR_WS_CATALOG', '/');

 

Is I was in /httpdocs/forum/

what would be the complete path to the application_top.php file?

 

Thanks

 

Tracy

Link to comment
Share on other sites

:wink:

This is what I have been using... I had to upload the includes directory to the forum dir.

so now it's /forum/includes/

It does work.. well sort of...

 

../includes/application_top.php yeilds the following error:

Fatal error: Cannot redeclare class language in /path/to/httpdocs/forum/includes/classes/language.php on line 16

 

Or use includes/application_top.php and I get:

Fatal error: Call to a member function on a non-object in /path/to/httpdocs/forum/includes/application_top.php on line 300

which is $navigation->add_current_page(); on my copy...

 

IF only I could use the correct includes/application_top

 

perseverance......

 

Tracy

Link to comment
Share on other sites

:wink:

This is what I have been using... I had to upload the includes directory to the forum dir.

 

>snip

 

or use includes/application_top.php and I get:

 

>snip

 

IF only I could use the correct includes/application_top

 

perseverance......

 

Tracy

 

Why have you had to do this?

 

If you are trying to *open* application_top.php you will get errors anyway - the page is called by other pages.

 

Perseverance is a good thing - pm me with exactly what you are trying to do and why, there may well be a better way.

 

p.s. I am going to bed, so it will be a while before I answer :shock:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...