help with file_get_contents() ERRORS!

photoman posted 13th of May 2008 in Community Voice. 9 comments.
Hi.. I'm not familar with PHP and get this error on various pages:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.puffy/user/example.com/community/inc/classes/BxDolGroups.php on line 419



What do I Do to fix it???

Thanks,
Joel
 
Comments
·Oldest
·Top
Please login to post a comment.
AndreyP
In that line of that class we have:
$sRet = file_get_contents( "{$site['groups']}orca/?action=group_last_topics&forum={$sForumUri}&trans=1" );
so it try to get last topics of orca forum

possible you have any troubles with orca?
mscott
Joel,

I could be wrong and hopefully someone will correct me if I am but I think your host has "allow_url_fopen" turned off. It is one of the functions some hosts disable because they think it posses a security risk. Open www.yoursite/admin/phpinfo.php and search for the term "allow_url_fopen" and see if it is off. If it is off that is your problem. There are two solutions.. if your host allows it put this in a php.ini file in your root:

allow_url_fopen = On

If your host see more does NOT allow it then you might have to switch hosts :-(

thanks
Mike
bigdadgib
YEA!!!
This worked for me MSCOTT...

Thank you!!!
mscott
Sorry, it should be:

www.yoursite.com/admin/phpinfo.php
DolphinElite
Yes, you will most certainly need to have that enabled on your apache/php server. After that, you'll also need to make sure that the place you're getting the file from allows this as well.

A bigger question might be, exactly why do you need to get the file contents, and are you sure this is the most efficient method for what you're wanting to do?

-Citizen
-DolphinElite.com
SGreenslade
I'm getting a similar error when I try to access the first Group that I have created.
URL: <domain.name>/community/grp.php?action=group&ID=1

Message:
Warning: file_get_contents(<domain.name>/community/groups/orca/?action=group_last_topics&forum=Website&trans=1) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in /home/thejourn/public_html/community/inc/classes/BxDolGroups.php on line 419

I got the error message see more with 6.1.0 and also with 6.1.1

I've checked my phpinfo.php page and can see that allow_url_fopen is On.

Any other ideas?
photoman
To all:
1. allow_url_fopen is disabled by my host for security reasons.
2. Changing host is not an option.
To: DolphinElite
The error is caused by the Dolphin programming - it seem to be using a method that is not very portable to multiple hosts in a share enviorment. It happens when i click on a photo in a group. It's nothing that I changed so your question is not relavent. And it seem to me that if SGreenslade is getting it WITH allow_url_fopen=ON - then there's a bigger problem.

I'm see more told that cURL is a better method.

So MY bigger question is: How do I impliment the cURL and what pages do I need to modify for it to work. (using Dolphin 6.1
Anyone have a fix for this issue? I am having the same issue running v6.1.1 bundle. My fopen is set to on.
I found the fix. The problem is a permissions issue on group/orca. The permissions should be 755.
 
 
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.
PET:0.10464596748352