Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with DIR_FS_CATALOG


teamwhatever

Recommended Posts

Hi,

 

I have the following as my DIR_FS_CATALOG

 

substr($_SERVER["SCRIPT_FILENAME"], 0, strrpos($_SERVER["SCRIPT_FILENAME"], "/") + 1));

 

However, this does not reference the root folder (physically) if you are in a lower folder.

 

For example, it will reference it correctly if the file being used is in www.domain.com, but if it is in www.domain.com/folder/ it will give the root plus that folder.

 

I would have thought that was wrong, since is it not supposed to be referencing the root folder? Meaning that all other references to DIR_FS_CATALOG are likely to be incorrect if the file is in a folder?

 

I was going to try $_SERVER['DOCUMENT_ROOT']; but I'm worried of breaking something that is working ok. Also, it doesn't have a trailing slash, but I guess I could add that if it is necessary (I'm assuming it is?).

 

Are there any functions etc that would actually require the real root location to be root plus any folders?

 

(i.e. would they need local/www/ to be local/www/folder/)

 

Seems weird, but its a problem now as I'm using googlesitemap contribution and its causing me errors in the urls to be submitted (they are in the googlesitemap folder and add that to the url)

 

thanks (for reading my incoherent ramblings).

Link to comment
Share on other sites

First of all, to free yourself to experiment, make backup copies of both configure.php files and keep them clearly identified which is which.

 

If your webhost has provided you with the full path information to your domain root, you might try using the actual absolute file path and see if that gets it working correctly.

 

As for functions requiring a specific folder location, as long as the configure.php files are correctly set for the file structure, all built in functions and all properly written mods should have no problem finding files/folders.

 

hth

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...