VPS服务器 - >致命错误:调用未定义的函数mysqli_init()

时间:2017-06-29 12:30:50

标签: php codeigniter mysqli centos vps

当我们在托管服务器中尝试此代码时,它完美无缺, 但是我们将代码移到 VPS服务器godaddy 它会给出错误

Fatal error:  Call to undefined function mysqli_init() in  
/public_html/system/database/drivers/mysqli/mysqli_driver.php on line 135
A PHP Error was encountered
Severity: Warning
Message:  Cannot modify header information - headers already sent by (output started at /public_html/system/database/drivers/mysqli/mysqli_driver.php:135)
Filename: core/Common.php
Line Number: 573 
 Backtrace: 

A PHP Error was encountered
Severity: Error
Message:  Call to undefined function mysqli_init()
Filename: mysqli/mysqli_driver.php
Line Number: 135
Backtrace:

1 个答案:

答案 0 :(得分:1)

您需要在VPS上进入WHM并安装mysqli扩展。您可以使用此处所述的EasyApache执行此操作...

https://www.godaddy.com/help/enabling-apache-or-php-modules-using-easyapache-6237