Setting up MP3 files for download
First, I'm rather new and still green in zen cart so be gentle...
I'm trying to setup MP3 files for download. I've been thru all the steps to add attributes and everything else that i can find. everything looks good in the store. i can select my download attribute radio button. it takes me to the payment page and that works, (actually I'm using a coupon code for 100% off but it still takes me all the way to the confirm purchase page). i confirm my purchase, then i get the problem. "Server not found". Not a 403 error, just "Server Not Found".
I'm using download by redirect and i can see the file in /pub with the correct permissions so i know its getting there. I'm thinking it's on the server side since this is a server generated error but where? I'm sure somebody out there has hit this. I'm also hosted on Godaddy Linux cPanel.
the URL it's redirecting to is https://pub/.blablabla/########_A.mp3.
so is it the server side or do i have something amiss in my configure.php file? and if it is the server side, what do i need to look at?
Thanks Yall
Re: Setting up MP3 files for download
1. You said "i confirm my purchase, then i get the problem. "Server not found"
I'm assuming you left out a step where you probably also have to "click on the Download link". Is that right?
2. Is the URL actually starting with "https://pub/."?
If properly configured and unaltered, it should have your site's URL in there, and THEN the /pub part.
Is that the problem, or were you just aggressively abbreviating things?
Re: Setting up MP3 files for download
Quote:
Originally Posted by
DrByte
1. You said "i confirm my purchase, then i get the problem. "Server not found"
I'm assuming you left out a step where you probably also have to "click on the Download link". Is that right?
2. Is the URL actually starting with "https://pub/."?
If properly configured and unaltered, it should have your site's URL in there, and THEN the /pub part.
Is that the problem, or were you just aggressively abbreviating things?
1. Yes, clicked the DownloadLink. There I was abrieviating a wee too much....
2. No, that's actually what the URL looks like. I'm guessing it's getting concatenated somewhere and I've got some config setting wrong but I can't find out which or where to look. Configure.php 'looks' to be correct but my eyes ain't what they used to be.
Re: Setting up MP3 files for download
Do you have any URL-rewriting plugins installed? (often misnamed as SEO-Friendly URLs or search-engine-friendly)
Have you tampered with the /includes/filenames.php file, or done anything to override the usual defined value of FILENAME_DOWNLOAD ?
What plugins are added to your site?
In what ways have you changed the ZC code from its original form?
Re: Setting up MP3 files for download
Quote:
Originally Posted by
DrByte
Do you have any URL-rewriting plugins installed? (often misnamed as SEO-Friendly URLs or search-engine-friendly)
Have you tampered with the /includes/filenames.php file, or done anything to override the usual defined value of FILENAME_DOWNLOAD ?
What plugins are added to your site?
In what ways have you changed the ZC code from its original form?
have modified includes/CUSTOM/filenames.php but FILENAME_DOWNLOAD is unchanged from the original.
define('FILENAME_DOWNLOAD', 'download');
define('FILENAME_DOWNLOAD_TIME_OUT','download_time_out');
define('FILENAME_DOWNLOADS_MANAGER','downloads_manager');
No URL-rewriting plugins installed that i'm aware of. the plugins installed are: editable sideboxes 1.0, banner manager controlled sideboxes, ckeditor, Sheffield blue template, contact us add subject, Add Additional Pages to More Information Sidebox Zen-Cart 1.3.8a, email archive viewer.
i've made changeds but have always tried to stay in the /custom 'override' format leaving the original stuff as is. although i wouldn't count out my having changed something unknowingly.
where does ZC set that path? configure.php? perhaps i can look again there and see if there's something i've done in an override that would cause this.
Re: Setting up MP3 files for download
Thanks DrByte. I found it. it was in /includes/configure.php. there was an extra /
define('DIR_WS_CATALOG', '//');
define('DIR_WS_HTTPS_CATALOG', '//');
Looking right at it and didn't see it until just now... Duhhhhh!
however, now that it takes me to the file it comes up in my player. i want it to come up as a file to save, not stream.
Re: Setting up MP3 files for download
The default /pub/.htaccess file rules tell Apache to serve all files as an attachment that should be saved, not played immediately. You might have to ask your hosting company for help with specifics for your server if it's not working properly. But first test it in multiple browsers on different computers ... just in case you've pre-told your own browser to "always play" as your own preference on your own pc.
Re: Setting up MP3 files for download
Thanks, I didn't have the .htaccess file in /pub so i created it and added
ForceType application/octet-stream
Header set Content-Disposition attachment
that i found in another thread. works like a charm now.
thanks!
Re: Setting up MP3 files for download
That suggests maybe your initial installation/upload missed all the other .htaccess files too.
Might be good to deal with that. https://github.com/zencart/zencart/tree/v155
(Sometimes FTP programs ignore files starting with a "." because they're considered "hidden" files, but in the case of putting these files on your server, you *do* want to see them and upload them, even though they will be "hidden" (appropriately) on the server.)