PDA

View Full Version : server root path


memo06dic
03-28-2006, 11:01 AM
Hi, CubeCart is asking me to use a server root path for protecting digital products. It gives me an example like this:
/usr/local/vhosts/www.domain.com/downloads/download.exe
Does this path works for blue host?
Should I create a different folder outside public_html?

areidmtm
03-28-2006, 11:08 AM
use
<?= $_SERVER['DOCUMENT_ROOT']; ?>
to find out your document root.
which returns:
/home/{username}/public_html

All you would do is create a folder outside of public_html

cjwysong
12-30-2006, 05:42 PM
I didn't understand the answer and have the same question... So does this mean this works for me for everything I put above the "www" folder in BlueHost???

/home/MYUSERNAME/MYFOLDER/ANOTHER FOLDER IF I WANT UNTIL I GET TO THE/NAME OF FILE.ZIP (or EXE or PPT or whatever there is to download)?

areidmtm
12-30-2006, 06:33 PM
Yes? I'm not understanding your question either.

by using $_SERVER['DOCUMENT_ROOT'] will give you the absolute directory of the server. This only works if you using a PHP include or something similar that needs the absolute directory.

cjwysong
12-30-2006, 07:33 PM
I guess it is more a cubecart support question.

You see, when you set up digital products in the cart (available to set up through the Blue Host Fantastico)... you have to write a description, type in the prices, add pictures, make it pretty etc.

Then, you have to link to it in the event someone buys it. You type the link to the digital product to be sold through the Cube Cart. Cube Cart has a statement right below where you are to enter the reference for the digital product:

Digital Info:
HTTP Path: http://www.domain.com/downloads/download.exe
Server Root Path: /usr/local/vhosts/www.domain.com/downloads/download.exe (Recommended!)

The advantage of using the server root path is that files can be stored elsewhere than the publicly accessible folder. If this method is chosen CubeCart will automatically create a download link which has an expiry time and max amount of downloads which is configured in the store settings.

Me, I am a cut and paste guy and don't know didley. So, I created a folder called "digi product folder" for my "digi.exe" and my "zippy.zip" files. This folder is above my public html files or as it is listed in my Blue Host as the "www" folder. This keeps out people you don't want and allows you to sell digital products.

Since my user name to log onto Blue Host's CPanel is "HANK" I am going to type exactly the following in the box for the digital product reference in Cube Cart:

"/home/HANK/digi product folder/digi.exe"
and
"/home/HANK/digi product folder/zippy.zip"


Now, I haven't tested this yet. So, please correct me, if I am wrong. Did that make it clear as mud?