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%3Awikipedia.org%2Fwiki%2F+apple) [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&section=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

bomarmonk’s picture

Same here: the above message appears while trying to lookup wikipedia content.

bomarmonk’s picture

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...

bomarmonk’s picture

This may be related to this issue: http://drupal.org/node/284538

Will the solution in the link work for this module?

bomarmonk’s picture

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&section=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.

bomarmonk’s picture

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.

kompressaur’s picture

Is there a way i could sort this with no access to my .ini file? thanks

bomarmonk’s picture

In my case, I created the php.ini file and placed it into my www directory. Maybe your host will allow this?