Downloadable product orders - 'file not found'
-- HikaShop version -- : HikaShop Business: 2.2.3
-- Joomla version -- : 2.5.17
-- PHP version -- : 5.4.24
-- Browser(s) name and version -- : any (tested in Firefox 26.0 and Chrome 32.0.1700.102)
-- Error-message(debug-mod must be tuned on) -- : "Firefox can't find the file at smoothchords.com/administrator/index.php...d=1869&order_id=5566 ."
This site sells downloadable products consisting of zip, mov and mp3 files. For some of the orders, the purchased downloadable product link is not working and we're getting, ie, "Firefox cannot find the file at 'download_url'". The database records look intact and I'm not seeing any signs of database corruption and the file is there in the media/com_hikashop/upload/safe directory.
In our testing the only files having the issue are certain mov files. The zip files I've tested are working. I've ensured that the HikaShop configuration allows for the mov file type. I'm not sure what is the issue is for these orders. I thought it might be the size of the files that is the issue (400MB+) so we tried modifying the server configuration's execution time and allowed memory but that didn't have any result on the issue. Also, the 'cannot find the file' error doesn't seem to related to a server configuration issue. The error we see when logged into the Joomla backend, viewing the order, and clicking the download link is the same one that would be seen if you just tried to browse to the download link URL without authenticating to Joomla.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
We will need some credentials in order to see the problem directly.
Some database information will be required too, like the line content of the id 1869 of the table hikashop_file
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
Please also provide a link to this thread in your message
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
I was about to do some testing but I can't find the huge file you are talking about.
Could you give me more informations about it and maybe prepare a link to the page where I can try to download it?
Please Log in or Create an account to join the conversation.
Order: 5566
smoothchords.com/administrator/index.php...d=1869&order_id=5566
I was asked to send login credentials to you via the support form, which I did last week.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
Dreamlord Press
www.dreamlordpress.it
Roleplaying Games in the new era
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
The way that your server return a not-really-blank-page does not look like as a direct return of HikaShop.
I think that it could have some kind of permission problem or PHP error.
Having access to the PHP error log or having a FTP access in order to activate some debug trace in the "sendFile" function will help us to better understand the problem ; and fix it.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
I made a lot of tests and the problem is related with your web hosting.
HikaShop right open the file and start to send it but, your server stop the PHP process if we send too much data.
More than stopping the process, nothing is send to the client, like if the buffer if too big, it send nothing at all.
Like I said, I made a lot of tests in order to find a way to bypass it, and I found nothing.
Even if I do not use the "output buffering" of PHP and I use the direct output, I can't send the complete file.
I could send some (very) smaller data but that's all.
Please see with your web hosting for this limitation.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
Are you really sure that you download 1.5GB through another extension and not download the file directly in the server ?
Because there is a huge difference between calling a PHP page which will send you "manually" a file (with the time limitations we know) and download a file directly in the web server (without time limitation because there is not PHP, it is a classical download).
Redirecting the user to another url works but it is not something safe because everybody can access to the file with the right url.
What I can propose you is a little patch in order to use "readfile" instead of reading manually the file.
I know that there is something strange with the output buffering so we can try to avoid it.
You have to make some replacement in the "administrator/component/com_hikashop/classes/file.php" file.
By flushing and cleaning the output buffering, I hope that your server won't block anymore the sending of the file.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
There is no logical reason that your server accept sending "small" files and completely block while sending big files.
Please provide more details about the component which work for you. If you want us to find a solution, we need more details because I have activated/deactivated all buffer settings and it does not change anything.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
The component I used for testing was Zoo. I setup one of the large product files as a download in a Zoo item using the Download element in Attachment mode.
Its possible that the correlation is not file size, but file size seems to be the common denominator with regard to files that work vs files that do not.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.
I finally got a working association, forcing the time_limit and the output buffering:
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Output buffering and zlib.output_compression are currently turned off.
3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Please Log in or Create an account to join the conversation.