Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › Downloaded file size is 0 (Zero) byte or 404 error or Other file download error
- This topic has 60 replies, 12 voices, and was last updated 10 years, 8 months ago by wzp.
-
AuthorPosts
-
December 6, 2011 at 5:42 pm #19977wzpModerator
When you directly download files, data goes directly from the server to your browser. When using eStore, the plugin acts as a middle man, to prevent buyers from directly accessing the file. Because not all hosting packages are the same, it is sometimes necessary to make adjustments to eStore.
Please keep the caching turned off for now.
You never answered my question of how big the zip file is.
December 6, 2011 at 5:57 pm #19978coolvibeMemberit is 1.5 Mb zip file
December 6, 2011 at 6:15 pm #19979coolvibeMembera few more things I tried without success:
1. Changed the path of the downloadable file to sub domain.
2. Changed the path of the downloadable file to some external server.
No success.
No caching! and now it doesn’t even seem a server issue. need some help!
December 6, 2011 at 6:22 pm #19980wzpModeratorPlease complete my contact form at: http://TheAssurer/contact
I will reply with a list of things about your site that I will need.
Right now, I’m riding a bus, using an iPad. In about 3 hours, I’ll be able to have a peek to see if I can determine the problem, using the information you provide.
December 8, 2011 at 9:49 am #19981boagworldMemberThanks for the help with the debug files. They are now working
Here are the results where I attempt to download a file with W3 Total Cache turned on. The final downloaded file is Zero Bytes:
DOWNLOAD MANAGER DEBUG
[12/08/2011 9:16 AM] – Advisory : Log file reset.
[12/08/2011 9:18 AM] – Status : Unresolved DL file path = http://dl.dropbox.com/u/228092/book/Building%20websites%20for%20return%20on%20investment.zip
[12/08/2011 9:18 AM] – Status : Resolved DL file path = http://dl.dropbox.com/u/228092/book/Building%20websites%20for%20return%20on%20investment.zip
[12/08/2011 9:18 AM] – Advisory : No DL file path conversion performed on URL.
[12/08/2011 9:18 AM] – Status : Dispatching DL method = 1
[12/08/2011 9:18 AM] – SUCCESS : DL completed with no server-side errors detected.
December 8, 2011 at 1:48 pm #19982wzpModeratorI think you should exclude the download.php file from being cached.
December 9, 2011 at 6:23 am #19983adminKeymasterDo you have the “Enable HTTP (gzip) compression” option checked under the browser cache settings of the W3 Total Cache plugin? If you do try unchecking it.
December 9, 2011 at 9:09 am #19984boagworldMemberAs I explained in the original video I posted (http://vimeo.com/33195023) I have both disabled gzip and excluded download.php from being cached. The problem still exists.
December 10, 2011 at 3:38 am #19985adminKeymasterOkay lets try to narrow it down to which setting option is doing this. Please do the following:
1. Go to the “General Settings” of the W3 Total Cache plugin then hit the “Restore Default Settings” to restore the settings to default (you can export your current settings before doing this).
2. Now, turn off all the following 5 types of caching and save the settings (also empty all cache too):
Page Cache
Minify
Database Cache
Object Cache
Browser Cache
3. The plugin will be running but there should be no caching so try a download and see what behavior you get.
4. If the download works fine then start to enable the individual cache settings starting with “Page Cache” and test the download each time.
Let me know which one breaks the download.
December 13, 2011 at 10:16 am #19986boagworldMemberNow that is strange. Even disabling all of the options listed above it still fails!
December 14, 2011 at 3:58 am #19987adminKeymasterYeah thats very strange… lets take a look at the .htaccess file with W3 Total Cache active but all the individual caching inactive. Can you please post the content of the .htaccess file (from the site root) for the following two conditions?
– W3 Total Cache inactive (when the downloads work fine)
– With W3 Total Cache active but all caching turned off
December 15, 2011 at 6:56 pm #19988boagworldMemberAh okay. I was strictly right before. If I disable browser caching and page caching the download does work. Its if I have either of them turned on it won’t.
December 16, 2011 at 9:05 am #19989adminKeymasterOkay… lets look at the .htaccess file difference (for when it works and when it doesn’t) so we can see what directive in the .htaccess file is causing this issue.
December 16, 2011 at 2:11 pm #19990boagworldMemberThanks for all your help on this. It is very much appreciated. Okay here is the htaccess file when it is NOT working…
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
</IfModule>
<FilesMatch “.(css|js|htc|CSS|JS|HTC)$”>
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By “W3 Total Cache/0.9.2.4”
</IfModule>
</FilesMatch>
<FilesMatch “.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$”>
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By “W3 Total Cache/0.9.2.4”
</IfModule>
</FilesMatch>
<FilesMatch “.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$”>
FileETag None
<IfModule mod_headers.c>
Header set X-Powered-By “W3 Total Cache/0.9.2.4”
</IfModule>
</FilesMatch>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.*/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [L]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* – [E=W3TC_ENC:_gzip]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_HOST} =boagworld.com
RewriteCond %{REQUEST_URI} /$ [OR]
RewriteCond %{REQUEST_URI} (sitemap(_index)?.xml(.gz)?|[a-z0-9_-]+-sitemap([0-9]+)?.xml(.gz)?) [NC]
RewriteCond %{REQUEST_URI} !(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|/feed/|wp-.*.php|index.php) [NC,OR]
RewriteCond %{REQUEST_URI} (wp-comments-popup.php|wp-links-opml.php|wp-locations.php) [NC]
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_[a-f0-9]+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(W3 Total Cache/0.9.2.4) [NC]
RewriteCond “%{DOCUMENT_ROOT}/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}” -f
RewriteRule .* “/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}” [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<FilesMatch “.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
ExpiresActive On
ExpiresDefault “access plus 1 year”
</FilesMatch>
FileETag none
And here it is when it IS working…
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<FilesMatch “.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
ExpiresActive On
ExpiresDefault “access plus 1 year”
</FilesMatch>
FileETag none
Hope that helps.
December 17, 2011 at 7:46 am #19991adminKeymasterOkay here is your issue….
See you mentioned that you are not using gzip compressing in the W3 Total Cache settings but your .htaccess file has them. See the following two blocks of
Here is one in the “Browser Cache” section
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>Here is one inside the “Page Cache” section
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=W3TC_ENC:_gzip]When you have the
"Enable HTTP (gzip) compression"
option unchecked in your browser cache settings of W3 Total Cache plugin it is not supposed to add the above codes to your .htaccess file. As long as those above mentioned code is present in the .htaccess file it will perform gzip compression.Somehow the W3Total Cache plugin is messing up that in the .htaccess file (I would recommend you double check the W3 Total Cache settings)
-
AuthorPosts
- You must be logged in to reply to this topic.