Zen Cart Logo
Forums / General Questions / Downloads do NOT work for me

Downloads do NOT work for me

Locked

Views: 1,196

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 May 2007, 5:45 PM
#1
mwjones avatar

mwjones

New Zenner

Join Date:
May 2007
Posts:
9
Plugin Contributions:
0

Downloads do NOT work for me

Cheers,

I have set up Zen v1.3.7 following all instructions. Currently the only products are files available for download. The files are in the /download directory with the proper permissions as per [1].

A friend was helping me test. He successfully completed his checkout, the money came through PayPal fine. However the link provided to him for download resulted in a 500 Internal Server Error.

Here are lines from the Apache error log:

[Tue May 01 13:10:23 2007] [alert] [client 8.8.8.8] /home/user/www/domain.com/directory/cart/pub/.htaccess: IndexIgnore not allowed here, referer: http://www.domain.com/directory/cart/index.php?main_page=checkout_success

[Tue May 01 13:11:20 2007] [alert] [client 8.8.8.8] /home/user/www/domain.com/directory/cart/pub/.htaccess: IndexIgnore not allowed here, referer: http://www.domain.com/directory/cart/index.php?main_page=account_history_info&order_id=2

/cart/pub/.htaccess:```
#prevent directory browsing -- for security
IndexIgnore /

Options +FollowSymLinks -Indexes
/cart/download/.htaccess:
#prevent directory browsing -- for security
IndexIgnore /

AuthType Basic
AuthName "No access"
AuthUserFile .htnopasswd
AuthGroupFile /dev/null
Require valid-user



[1]. <http://www.zen-cart.com/forum/showpost.php?p=240764&postcount=4>
1 May 2007, 6:37 PM
#2
mwjones avatar

mwjones

New Zenner

Join Date:
May 2007
Posts:
9
Plugin Contributions:
0

Re: Downloads do NOT work for me

Just wanted to mention the attribute settings:

Configuration > Attribute Settings ```
Title Value
Enable Downloads true
Download by Redirect true
Download by streaming false
Download Expiration (Number of Days) 0
Number of Downloads Allowed - Per Product 5
Downloads Controller Update Status Value 4
Downloads Controller Order Status Value >= lower value 2
Downloads Controller Order Status Value <= upper value 4
Enable Price Factor true
Enable Qty Price Discount true
Enable Attribute Images true
Enable Text Pricing by word or letter true
Text Pricing - Spaces are Free 1
Read Only option type - Ignore for Add to Cart 1

2 May 2007, 4:56 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Downloads do NOT work for me

Some servers are not setup to allow for the .htaccess for the symbolic links to function correctly ...

Could you check with your host about this?

If they will not allow you to control your own domain then you will need to turn off the Redirect ... while this is less secure, it should correct your problem if all else is setup correctly ...

If your downloads are large, you may also have size or timeout issues ... which again you will need to speak to your hosting site about ...

3 May 2007, 1:15 PM
#6
mwjones avatar

mwjones

New Zenner

Join Date:
May 2007
Posts:
9
Plugin Contributions:
0

Re: Downloads do NOT work for me

Thank you for the reply.

I think you're on to something here. I made a separate directory (/htaccess), then a file located two subdirectories below that (/htaccess/temp/.asdf/file1.txt). A symlink was placed in /htaccess (ln -s /htaccess/temp/.asdf/file1.txt /htaccess/file1.txt), and the same .htaccess file under /pub in Zen Cart was dropped into the testing /htaccess directory. When requesting /htaccess/file1.txt in the browser, the result was the same behavior as with the product download.

Next step seems to be finding the proper configuration to allow Apache to properly follow the symbolic links. In the vhost config, I have:

DocumentRoot /home/user/www/domain.com
<Directory />
    Options +FollowSymLinks
    AllowOverride AuthConfig
</Directory>

<Directory /home/user/www/domain.com>
    Options -Indexes +FollowSymLinks MultiViews
    AllowOverride Authconfig
    Order allow,deny
    allow from all
</Directory>
```At first there was not a + before FollowSymLinks, however adding the plus and restarting the httpd did not seem to change the behavior.  Feel free to provide any helpful links or suggestions.  Thanks again :smile:
3 May 2007, 2:26 PM
#7
mwjones avatar

mwjones

New Zenner

Join Date:
May 2007
Posts:
9
Plugin Contributions:
0

Re: Downloads do NOT work for me

Appears that I've fixed it. Unfortunately I'm not certain on the full reason, but my hypothesis is that the .htaccess somehow disagreed with the vhost configuration. What I did was ```
mv /pub/.htaccess /pub/.NOThtaccess


The vhost configuration:```
DocumentRoot /home/user/www/domain.com
<Directory />
    Options FollowSymLinks
    AllowOverride AuthConfig
</Directory>

<Directory /home/user/www/domain.com>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride Authconfig
    Order allow,deny
    allow from all
</Directory>

Thanks for the suggestions Ajeh!

3 May 2007, 2:27 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Downloads do NOT work for me

Glad that this helped you get it working ... :smile:

I am not into server configuration ... I leave that to my server guru to worry about ... so I cannot really elaborate much on this ...