[Skip to main content](#vessel-content)

#   Downloads don;t work after updating to 2.3.5

##

- **[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")**
- [![onsitenet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7348.jpg)](/forum/user/7348-onsitenet "View onsitenet's Profile") Topic Author
- [ Offline](/forum/user/7348-onsitenet)

Less More

- Posts: 31
- Thank you received: 1
-
-

11 years 10 months ago -  11 years 10 months ago [\#185128](#185128) by [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")  *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185128 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")* was created by *[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")*

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 2.5
-- Error-message(debug-mod must be tuned on) -- : file not found

After updating from 2.3.4 to 2.3.5 downloads don't work anymore
I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY_SECURE_FOLDER/
It was working for a year now, what could possibly go wrong?

Last edit: 11 years 10 months ago by [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile"). Reason: I reverted to 2.3.4 and it's working now!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[korzo](/forum/user/34428-korzo "View korzo's Profile")**
- [![korzo's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34428.png)](/forum/user/34428-korzo "View korzo's Profile")
- [ Offline](/forum/user/34428-korzo)

Less More

- Posts: 193
- Thank you received: 76
-
-

11 years 10 months ago -  11 years 10 months ago [\#185133](#185133) by [korzo](/forum/user/34428-korzo "View korzo's Profile")  Replied by *[korzo](/forum/user/34428-korzo "View korzo's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185133 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

I can confirm this bug on latest Hikashop 2.3.5.

Path to 'uploadsecurefolder' has missing trailing slash.
Quick fix is to change file administrator\components\com_hikashop\classes\file.php
on line 363 from Code:

$path = $this-&gt;getPath('file');

to Code:

$path = $this-&gt;getPath('file').'/';

This issue comes from latest change in getPath() method on lines 695-698.
Function realpath() strips trailing delimiter.

Last edit: 11 years 10 months ago by [korzo](/forum/user/34428-korzo "View korzo's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago -  11 years 10 months ago [\#185138](#185138) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185138 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

Hi onsitenet,

First, can you please re-download HikaShop 2.3.5 in order to be sure that you're using the last package.
The "download file" system has been modified in the last version with some security improvements ; the ".." directory is no more authorize and it is prefered to specify the absolute path, so the system can always check that the requested file is right in the secure folder.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 11 years 10 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[korzo](/forum/user/34428-korzo "View korzo's Profile")**
- [![korzo's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34428.png)](/forum/user/34428-korzo "View korzo's Profile")
- [ Offline](/forum/user/34428-korzo)

Less More

- Posts: 193
- Thank you received: 76
-
-

11 years 10 months ago -  11 years 10 months ago [\#185150](#185150) by [korzo](/forum/user/34428-korzo "View korzo's Profile")  Replied by *[korzo](/forum/user/34428-korzo "View korzo's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185150 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

I have the latest version downloaded today(17:29).

File administrator\components\com_hikashop\classes\file.php was last modified 02.01.2015 and this modification introduced this bug.

Also all other methods using method getPath() are not working correctly.
Files uploaded before this change can't be downloaded or deleted.

Files uploaded after this change are located in wrong location, as last folder in path is prepended to file name.
Also "safe" folder is no longer safe, as .htaccess file is saved as safe.htaccess .
For example I uploaded file payment.jpg to product id 97 on demo site and it's accessible over url:
[ ](http://demo.hikashop.com/media/com_hikashop/upload/safepayment.jpg)[ demo.hikashop.com/media/com\_hikashop/upload/safepayment.jpg](http://demo.hikashop.com/media/com_hikashop/upload/safepayment.jpg)

Last edit: 11 years 10 months ago by [korzo](/forum/user/34428-korzo "View korzo's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")**
- [![onsitenet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7348.jpg)](/forum/user/7348-onsitenet "View onsitenet's Profile") Topic Author
- [ Offline](/forum/user/7348-onsitenet)

Less More

- Posts: 31
- Thank you received: 1
-
-

11 years 10 months ago [\#185166](#185166) by [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")  Replied by *[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185166 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

How would this "absolute path" look like?
...an example(?)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 10 months ago [\#185155](#185155) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185155 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

Hi Korzo,

I don't think that you have the same exact problem than "onsitenet".
For the missing slash ; it comes from the "realpath + JPath::clean" functions, I made some modifications and Nicolas just upload a new package.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")**
- [![onsitenet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7348.jpg)](/forum/user/7348-onsitenet "View onsitenet's Profile") Topic Author
- [ Offline](/forum/user/7348-onsitenet)

Less More

- Posts: 31
- Thank you received: 1
-
-

11 years 10 months ago [\#185176](#185176) by [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")  Replied by *[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185176 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

any chance someone give me an example?
(...it's for apache server with cpanel)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[korzo](/forum/user/34428-korzo "View korzo's Profile")**
- [![korzo's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar34428.png)](/forum/user/34428-korzo "View korzo's Profile")
- [ Offline](/forum/user/34428-korzo)

Less More

- Posts: 193
- Thank you received: 76
-
-

11 years 10 months ago -  11 years 10 months ago [\#185179](#185179) by [korzo](/forum/user/34428-korzo "View korzo's Profile")  Replied by *[korzo](/forum/user/34428-korzo "View korzo's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185179 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

Jerome:
I hadn't problem at all. I was able to reproduce the issue on my dev machine, but failed to explain it.
As I can see it's fixed now.

onsitenet:
Chances are you have to change nothing. Download the latest version(uploaded minutes ago) and update your site.(don't forget to make a backup).
It should work as before update to 2.3.5.

Last edit: 11 years 10 months ago by [korzo](/forum/user/34428-korzo "View korzo's Profile").

The following user(s) said Thank You: [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")**
- [![onsitenet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7348.jpg)](/forum/user/7348-onsitenet "View onsitenet's Profile") Topic Author
- [ Offline](/forum/user/7348-onsitenet)

Less More

- Posts: 31
- Thank you received: 1
-
-

11 years 10 months ago [\#185187](#185187) by [onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")  Replied by *[onsitenet](/forum/user/7348-onsitenet "View onsitenet's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185187 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

That is correct! I've changed nothing and it works now.

I'm still interested to what Jerome said about "absolute path" because I always worry about security. I wish this can be clarified now we're bumped into it.

Thank you 2 ...and many thanks to the Devs for being quick &amp; responsive.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

11 years 10 months ago [\#185189](#185189) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Downloads don;t work after updating to 2.3.5](/forum/28-shipping-methods/873992-downloads-don-t-work-after-updating-to-2-3-5#185189 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 2.5 -- Error-message(debug-mod must be tuned on) -- : file not found  After updating from 2.3.4 to 2.3.5 downloads don't work anymore I have my downloadables outside website's root folder as it is suggested for security reasons and configured the path like this: ../MY&#95;SECURE&#95;FOLDER/ It was working for a year now, what could possibly go wrong?")*

Hi,

Suppose that your website is in the folder /var/www/ and that the secure folder where you put your files is /var/secure/
the path /var/secure/ is the absolute path of your secure folder while ../secure/ is the relative path to your secure folder.
Both are correct and you can use both in the option of HikaShop. There was a bug with the relative path handling in HikaShop 2.3.5 and that's why Jerome recommended that you set the absolute path instead of the relative path.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODczOTkyLWRvd25sb2Fkcy1kb24tdC13b3JrLWFmdGVyLXVwZGF0aW5nLXRvLTItMy01P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
