News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Bug nach Deaktivierung von: Download über PHP Script abwickeln [Fixed in 3.2.39]

Started by stegmajo, 07.07.2015 18:51:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stegmajo

Ich habe das Feature "Download über PHP Script abwickeln" deaktiviert, weil die Downloads bei meinem Hoster immer nach 120 Sekunden abbrechen, obwohl ich die PHP.ini entsprechend bearbeitet habe.
Jetzt verweist mich aber jDownloads beim herunterladen einer Datei auf den falschen Link.
Der Link sieht in etwa so aus: /mnt/webr/b0/29/xxxxx/htdocs/test/jdownloads/Kategorie/Datei.zip
Und sollte aber so aussehen: www.meine-adresse.de/jdownloads/Kategorie/Datei.zip
Anscheinend ist ein Bug in dem Quellcode, der den richtigen Link zusammensetzt für den Download.

Ich bin auf Version 3.2.34
  •  

ColinM

Hi
I used Google Translate on your message so I hope I have understood properly!  I understand you have set the  "Send Downloads using the PHP Script?" in Config - Downloads tab to No.  And now you get the wrong address for the link.

First  and obvious question is did you note  the remark about ensuring that in the "Protect your Download-directory? " fielkd in Congig - Security tab is set to 'No'?  I expect you have.

The form of the link is something like

<a href="/list-all-cats/send/11-subcata2/7-debug02a" target="_blank" title="Start download" class="jdbutton jorange ">Download</a>

where 11 is the id of cat 'subcata2' and 7 is the id of Download 'debug02a' on my test site. Actually uses the alias names.    This is the link in the download button on the Summary page.

I could not repeat the problem so it may be a config setting difference I had
Download Tab - "Activate direct-downloading? " as No
Front End tab - "View Download detail page?"  as Yes
Front End tab - "Use files title as download link? as No

Could you advise what you have set please

Colin

Colin M
  •  

stegmajo

Hey ColinM,

you have understood my problem the correct way.
The property in the "Protect your Download-directory" is set to "No" as you have already mentioned.

The link to a download shows as following:
<a target="_blank" href="/index.php/downloads/send/5-anleitungen/1-anleitung-benutzerregistrierung" title="Download" class="jdbutton jorange jsmall">Download</a>
5 is the id of the category "Anleitungen" and 1 is the id of the file "Anleitung-Benutzerregistrierung". So everything should be fine here.
When I click the download button im redirected and in my browsers address line the address "http://mnt/webr/b0/29/xxxxxxxx/htdocs/joomla/jdownloads/Anleitungen/Anleitung%20Benutzerregistrierung.pdf" is opened.
But under this address my file isn't available because the address is wrong.

I have set my settings as following:
Download Tab - "Activate direct-downloading? " as Yes
Front End tab - "View Download detail page?"  as Yes
Front End tab - "Use files title as download link? as Yes

To test if my settings are the reason for this misbehaviour, I changed my settings to the properties you posted, but the problem still exists...
  •  

ColinM

Strange!  Do you have any redirects in your .htaccess file?

Also could you turn off SEF - or do you perhaps have a SEF extension active?

Colin
Colin M
  •  

stegmajo

Disabling the SEF Plugin from Joomla itself made no difference.
In my main directory of joomla there is no .htaccess file, only a htaccess.txt file, but that shouldn't matter.

Another question: Is the following value set right? "Main Download Directory" in the tab "Downloads" is set to "/mnt/webr/b0/29/xxxxx/htdocs/joomla/jdownloads".

I don't know where this bug should come from. There is one other option: I could set up a test enviroment of my website with my default template and I send you a private message with the login data, so you can test where this behaviour comes from. Eventually it comes from my tempate I use, it's name is Gavick StoreBox.
  •  

ColinM

Hi
So it does  not look like SEF or a redirect
QuoteIs the following value set right? "Main Download Directory" in the tab "Downloads" is set to "/mnt/webr/b0/29/xxxxx/htdocs/joomla/jdownloads".
It should refer to what might be called the absolute directory reference.
I am used to something more like  /home/siteid/public_html/jdownloads where public_html is the usual root direvtory.   It does not look like a Cpanel site.  Are you running on Xampp?

We have had a cross effect with a Gavick template on an earlier occasion.  So yes setting up a test site would be good.  It maybe also be helpful to have eXtplorer so as to look at files and directory structure directly.  Please PM details when ready.

Colin
Colin M
  •  

Arno

Seems for me that we have a bug here.  :-\
I will check it. It was a long time ago as i have tested this option.

Edit:
after first tests i can not reproduce your problem. For me works it very good.
Here is the part where the link is created (controllers/download.php line 804):

           if (!$jlistConfig['use.php.script.for.download']){
               $root = str_replace('\\', '/', $_SERVER["DOCUMENT_ROOT"]);
               $root = rtrim($root, "/");              
               $host = $_SERVER["HTTP_HOST"].'/';                
               $filename_direct = str_replace($root, $host, $filename_direct);
               $filename_direct = str_replace('//', '/', $filename_direct);
               if (strpos('http://', $filename_direct) === false && strpos('https://', $filename_direct) === false && strpos('ftp://', $filename_direct) === false){
                   $filename_direct = 'http://'.$filename_direct;
               }
               $app->redirect($filename_direct);
           } else {
               ...


I get a url like: "http://localhost/xxx/jdownloads/Games/Action Games/dbview.exe" which is correct in my case.
So Colin has right, we need backend access.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

stegmajo

So it's a long time ago, when I posted my issue here in this forum.

The bug is still existing and it would be nice, if someone of you has the time to solve this bug.

I set up an test installation at http://54447529.swh.strato-hosting.eu/joomla_01/
This installation is without the gavick template but the bug is still existing.

I will send you two, Colin and Arno, the credentials for backend access.
  •  

Arno

QuoteSo it's a long time ago, when I posted my issue here in this forum.
The bug is still existing and it would be nice, if someone of you has the time to solve this bug.
Can it be that you have not read the last replies.

QuoteEdit:
after first tests i can not reproduce your problem. For me works it very good.

Quote... So yes setting up a test site would be good.  It maybe also be helpful to have eXtplorer so as to look at files and directory structure directly. Please PM details when ready.
So we wait since nearly 3 months on your answer. So it is not our mistake.

Thanks for the login data.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

stegmajo

Quote from: Arno on 06.10.2015 20:14:13
Can it be that you have not read the last replies.
Yet I have read the last replies.

Quote from: Arno on 06.10.2015 20:14:13
So we wait since nearly 3 months on your answer. So it is not our mistake.
That shouldn't be an accusation to you. It is my mistake that I haven't answered in a short time.

Quote from: Arno on 06.10.2015 20:14:13
Thanks for the login data.
Thanks for looking after the problem.
  •  

ColinM

Hi
I have been looking at the site and checking downloads.  But I am a bit confused as as there is a variance in the site address!.  I will send some details tomorrow by PM
Colin
Colin M
  •  

Arno

I think we could find a solution for this special server configuration.  ;)
Please test the unzipped file below and copy it to: components/com_jdownloads/controllers/

By the way: my solution works only with the original path - not with the tips from strato.


[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

stegmajo

It works!

Thank you for helping getting jDownloads working on Strato.
  •