Chinaunix首页 | 论坛 | 博客
  • 博客访问: 658228
  • 博文数量: 121
  • 博客积分: 1425
  • 博客等级: 中尉
  • 技术积分: 2059
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-03 15:34
文章分类

全部博文(121)

文章存档

2018年(1)

2017年(2)

2016年(1)

2015年(11)

2014年(14)

2013年(47)

2012年(45)

分类: 系统运维

2013-04-18 14:17:26

在安装nginx + mysql + php 的时候出现这样的错误:
/usr/local/src/php-5.2.15/ext/mysqli/mysqli.c:644: error: (Each undeclared identifier is reported only once
/usr/local/src/php-5.2.15/ext/mysqli/mysqli.c:644: error: for each function it appears in.)
/usr/local/src/php-5.2.15/ext/mysqli/mysqli.c:645: error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/usr/local/src/php-5.2.15/ext/mysqli/mysqli.c:646: error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)
make: *** [ext/mysqli/mysqli.lo] Error 1

这样真正的解决方法是:
修改/usr/local/include/mysql/mysql.h 文件内容:
mysql.h这个是根据个人安装的mysql路径来找  在mysql下面的include的mysql目录里  别搞错了)
找到
enum mysql_protocol_type
{
MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
};

在这个中间添加这些内容
++++++++++++++++++++++++++++++++++++++++++++
/*
There are three types of queries - the ones that have to go to
the master, the ones that go to a slave, and the adminstrative
type which must happen on the pivot connectioin
*/
enum mysql_rpl_type
{
MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
};

++++++++++++++++++++++++++++++++++++++++++++
typedef struct character_set
{
unsigned int number; /* character set number */
unsigned int state; /* character set state */
const char *csname; /* collation name */
const char *name; /* character set name */


把红色的区域加入此文件  保存以后重新编译php 

希望可以帮助到要帮助的人


阅读(4887) | 评论(0) | 转发(0) |
0

上一篇:备份目录的脚本

下一篇:svn 服务器的架设

给主人留下些什么吧!~~