mirror of https://github.com/BOINC/boinc.git
Web: fix get_other_projects() RPC
There can be intermittent "simplexml_load_file(): I/O warning : failed to load external entity" errors when using simplexml_load_file(). According to http://stackoverflow.com/questions/20534866 the solution is to use file_get_contents() first. This seems to work in our case too.
This commit is contained in:
parent
5ae8474e04
commit
2032288b29
|
@ -46,7 +46,7 @@ function get_other_projects($user) {
|
|||
if (ini_get('allow_url_fopen')) {
|
||||
$timeout = 3;
|
||||
$old_timeout = ini_set('default_socket_timeout', $timeout);
|
||||
$xml_object = simplexml_load_file($url);
|
||||
$xml_object = simplexml_load_string(file_get_contents($url));
|
||||
ini_set('default_socket_timeout', $old_timeout);
|
||||
} else {
|
||||
$ch = curl_init($url);
|
||||
|
|
Loading…
Reference in New Issue