Error in Installing php5-mysqli

Hi,

I'm getting this error when trying to install on php5-mysqli.
Code:
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c: In function 'zm_startup_mysqli':
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637: error: 'MYSQL_RPL_MASTER' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637: error: (Each undeclared identifier is reported only once
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637: error: for each function it appears in.)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:638: error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:639: error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1


I'm using freebsd8. Any ideas?
 
Yes, here it is:

Code:
mysql-client-5.5.1  Multithreaded SQL database (client)
mysql-server-5.5.1  Multithreaded SQL database (server)
 
For some reason, I was able to fix this by downgrading my mysql-server/client to 5.1.

Thanks for the heads-up on the version.
 
Iv'e found this solution on a chinese forum

Code:
cd /usr/local/include/mysql
toor@com[/usr/local/include/mysql] vi mysql.h

... ...
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 */

it's working with mysql55-server and php5-mysqli
 
I also got this error after getting things to finally compile properly.

php -v
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/xsl.so' - /usr/local/lib/php/20060613/xsl.so: 
Undefined symbol "dom_node_class_entry" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/mysqli.so' - /usr/local/lib/php/20060613/mysqli.so: 
Undefined symbol "spl_ce_RuntimeException" in Unknown on line 0
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Feb  1 2010 18:57:43) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

So I moved rearranged some of the extensions in /usr/local/etc/php/extensions.ini. Specifically I moved the line extension=mysqli.so to appear after extension=spl.so. Then I move the line extension=xsl.so to the end of the file after all of the extensions that defined XML.

As you can see all seems well.

php -v
Code:
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Feb  1 2010 18:57:43) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Cheers,
Mikel King
 
Back
Top