HomeUnityBlogs
 
 
photoman

help with file_get_contents() ERRORS!

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
bad
1
good
 
 

Comments

AndreyP
AndreyP 53 days agocomment permalink
 
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?
 
bad
0
good
 
 
mscott
mscott 53 days agocomment permalink
 
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 does NOT allow it then you might have to switch hosts :-(

thanks
Mike
 
bad
0
good
 
 
mscott
mscott 53 days agocomment permalink
 
Sorry, it should be:

www.yoursite.com/admin/phpinfo.php
 
bad
0
good
 
 
DolphinElite
DolphinElite 53 days agocomment permalink
 
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
 
bad
0
good
 
 
SGreenslade
SGreenslade 52 days agocomment permalink
 
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 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?
 
bad
0
good
 
 
photoman
photoman 52 days agocomment permalink
 
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 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
 
bad
1
good
 
 
lambda
lambda 25 days agocomment permalink
 
Anyone have a fix for this issue? I am having the same issue running v6.1.1 bundle. My fopen is set to on.
 
bad
0
good
 
 
lambda
lambda 24 days agocomment permalink
 
I found the fix. The problem is a permissions issue on group/orca. The permissions should be 755.
 
bad
0
good
 
 


Post a Comment

Please login to post a comment.

This Post
 
 
photoman Blog
All Blogs
Found a bug? Have a suggestion? We really value your feedback!
 
© 2008 BoonEx Ltd
ABN 27 127 966 581
 
PET:0.580856084824