MyBB Community Forums

Full Version: [F] Settings not accessible from run_shutdown()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Apparently with MyBB 1.4.1 and PHP 5.2.5 the settings are not available to the run_shutdown() function. This results in the daily-cleanup task filling the cache for most_viewed_threads and most_replied_threads with as many entries as available, no limit being set.

The error does not occur with PHP 5.2.6

To find this problem, I ran a test forum with enabled tracing. What worries me is that there are quite a few entries like this:
    0.0685    3082536     +416           -> errorHandler->error($type = 8, $message = 'Undefined index:  mybbuser', $file = 'E:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\MyBBTest\\inc\\class_core.php', $line = 265, array ('prefix_length' => 0, 'val' => '1_7WzDFSa98GD3Ra8BZSEx8GMhQnG5qZFQwo3xlCBabrmNhS4wwZ', 'key' => 'mybbuser')) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:0
    0.0686    3085080    +2544             -> error_reporting() E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:114
                                           >=> 6135
    0.0686    3085080       +0             -> in_array(8, array (0 => 8, 1 => 1024, 2 => 2048)) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:119
                                           >=> TRUE
                                         >=> NULL
    0.0688    3082960    -2120           -> errorHandler->error($type = 8, $message = 'Undefined index:  adminsid', $file = 'E:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\MyBBTest\\inc\\class_core.php', $line = 265, array ('prefix_length' => 0, 'val' => '5c399eabf925b44c3a355670234abda4', 'key' => 'adminsid')) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:0
    0.0688    3085352    +2392             -> error_reporting() E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:114
                                           >=> 6135
    0.0689    3085352       +0             -> in_array(8, array (0 => 8, 1 => 1024, 2 => 2048)) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:119
                                           >=> TRUE
                                         >=> NULL
    0.0690    3083232    -2120           -> errorHandler->error($type = 8, $message = 'Undefined index:  sid', $file = 'E:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\MyBBTest\\inc\\class_core.php', $line = 265, array ('prefix_length' => 0, 'val' => 'bb6848f1097294d99fe7baa9c6dc0393', 'key' => 'sid')) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:0
    0.0690    3085600    +2368             -> error_reporting() E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:114
                                           >=> 6135
    0.0691    3085600       +0             -> in_array(8, array (0 => 8, 1 => 1024, 2 => 2048)) E:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\MyBBTest\inc\class_error.php:119
                                           >=> TRUE
                                         >=> NULL

To my understanding that means that the array-indexes referenced aren't existing - could be a similar issue, the array being not properly initialized/loaded. And that stays with PHP 5.2.6. The function executed is run_shutdown() btw.

Cheers
Zakkinen
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.