MyBB Community Forums

Full Version: Fopen to CURL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I have a question. It's relating to fopen and CURL.

What is fopen? My host said that they disabled fopen. It they do so, what feature I will miss? Is it important?

And what is CURL? My host said to mod my board and use curl instead. How can I do that?

Thanks.
fopen, and cURL are both functions that retrieve files from outside of your website within the script. They for example allow us to do version checking in the ACP. MyBB 1.4 will work fine without fopen.
So, can MyBB modded so it is using Curl instead of fopen? My host told me to do this,but I can't
can guide me for doing this? thank you.
(2008-09-23, 10:43 PM)ivantoar Wrote: [ -> ]So, can MyBB modded so it is using Curl instead of fopen? My host told me to do this,but I can't
can guide me for doing this? thank you.

(2008-09-23, 04:35 PM)Ryan Gordon Wrote: [ -> ]MyBB 1.4 will work fine without fopen.

I am however assuming they are talking about disabling the http part of the fopen function, not completely disable it. Completely disabling it would be stupid
So, my remote avatar and version checker will work without fopen? without modifying anything?
fopen is the PHP command to open files. There is a setting in php.ini which allows you to pass in URLs instead of file paths to open remote resources. Many hosts have disabled this particular setting.

curl is a C library to retrieve the contents of remote resources via URLs.

I'll have to check the code to be certain, but I believe MyBB 1.4 does not make use of fopen for auto-resizing remote avatars. Ryan says it doesn't, and I normally trust what he says - especially when it regards MyBB.
From memory, MyBB will try to use cURL, then sockets, and if both those fail, finally resorting to the file() function (basically like fopen).

Thus if you have cURL, you don't need to worry about fopen.