Forums / Basic Configuration / Redirect and Streaming downloads

Redirect and Streaming downloads

Views: 1,001

Results 1 to 4 of 4
19 Nov 2015, 11:50 PM
#1
sparktronic avatar

sparktronic

Zen Follower

Join Date:
Nov 2005
Location:
Rochester, New York
Posts:
153
Plugin Contributions:
0

Redirect and Streaming downloads

Ver 1.54 running on a Lunix Apache system. Fresh install of cart recently:
CGI Active
Platform Type Debian
MySQL Version 5.5.44
Perl Version 5.8.8
PHP Version 5.6
Sendmail Path /usr/sbin/sendmail
Perl Path /usr/bin/perl
PHP Path /usr/local/bin/php

After putting in all my items, using the attribute names and options seting my files in the downloads folder, making sure the permissions on the pub folder is 777, when I use redirect download I get a 403 forbidden error when you go to download the item from customers "My Account". If I change to Streaming download, you can get the downloads. Thats fine, however some of the downloads are bigger than the required size for streaming and I would like to use redirect. I used it on a catalog with 1.3.6h and it worked fine then Is there something I am missing to be able to use redirect??

20 Nov 2015, 3:24 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Redirect and Streaming downloads

I've found that sometimes server doesn't like that the temporary directory is created with 777 permissions and that instead should be 755... Try changing 0777 to 0755 in includes/modules/pages/download/header_php.php

Also, what type of file is being downloaded? (Extension and captalization may matter. )

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Nov 2015, 3:35 AM
#3
sparktronic avatar

sparktronic

Zen Follower

Join Date:
Nov 2005
Location:
Rochester, New York
Posts:
153
Plugin Contributions:
0

Re: Redirect and Streaming downloads

mc12345678:

I've found that sometimes server doesn't like that the temporary directory is created with 777 permissions and that instead should be 755... Try changing 0777 to 0755 in includes/modules/pages/download/header_php.php

Also, what type of file is being downloaded? (Extension and captalization may matter. )

That file was already 755 permission. I am using .zip .zip1 ect... to .zip 15 .pdf and .mp4 Here is a copy of htaccess:

deny everything

<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>

but now allow just certain necessary files:

<FilesMatch "(?i).*.(zip|zip1|zip2|zip3|zip4|zip5|zip6|zip7|zip8|zip9|zip10|zip11|zip12|gzip|pdf|mp3|swf|wma|wmv|wav|epub|ogg|webm|m4v|m4a|rm|doc|rtf)$">
Order Allow,Deny
Allow from all
</FilesMatch>

<IfModule mod_headers.c> <FilesMatch "(?i).*\.(zip|zip1|zip2|z ip3|zip4|zip5|zip6|zip7|zip8|zip9|zip10|zip11|zip12|gzip|pdf|mp3|swf|wma|wmv|wav|epub|ogg|m4v|m4a|rm|doc|rtf)$"> # tell all downloads to automatically be treated as "save as" instead of launching in an application directly # ALERT: ForceType requires Apache2 or later. If using older version of Apache, it will need mod_mime installed. Or just comment out the ForceType line below # (to disable, just comment the next 2 lines by adding a '#' at the beginning of each): ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> </IfModule>

IndexIgnore /

20 Nov 2015, 3:55 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Redirect and Streaming downloads

Not referring to the file itself (which should be 644) but inside of the file... If inside already is 755, then either the upgrade wasn't done correctly or it was modified after the upgrade... Default ZC establishes the temporary directory as 777.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...