Author Topic: include(): https:// wrapper is disabled in the server configuration by allow_url  (Read 2158 times)

0 Members and 1 Guest are viewing this topic.

Offline smokie

  • Senior Member
  • **
  • Posts: 51
    • Newquay Cornwall. UK
Bluehost updated apache to 2.4.39 on server last night, plus some more php 7 versions, now get this message on some scripts.

include(): https:// wrapper is disabled in the server configuration by allow_url_include=0

Checked the php.ini and it isnt set to off

allow_url_include = On

what could be causing this have tried
include($_SERVER['DOCUMENT_ROOT']."/.... etc

but still fails.

Any pointers much appreciated
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline smokie

  • Senior Member
  • **
  • Posts: 51
    • Newquay Cornwall. UK
Think I have cracked it,  [tup]

Time will tell
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 225
    • Vermilion weather
I have Bluehost VPS but haven't come across this yet.
It could be beneficial if you post your solution in case it does come up.
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

Offline smokie

  • Senior Member
  • **
  • Posts: 51
    • Newquay Cornwall. UK
I was waiting to be sure, it turns out my old Apache allowed php.ini to be in root for sub domains as well

Just dropped php.ini into sub domain, working now
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Most hosters will disallow having

allow_url_include = On

as it is an unsafe practice .. doing an include() from a http/https source means  you want to fetch AND HAVE PHP PARSE the results.  It's an easy way for malware to arrive on the target page.

A safer way to do that (and only requires allow_url_fopen = on to be set) is to use

readfile(<http or https URL>) instead to read and print the resulting data on the page or

$page = file_get_contents(<http or https URL>);
print $page;

which does the same.

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline smokie

  • Senior Member
  • **
  • Posts: 51
    • Newquay Cornwall. UK
I use it to decode RSS feeds, I will have to look for  another solution
Newquay, Cornwall.UK  > WS2300 Operational since May 2007. New home from 6/4/08 www.newquayweather.com

 

anything