?
avatar PhilETaylor
PhilETaylor
1 Feb 2017

Steps to reproduce the issue

Find a Siteground server configured under their "new way"...

E.g. m30.siteground.biz

Attempt to run code like:

$body = file_get_contents('https://example.com/file.txt');

We do this in core like these examples:

https://github.com/joomla/joomla-cms/blob/6e07ca6fadd8a5d1db3337cf0357d782646f5411/components/com_users/controllers/profile_base_json.php#L34

Expected result

That $body now contents the content of file.txt

Actual result

$body is empty

System information (as much as possible)

m30.siteground.biz

Additional comments

The correct way is to code in defense - if file_get_contents is not working then fallback to CURL (which is x15 more code than a single file_get_contents line of code) - we could implement calls to FOFDownload which is in core Joomla ?

avatar PhilETaylor PhilETaylor - open - 1 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Feb 2017
avatar PhilETaylor PhilETaylor - change - 1 Feb 2017
The description was changed
avatar PhilETaylor PhilETaylor - edited - 1 Feb 2017
avatar Bakual
Bakual - comment - 1 Feb 2017

I don't think you need FOFDownload. JHttp should be able to do that as well. Or do I miss something?

avatar PhilETaylor
PhilETaylor - comment - 1 Feb 2017

I was in a rush and did not scratch too deep - I know FoFdownload has curl and other adapters - I guess JHttp also does :)

avatar PhilETaylor PhilETaylor - change - 2 Feb 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-02 21:11:50
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 2 Feb 2017

Add a Comment

Login with GitHub to post a comment