ID:               29860
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rjanson at msn dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Compile Failure
 Operating System: Redhat 9
 PHP Version:      5.0.1
 New Comment:

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config




Previous Comments:
------------------------------------------------------------------------

[2004-09-04 19:28:16] pbriggs at clinitech dot net

Same thing is happening to me using RedHat Enterprise 3.  Unless I can
get both mysql and mysqli to live with each other, I can't port my apps
over to mysqli.

------------------------------------------------------------------------

[2004-08-27 08:08:46] rjanson at msn dot com

Description:
------------
I cannot compile php 5.0.1 (nor 5.0.0) with mysql and mysqli
extensions. I can compile with either/or. At this point I need both. I
am using mysql 4.1.3

Configure runs with no issues.

Reproduce code:
---------------
My configure options: 
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com
--enable-inline-optimization --with-exec-dir=/usr/bin --with-layout=GNU
--enable-magic-quotes --with-pear=/usr/share/pear
--with-mysql=/usr/bin/mysql_config --with-mysqli=/usr/bin/mysqli_config
--enable-versioning --with-apxs2=/usr/sbin/apxs --enable-sockets
--with-zlib-dir=/usr/local --with-gd --with-ldap --without-sqlite

Expected result:
----------------
I expect PHP to compile with no errors, and to support both Mysql and
Mysqli extensions.

Actual result:
--------------
I get several lines similar to the following:

: multiple definition of `net_realloc'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x100): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x180): In function
`net_clear':
: multiple definition of `net_clear'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x180): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x1f0): In function
`net_flush':
: multiple definition of `net_flush'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x1f0): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x580): In function
`net_real_write':
: multiple definition of `net_real_write'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x580): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x240): In function
`my_net_write':
: multiple definition of `my_net_write'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x240): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x320): In function
`net_write_command':
: multiple definition of `net_write_command'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x320): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9c0): In function
`my_net_read':
: multiple definition of `my_net_read'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9c0): first defined
here
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29860&edit=1

Reply via email to