My web host changed my web server last night and now I find through the ACP this error...
Fatal error: Cannot redeclare class databaseEngine in /home/******/public_html/forums/inc/db_mysqli.php on line 13
In the db_mysqli.php file there is...
9* $Id: db_mysql.php 1370 2006-04-16 13:47:01Z chris $
10 */
11
12 class databaseEngine
13 {
14 /**
15 * The title of this layer.
16 *
17 * @var string
What can I do to correct this?
Try reuploading your ./inc and ./admin directories from a fresh download of MyBB. DO NOT overwrite ./inc/settings.php and ./inc/config.php
Good point. Have you gone from a PHP5 server to a PHP4 one?
Oh cool, Ryan's problem fix did the trick, thanks very much guys.
Actually, this error has made my realise something. Does PHP not have multiple include protection on classes (assuming each class is in it's own file)? I've never seen it used so I guess not.
MrDoom Wrote:Actually, this error has made my realise something. Does PHP not have multiple include protection on classes (assuming each class is in it's own file)? I've never seen it used so I guess not.
No it does not. It's a programming error if you call two classes the same thing and include them.
Also this error relates to something completely different than what it should be throwing so I'm almost certain this error is a cause of a PHP bug
The likely problem, is that they haven't installed the mysqli PHP extension on the new server yet.
I had this issue as well.
You need to change the following in config.php:
$config['dbtype'] = 'mysqli';
To:
$config['dbtype'] = 'mysql';
That's just a simple workaround though. I suggest you contact your host and ask them to install the mysqli PHP extension, if the new server can support it.
MySQLi requires MySQL 4.1 or higher.