安装weiphp遇到不支持prepared语句的问题

安装weiphp过程中报错,遇到如下问题:

SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet
错误位置

FILE: /var/www/weiphp.abc.com/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 210

TRACE

#0 /var/www/weiphp.abc.com/ThinkPHP/Library/Think/Db/Driver.class.php(210): PDOStatement->execute()
#1 /var/www/weiphp.abc.com/Application/Install/Common/function.php(195): Think\Db\Driver->execute(‘– ————…’)
#2 /var/www/weiphp.abc.com/Application/Install/Controller/InstallController.class.php(117): create_tables(Object(Think\Db\Driver\Mysql), ‘wp_’)
#3 [internal function]: Install\Controller\InstallController->step3()
#4 /var/www/weiphp.abc.com/ThinkPHP/Library/Think/App.class.php(233): ReflectionMethod->invoke(Object(Install\Controller\InstallController))
#5 /var/www/weiphp.abc.com/ThinkPHP/Library/Think/App.class.php(277): Think\App::exec()
#6 /var/www/weiphp.abc.com/ThinkPHP/Library/Think/Think.class.php(120): Think\App::run()
#7 /var/www/weiphp.abc.com/ThinkPHP/ThinkPHP.php(101): Think\Think::start()
#8 /var/www/weiphp.abc.com/install.php(39): require(‘/ var/www/weiphp…’)
#9 {main}

知道笼统来说是数据库环境问题,执行脚本的时候报错,但具体是什么问题,以及怎么修改则不甚了了。

网上搜看有人说要设数据库参数 ATTR_EMULATE_PREPARES 为 true,试过在InstallerController.php中设置此参数没解决问题。在Thinkphp框架里面的 Library/Think/Db/Driver/Driver.class.php设置此参数,也没解决问题。

最后暂时绕开了, 手工执行了install.sql脚本, 注释掉了出错的代码,再运行安装程序,成功。