jDownloads Support Forum

jDownloads for Joomla 4.x and 5.x => jDownloads 4.0 => General => Topic started by: thilo2621 on 01.09.2023 11:38:27

Title: firewall/proxy problem - Solved
Post by: thilo2621 on 01.09.2023 11:38:27
Hi

I got this error while working behind a firewall/proxy

Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://www.jdownloads.com/updates/4.0/final/jdownloads-update.xml" in /data/www/html/administrator/components/com_jdownloads/src/Helper/JDownloadsHelper.php on line 2454

Edited this file "JDownloadsHelper.php" to hardcode our proxy - better would be if you include the joomla proxy config in this file

Thanks.

Greetings,
Title: Re: firewall/proxy problem
Post by: ColinM on 01.09.2023 14:13:16
Hi
Think that including proxy settings in a a specific jD file would not be a good idea!  There is a defined Jomla location for proxy settings as noted below.

In the Joomla admin panel select System and then select 'Global Configuration'. In the 'Server' tab locate the section 'Proxy Settings'.  Change 'Enable Outbound Proxy' to 'Yes' and enter the details specific to your proxy in the four extra settings that are now shown.

Colin
Title: Re: firewall/proxy problem
Post by: thilo2621 on 01.09.2023 15:50:44
The proxy settings in joomla global configuration IS set - but jdownloads does NOT take these in consideration - thus I got the warning message mentioned in my first mail and a time out is shown after some time
Title: Re: firewall/proxy problem
Post by: ColinM on 01.09.2023 22:25:40
Hi,
It would have helped if you said you had set the proxy setting in Joomla global config!! :(
Suggest that a suitable scheme would be for jD to pickup any settings from there.

Could you advise where in JDownloadsHelper.php what you hardcoded your proxy with a suitable example pseudo code fragment at /administrator/components/com_jdownloads/src/Helper/JDownloadsHelper.php on line 2454  - basically I have not used a proxy server so need a little asist
Thanks
Colin
Title: Re: firewall/proxy problem
Post by: thilo2621 on 12.09.2023 12:30:09
Sorry for the delay

It's rather a dirty workaround than modifying any jdownloads php file ... So what was done is adding this in our /etc/hosts table

127.0.0.1    www.jdownloads.net   jdownloads.net  www.jdownloads.com    jdownloads.com jdownloads