【发布时间】:2012-08-23 14:50:48
【问题描述】:
通过查看 Internet 上的建议,我尝试将所有查询转换为 mysqli。
但是 mysqli 在我的 XAMPP 中不起作用。我检查了我的 PHP 文件夹,有一个 php_mysqli.dll 文件...仍然无法正常工作
【问题讨论】:
通过查看 Internet 上的建议,我尝试将所有查询转换为 mysqli。
但是 mysqli 在我的 XAMPP 中不起作用。我检查了我的 PHP 文件夹,有一个 php_mysqli.dll 文件...仍然无法正常工作
【问题讨论】:
你有没有把它声明给 php.ini 来加载它?如果没有,请尝试在 php.ini 中找到它并添加 php_mysqli.dll
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; ... or with a path:
;
; extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
extension= php_mysqli.dll
【讨论】:
extension=php_mysqli.dll 我已经在我的情况下尝试了你的建议:extension_dir = "C:\xampp\php\ext" 我已经重新启动了 Apache 服务,但仍然没有运气!我已经验证这是PHPMyAdmin 使用的这个php.ini 文件,但我仍然收到"You are using PHP's deprecated 'mysql' extension, which is not capable of handling multi queries. <b>The execution of some stored routines may fail!</b> Please use the improved 'mysqli' extension to avoid any problems."任何其他建议??
进入目录phpMyAdmin,发现有一个名为config.inc.php的文件,打开文件,找到一行:$cfg['Servers'][$i]['extension'] = 'mysql';
只需将mysql 更改为mysqli。
【讨论】:
另一个可能会阻止 msqli dll 加载的原因可能是本地网络服务器上的用户权限问题,请确保 \User 可以读取 ext 文件夹,这对我有用
【讨论】:
我认为您应该使用 XAMPP 1.8.3-1、XAMPP 1.8.2-2、XAMPP 1.8.1。 因为这些xampp版本也默认支持Mysqli。
【讨论】: