Quote:
Originally Posted by ShawnMTierney
I have read most of the posts but have not found the resolution for this error - any help would be appreciated:
Warning: DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: URL file-access is disabled in the server configuration in [path]/includes/functions_gxboxlive.php on line 407
There must be a way to get this routine to work without resorting to "allow_url_fopen = ON" - the reason php5 turns it off is because it's a security hole...
|
I too had this error - your post started me on the trail and then discovered that you have to use cURL instead of allow_url_fopen.
replace the ENTIRE "gxbl_simple_get_xml" function in functions_gxboxlive.php with the following:
Code:
function gxbl_simple_get_xml($url)
{
$ch = curl_init($url);
$html = fopen("example_htmlpage.html", "w");
curl_setopt($ch, CURLOPT_FILE, $html);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($html);
if ($html)
{
$xml = simplexml_load_file('example_htmlpage.html');
return gxbl_object_to_array($xml->body->div);
}
else
{
return false;
}
}
That fixed it for me - its working fine on my site again now.