如何在WAMPServer中启用或安装PHP的mysql_xdevapi扩展以安装数据表?
我想在laravel中安装DataTable,我使用了WAMPServer和我的
I wanted to install DataTable in laravel, I used WAMPServer and my
PHP version is 7.3.5,
Mysql version 5.7.26.
我在互联网上遵循许多步骤,例如从pecl.php.net下载,但是我的问题仍然存在.
I follow many steps on the internet, such as download from pecl.php.net but my problem remain.
写时
composer require yajra/laravel-datatables-oracle:^9.0
在CMD中,
,在显示以下错误后,将导致安装停止.错误:problem1
in CMD, after wile the below error showed and cause installation stop. Error: problem1
-您的系统缺少所请求的PHP扩展名ext-mysql_xdevapi *.安装或启用PHP的mysql_xdevapi扩展.
-The requested PHP extension ext-mysql_xdevapi * is missing from your system. Install or enable PHP's mysql_xdevapi extension.
php_mysql_devapi
扩展允许通过X DevAPI
访问MySQL文档存储.
php_mysql_devapi
extension provides access to the MySQL Document Store via the X DevAPI
.
X
DevAPI是由多个MySQL连接器提供的通用API,可通过具有CRUD样式的API轻松访问关系表以及以JSON表示的文档集合.
The X
DevAPI is a common API provided by multiple MySQL Connectors providing easy access to relational tables as well as collections of documents, which are represented in JSON, from a API with CRUD-style operations.
X DevAPI使用X协议,这是MySQL 8.0服务器的新一代客户端-服务器协议.
The X DevAPI uses the X Protocol, the new generation client-server protocol of the MySQL 8.0 server.
要安装此扩展,您需要在系统上安装mysql 8.
沼泽
在安装mysql 8之后,请按照以下步骤安装 php_mysql_xdevapi
.
After installing mysql 8 follow these steps to install php_mysql_xdevapi
.
Go to this link https://pecl.php.net/package/mysql_xdevapi to download the .dll for the php_mysql_xdevapi .
After downloading the extension paste in your php installation directory subfolder ext C:\wamp64\bin\php\php7.2.4\ext.
Now you have to add this extension in the php.ini file near the dynamic extensions. extension=php_mysql_xdevapi.dll
一个重要的警告是在Wamp默认的mysql 8安装中,XDevApi
One important caveat is that in wamp default mysql 8 installation , XDevApi
插件已禁用,您必须通过注释禁用mysql_xdevapi的部分来启用它.
plugin is disable, you have to enable it by commenting the part which is disabling mysql_xdevapi.
;Disabling X Plugin
;mysqlx=0
现在您已经成功在wamp上安装了php_mysql_xdevapi,以查看其工作原理,
Now you successfully have install the php_mysql_xdevapi on wamp, to see it working,
$session = mysql_xdevapi\getSession('mysqlx://<user>:<password>@host:33060?connect-timeout=5000&ssl-mode=disabled');