我在具有 PHP 5.2.10 和 MySQL 5.1.36-Community 的 Window Vista 上运行 Moodle 测试环境。当我从 Moodle 1.9.9 升级到 2.0 时,出现以下错误。
Error: database driver problem detected
The site administrator should verify server configuration
PHP has not been properly configured with the MySQLi extension so that it can communicate with MySQL. Please check your php.ini file or recompile PHP. MySQLi extension is not available for PHP 4.
我还尝试更改 config.ini 中的 dbtype='mysqli',但仍然看到同样的错误。
如果您能提供一些解决此错误的建议,我将不胜感激。
提前谢谢你。
最佳答案
我前段时间也遇到了这个错误,我花了很长时间才想出解决这个问题的方法。基本上您需要做的就是为您的 php 环境添加一个扩展。以下解决方案适用于运行 Apache 和 MySQL 的 Microsoft Windows Server 2003:
找出您的 php 文件夹在运行 moodle 的服务器上的位置。它通常位于 c:\php。
打开 php.ini。在该文件中,您会发现 ;extension=php_mysqli.dll。删除分号。
保存文件。
重新启动 Apache 并转到您的 Moodle 网站。
我们开始吧,从现在开始您应该会没事的;)希望这对您有所帮助!!
关于php - 数据库驱动程序 MySQLi 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13595579/