MyBB Community Forums

Full Version: bbname and adminemail not getting set
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
During mail reply notifications I've just now tracked that in function set_common_headers file:class_mailhandler.php these two variables: $mybb->settings['bbname'] and $mybb->settings['adminemail'] are found to be empty causing the From: part in the email to be empty.

This is causing "Unknown Sender" problem in the reply notification mails.

Registration mails do not have this problem.

I've checked settings.php and all is ok (even php syntax).

What could be the reason of this?
Are they variables set in the ACP? If so, delete settings.php, as it will automatically be recreated, using the values from the ACP Smile
I've deleted it but it recreated the same settings.php. Where is this $mybb->settings['adminemai'] getting set in reply notifications?
I want to print the call stack leaving to set_common_headers in file:class_mailhandler.php :
set_common_headers
build_message
my_mail
send_mail_queue
call_user_func_array
run_shutdown
__destruct

I want to know where $mybb->settings array gets created.
It's in the database, in settings - the record with name = 'adminemail'.
In the table mybb_settings both adminemail and bbname are correctly set as are in settings.php( which I deleted it so that it gets created again).
Why'd these two variables empty when the control of execution reaches function set_common_headers file:class_mailhandler.php ?

I'd need to debug this. May be I need to look for pattern where bbname is getting assigned.
It works fine on every other forum, so there is the possibility it is just your host's setup Smile
My host is Hostgator. Another 2 Phpbb forums are also running fine.
I've not tinkered with the Mybb 1.6.3 installation.
My two Mybb forums : http://forum.indiaconsumercomplaints.org/ and http://forum.indianworkingwoman.org are quite simple.
I've only 2-3 mods installed one of which is google-seo.
I've even compared my current code with the original Mybb code to see the changes but I could not find any issues.

So I'm bit puzzled Huh
To rule out plugins as a cause of this issue, please try the following:

If you are using MyBB v1.6.4 and newer:

Go to AdminCP >> Configuration >> General configuration >> Disable all plugins >> YES


For all other versions older than MyBB v1.6.4:

In ./inc/init.php, find the code:

define("TIME_NOW", time());

After this code, add this:

define("NO_PLUGINS", 1);

Then save and/or reupload this edited version of the file so the forum will run the new code.



This will stop plugins being run when a page on the forum is loaded; it will not edit, delete or reset any content the plugin has added or changed, it will just temporarily stop the plugins being loaded, so some features on your forum may be temporarily missing or broken whilst this code is in place. When you remove this code, plugins will work again exactly as they were before. This change helps us to see if a plugin is the cause of a problem, without you having to manually deactivate every single plugin, which would mean you may lose data from them.

If your issue is fixed when this code is added, then the cause of your issue is a plugin; please post a list of your plugins and we will try and help you find which one it may be. If the problem still happens with this code added, then it is unlikely a plugin is the cause, in which case we will investigate the issue further.

Thank you.
(2011-10-19, 06:44 AM)- G33K - Wrote: [ -> ]For all other versions older than MyBB v1.6.4:

In ./inc/init.php, find the code:

define("TIME_NOW", time());

After this code, add this:

define("NO_PLUGINS", 1);

Indeed it is working after disabling plugins. Now I need to know which all plugins are installed.
Just go to Plugins in the ACP and see which ones can't be installed (IOW, which ones can be uninstalled or deactivated). Those are the ones installed.
Pages: 1 2