MyBB Community Forums

Full Version: problem upgrading PHP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys
i have the latest version of mybb. but there is a problem.
my php version is 5.6.
when i change it to newer version, my forum is blocked and a message appeared:

Quote:MyBB Internal Error
MyBB has experienced an internal error and cannot continue.

Error Type:
MyBB Error (44)
Error Message:
MyBB was unable to load the SQL extension. Please contact the MyBB Group for support. MyBB Website
If you're a visitor of this website, please wait a few minutes and try again. If this problem persists, please contact the site owner.

If you are the site owner, please check the MyBB Documentation for help resolving common issues, or get technical help on the MyBB Community Forums.

why? what should i do?
Your previous version was probably setted to wotk with mysql, you need mysqli.
Open inc/config.php, find the line $config['database']['type'] = 'mysql'; and replace with $config['database']['type'] = 'mysqli';

Also, check your new php has mysql extension loaded
thanks bro
when i changed mysql to mysqli in config.php file, and change the version of php in host control panel, i receive "Internal Server Error 500" and website is down! is it possible that host does not load mysql extention? i mean as you said.
does every one has my problem when they want to change the php version or it depends on host capabilities?!
Everyone would have this problem when upgrading from PHP 5.6 as the regular "mysql" extension was removed from PHP 7, which is why you got the error saying it couldn't load the extension. The "mysqli" one should always be available though, otherwise you wouldn't be able to install anything using MySQL at all (such as WordPress or pretty much anything). You'll need to check your server error log to see what is causing the 500 error.
If you use php-fpm, check your sock name in your httpd conf
i saw log errors and this is what happens: 

Quote:Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/scenario/domains/ on line 512

500 else
501 {
502 $db->write_query("UPDATE ".TABLE_PREFIX."users SET akismetstopped=akismetstopped+1 WHERE uid = '{$post['uid']}'");
503 $query = $db->simple_select("users", "akismetstopped, usergroup", "uid = '{$post['uid']}'");
504 $akismetstopped = $db->fetch_field($query, 'akismetstopped');
505 $usergroup = $db->fetch_field($query, 'usergroup');
507 if($mybb->settings['akismetuidsignore'])
508 {
509 $akismet_uids_ignore = explode(',', $mybb->settings['akismetuidsignore']);
510 if(in_array($usergroup, $akismet_uids_ignore))
511 {
512 continue;
513 }
514 }
516 if(is_super_admin($post['uid']))
517 {
518 continue;
519 }

i disabled akismet plugin and it has been ok and php version is on the last one and no problem apparently.

but what should i do with akismet as it maybe a good plugin for spamers!
thanks again
I don't think we support the Akismet plugin any more, it's not packaged with 1.8.