Posted by rob_dean on June 15, 2009 at 3:24am
3 followers
Jump to:
| Project: | Create from Web |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hello,
This might seem like a simple fix based on the message presented, but I am not sure how to do it. Any ideas on this would be great to hear. Thanks!
* warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /nfs/c04/h01/mnt/60648/domains/wikistock.com/html/sites/all/modules/createfromweb/operator_wikipedia.inc on line 61.
* warning: file_get_contents(http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=site%3Awikip...) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /nfs/c04/h01/mnt/60648/domains/wikistock.com/html/sites/all/modules/createfromweb/operator_wikipedia.inc on line 61.
* warning: file_get_contents(&action=raw§ion=0) [function.file-get-contents]: failed to open stream: No such file or directory in /nfs/c04/h01/mnt/60648/domains/wikistock.com/html/sites/all/modules/createfromweb/operator_wikipedia.inc on line 72.
Comments
#1
Same here: the above message appears while trying to lookup wikipedia content.
#2
Line 61 says of operator_wikipedia.inc says "$gjson = file_get_contents($gurl);"
Line 72 says "$raw = (file_get_contents($rawurl)) or drupal_set_message("could not retrieve wikidata", ERROR);"
It looks like the search is not properly retrieving the URL. I wonder if this has to do with updates to Wikipedia? I'm not sure...
#3
This may be related to this issue: http://drupal.org/node/284538
Will the solution in the link work for this module?
#4
I tried replacing line 61 of operator_wikipedia.inc to
//Initialize the Curl session
$ch = curl_init();
//Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Set the URL
curl_setopt($ch, CURLOPT_URL, $URL);
//Execute the fetch
$gjson = curl_exec($ch);
//Close the connection
curl_close($ch);
I'm still getting the error: "warning: file_get_contents(&action=raw§ion=0) [function.file-get-contents]: failed to open stream: No such file or directory in /homepages/htdocs/mysite.com/sites/all/modules/createfromweb/operator_wikipedia.inc on line 83."
Any help with this would be appreciated.
#5
I added this specific line to my php.ini file in my drupal site's root directory (using 1&1 web hosting): allow_url_fopen = on. Now things are looking better: error went away.
#6
Is there a way i could sort this with no access to my .ini file? thanks
#7
In my case, I created the php.ini file and placed it into my www directory. Maybe your host will allow this?