HaVE A file_get_contents() ERROR? Fix it here.

I used to get this error messaged when i first made a group and went to its main page.

"Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.manet/deciphagear/deciphagear.com/dolphin/inc/classes/BxDolGroups.php on line 417

Warning: file_get_contents(http://deciphagear.com/dolphin/groups/orca/?action=group_last_topics&forum=Foreknow-Apparel-4NO-and-416BRAND&trans=1) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/.manet/deciphagear/deciphagear.com/dolphin/inc/classes/BxDolGroups.php on line 417"

I HAVE FIXED THIS ERROR.

IT IS A SERVER CONFIG THING. IF IT IS TURNED OFF/DISABLED (fopen, get file access function) on your server. TRY THIS.

In my case, I replaced the line 417 in inc/classes/BxDolGroups.php with


$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://deciphagear.com/dolphin/groups/orca/?action=group_last_topics&forum={$sForumUri}&trans=1');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);

// display file
echo $file_contents;

and it works fine so far. =)

ADDITIONAL ERRORS:

There was a message, it said something like Please follow to forum for all posts or topics at the top of the page, and the page was left aligned because of it. to fix this, go to

templates\base\xsl\group_last_topics.xsl and simply delete out the text "follow to forum..." that it reads and save the file, re-upload and overwrite the old.

BE SURE TO BACKUP YOUR OLD FILES BEFORE YOU DO THIS, the easiest way is to simply copy the file to your computer from your server, and rename the old one like file_nameOLD.php and then upload your new editing file with the file_name.php that way if anything goes wrong you can just deleted the new editing file and rename the old one back to how it was without "OLD" in the name =)

Quote · 26 Jun 2008

Ask your host to enable file operation in the php.ini

Regards,

Praveen

http://cpanel.happy-hosting.com

----
Quote · 27 Jun 2008

I am running this locally as a dev server and I don't know that much about php.ini. How do I turn on file operations?

Quote · 28 Jul 2008

@forknowapparel

When you used this fix, did the latest forum posts for that group start showing up in the "Group Forum" box at the bottom of the page? I used your fix and mine do not... wondering if I need to do something else.

Thanks!!

John

Quote · 6 Aug 2008

I have done the php.ini changes but still getting the same error. And also added allow fopen url in .htaccess of orca folder but nothing works.

Quote · 29 Jan 2009

@foreknowapparel thanks for the file_get_contents error fix - worked for me Smile

BTW, for anyone using a file editor without a line count, line 417 in BxDolGroups.php reads
$sRet = file_get_contents("{$site['groups']}orca/?action=group_last_topics&forum={$sForumUri}&trans=1");

Quote · 6 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.