![]() |
URL file-access is disabled - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: URL file-access is disabled (/showthread.php?tid=32638) |
URL file-access is disabled - El Forum - 07-29-2010 [eluser]NMTeck[/eluser] I get the below message from my server when trying to run the file_get_contents function. I've looked in over forums and it says that the most likely culprit is in the php.ini file. I made those suggested changes but nothing changed. These are the settings in my php.ini Code: allow_url_fopen On On but I still get this Code: A PHP Error was encountered However, if I put file_get_contents in a file that doesn't run through CI, I do not get the errors above. Can anyone help me figure out what I'm doing wrong here? Thanks in advance. URL file-access is disabled - El Forum - 07-29-2010 [eluser]danmontgomery[/eluser] [quote author="NMTeck" date="1280443047"]However, if I put file_get_contents in a file that doesn't run through CI, I do not get the errors above. Can anyone help me figure out what I'm doing wrong here? Thanks in advance.[/quote] Does it work? Or do you just not get the error message? URL file-access is disabled - El Forum - 07-29-2010 [eluser]NMTeck[/eluser] Yes it works and I'm able to print the XML to the screen. And I guess I should note that I just changed servers. URL file-access is disabled - El Forum - 07-31-2010 [eluser]NMTeck[/eluser] Fixed. Just wanted to note that I got around this problem using the curl function instead of file_get_contents or the simplexml_load_file. Hope this helps others in the future. URL file-access is disabled - El Forum - 07-31-2010 [eluser]skunkbad[/eluser] Does anything in the php.ini work? Some hosting environments are set up in a way that php.ini files don't work. My host is this way. I have to use php_value in my .htaccess. |