Hi Guys,
I am getting the following errors on this page (/admin/settings/fb/social/settings)
* warning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in /usr/www/users/icdiry/sites/all/modules/fb_social/fb_social.admin.inc on line 80.
* warning: simplexml_load_file(http://www.facebook.com/translations/FacebookLocales.xml) [function.simplexml-load-file]: failed to open stream: no suitable wrapper could be found in /usr/www/users/icdiry/sites/all/modules/fb_social/fb_social.admin.inc on line 80.
* warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://www.facebook.com/translations/FacebookLocales.xml" in /usr/www/users/icdiry/sites/all/modules/fb_social/fb_social.admin.inc on line 80.
* warning: Invalid argument supplied for foreach() in /usr/www/users/icdiry/sites/all/modules/fb_social/fb_social.admin.inc on line 81.
I enabled allow_url_fopen but I believe it is unrelated.
I searched for a solution; but no one else has the same error as far as I can tell.
It would be most appreciated if you can shed some light on this matter.
Thanks in advance
JCB
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 879926_fb_social_http_request_v01.patch | 922 bytes | kars-t |
| admin_settings_fb_social_settings.png | 20.85 KB | JCB |
Comments
Comment #1
ferdi commentedI would try again to set allow_url_fopen = ON in PHP configuration (php.ini).
Comment #2
egomac commentedAre you on PHP4?
Comment #3
kars-t commentedHere is a patch for the problem.
We can use drupal_http_request to avoid using the fopen wrappers. This method uses socket connect. The patch might be extended to do a response code check if it's 200.
Comment #4
ferdi commentedGreat ! committed, http://drupal.org/cvs?commit=417620
Comment #5
kars-t commentedGreat thanks! :D
I close this.
Comment #6
jakedeg commentedI did apply the patch and Terminal told me it was successful. I then re-uploaded the module via FTP but I am still getting the following error message when I click the FB social settings button:
Fatal error: Call to undefined function: simplexml_load_file() in /home/nydac02/public_html/sites/all/modules/fb_social/fb_social.admin.inc on line 80
Comment #7
jakedeg commentedComment #8
kars-t commentedHi,
first of all the patch doesn't seem to be applied correctly because simplexml_load_file() is no longer used but simplexml_load_string().
And the function is part of standard PHP5.
http://www.php.net/manual/en/simplexml.requirements.php
So if your PHP Version does not already implement simplexml it means you are using PHP 4 or a version that was builded without simplexml.
As this module did use simplexml from the begining maybe there should be a notice like "fb_social is PHP 5 only". But otherwise this works as intended.
Comment #9
jakedeg commentedYup. I'm on PHP 4. That's the problem. Thanks for the help.