使用MariaDB 10.3.9编译PHP-7.1.20时出错

我正在尝试在ubuntu 16.04服务器上编译php-7.1.20。</ p>

< 我还在 / opt / mariadb </ code>编译了Mariadb 10.3.9。 </ p>

我正在尝试使用选项 - with-mysqli = / opt / mariadb / bin / mysql_config </ code>编译php。 </ p>

我已应用此补丁</ p>

https://bugs.php.net/patch-display.php?bug_id=75612&amp;patch=mysql-mariadb-10.3 .patch&amp; revision = latest </ p>

应用补丁后,我收到此错误:</ p>


错误:' zend_mysqli_globals {aka struct _zend_mysqli_globals}'没有名为'reconnect'的成员</ p>
</ blockquote>
</ div>

展开原文

原文

I am trying to compile php-7.1.20 on ubuntu 16.04 server.

I have also compiled Mariadb 10.3.9 at /opt/mariadb.

I am trying to compile php with the option --with-mysqli=/opt/mariadb/bin/mysql_config.

I have applied this patch

https://bugs.php.net/patch-display.php?bug_id=75612&patch=mysql-mariadb-10.3.patch&revision=latest

After applying the patch I am getting this error:

error: ‘zend_mysqli_globals {aka struct _zend_mysqli_globals}’ has no member named ‘reconnect’

doujiabing1228
doujiabing1228 感谢@Nic3500的评论,但我相信该线程适用于python-mariadb。我正在寻找php-mariadb的解决方案
大约 2 年之前 回复
doujiaci7976
doujiaci7976 这个github.com/PyMySQL/mysqlclient-python/issues/176可能有所帮助(除非你已经阅读过它)。
大约 2 年之前 回复

1个回答



这需要在PHP中修复:</ p>

虽然MySQL和MariaDB文档都明确指出 MYSQL </ code>结构应该被认为是不透明的,PHP访问 MYSQL </ code>结构的内部成员 reconnect </ code>,而不是使用 mysql_options(mysql, MYSQL_OPT_RECONNECT,&amp; value)</ code>。</ p>

Mea culpa:很可能是我在15年前编写了该代码,因为选项 MYSQL_OPT_RECONNECT </ code> didn' 存在。 也是我,当我从头开始编写MariaDB Connector / C时,它将重新连接选项添加到mysql-&gt; options.reconnect。</ p>
</ div>

展开原文

原文

This needs to be fixed in PHP:

While both MySQL and MariaDB documentation clearly states that the MYSQL structure should be considered as opaque, PHP accesses internal member reconnect of the MYSQL structure, instead of using mysql_options(mysql, MYSQL_OPT_RECONNECT, &value).

Mea culpa: It was likely me which wrote that code 15 years ago, since the option MYSQL_OPT_RECONNECT didn't exist. It was also me, which added the reconnect option to mysql->options.reconnect when I wrote MariaDB Connector/C from scratch.

dougang2749
dougang2749 很高兴你的评论
大约 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐