MyBB Community Forums

Full Version: mybb in php safe mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i am using mybb1.6 but i am getting this error every 2 hour.

so should i disable all tasks in mybb for present?/
Just find another host, your current one seems to have a lot of problems.
(2010-10-10, 09:37 AM)drankur Wrote: [ -> ]i am using mybb1.6 but i am getting this error every 2 hour.

so should i disable all tasks in mybb for present?/

If you disable the tasks, then expect the unexpected.

AFAIK, the base64_decode function is used in 2 places, the logo and task. If you absolutely can not move hosts or convince your host to enable the function, then the last alternative I see is for you to edit the task.php file to remove the base64_decode function and instead echo the gif img using readfile or another similar function.
Have you got any 1.4 plugins active?? You shouldn't have a URL like this:

user/users

it should be:

user-users
Quote:AFAIK, the base64_decode function is used in 2 places, the logo and task. If you absolutely can not move hosts or convince your host to enable the function, then the last alternative I see is for you to edit the task.php file to remove the base64_decode function and instead echo the gif img using readfile or another similar function.

this is the first time anybody has suggested a thing which i was looking for according to the situation i am facing.
can you tell what edits should i replace there as i don't know how to do that. i can only replace what you will tell to remove and put there. plz plz help me.

Quote:Have you got any 1.4 plugins active?? You shouldn't have a URL like this:

user/users

it should be:

user-users

i am using mybb1.6 and all plugins i downloaded from here, the list is:
Registration Checkboxes Plugin (1.2)
Date of Birth on Registration (0.2)
User Profile Image Birthday (1.1)
Login Password Conversion (1.0) (merged phpbb3 so it is there)
PostAd (1.2.1)

all these are 1.6 compatible i guess.

also i am able to use the friendly urls, so my urls looks like
http://xxxxxxxxx.com/forum/user-99.html

plz plz help me out...
also can you tell me what exactly this function in task.php does (as enabling some tasks also, getting error only on this line)

Your copy of MyBB running on ------- Forum (http://-----------.com/forum) has experienced an error. Details of the error include:
---
Type: 2
File: task.php (Line no. 59)
Message
base64_decode() has been disabled for security reasons
I have not tested this so use this at your own risk. It should however work theoretically.

Open task.php and Find this line:

echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");

Replace it with this:

// echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");
readfile('images/spacer.gif');

This will only take care of task.php you might still get errors wherever the mybb logo is displayed since that also uses that function. If the above works then I can tell you where to change for that.
thanks G33K,
i have replaced in the file and since 15 min, no error came ans task log showed that it has ran successfully. waiting for one more hour to see, if it is really working.

can you tell what exactly the above line function are doing... will it affect my forum performance or hamper security??

i can't express my deepest thanks to you for this help.
no single error since 2 hours ........ phewww.. i think it's working Toungue
please try to provide answer to my above queries... and also the logo file replacement
Glad it works but I still say you should try and talk your host because it just does not make any sense for them to disable that function. If tomorrow you use another application that makes extensive use of the function then you will be very screwed (eg I know that some shopping carts make extensive use of it)

Anyway, you should not see any performance hit or security issue with the above change.

Here is the fix for the logo part, only use this if you are actually getting errors when accessing pages with the mybb logo otherwise just leave it.

Open inc/mybb_group.php

Find:
echo base64_decode($mybb_logo);

Replace with:
// echo base64_decode($mybb_logo);
readfile('images/logo.gif');

my hots said that at present they have disabled it and testing some security issues... but not said when they enable it again.. but at present your fix is working.

secondly i am not getting error for logo and i am using my own logo.

this function has been used by phpbb3 and i got many errors.... it was the main reason i switched to mybb and i feel lucky that it happened Toungue


i cannot express my deepest thanks to you for your help.... really thanks a lot.. rep ++ adde.

just one questions, what does this function in task.php is actually doing, means why it there, what it is sending??
Pages: 1 2