Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio (/showthread.php?tid=70854) |
Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - mehuljogi - 06-09-2018 I am trying below code to get city detail from thirdparty website using one of my controller file PHP Code: $target_url = "https://ziptasticapi.com/{$zip}"; But I am getting below errors, I already tried allow_url_fopen = On & allow_url_include = On in php.ini file, it getting issue with php7.0 while I am using php 5.6 It works fine. So please let me guide its codeigniter issue or server? I am using same above code in external file than it works fine, but while I am using above code with controller it gives error with php7.0. Quote:Severity: Warning RE: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - InsiteFX - 06-09-2018 php.ini Code: ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. RE: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - skunkbad - 06-09-2018 I'm not saying it's your problem, but you're not using the context parameter correctly, if that was your intention. See example #4: http://php.net/manual/en/function.file-get-contents.php RE: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - mehuljogi - 06-10-2018 (06-09-2018, 09:12 AM)InsiteFX Wrote: php.ini I already on it, but while I am using my code with my controller file of the codeignitter framework than it not works let me know if you have another option, I already tried curl but give me error like undefined curl_init() function. I already on library using php.ini file for curl too. RE: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - ragingTorch - 06-11-2018 (06-10-2018, 10:20 PM)mehuljogi Wrote:(06-09-2018, 09:12 AM)InsiteFX Wrote: php.ini You might be editing the wrong php.ini Create a test.php, put phpinfo() in it and then access it. It will tell you many things and one of them will be the location the php.ini file, that's the one you need to edit. Don't forget to restart your server after saving php.ini for it to take effect. RE: Message: file_get_contents(): https:// wrapper is disabled in the server configuratio - InsiteFX - 06-11-2018 And make sure you delete the test.php file when your finished! It's also a good idea to do an: PHP Code: ob_start(); |