#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: francis at web-resources dot org Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I had the same problem, but I solve it with this options: ./configure \ --with-mysql=shared,/path/to/mysql_config \ --with-mysqli=shared,/path/to/mysql_config specifying shared tag, make and make install finish good. You must take care, you get 2 modules mysql.so and mysqli.so that you must include in your php.ini with extension=mysql.so and extension=mysqli.so Previous Comments: [2005-12-03 02:29:21] brian at cpanel dot net I've looked at this a while and maybe my comments can help. I was able to reproduce this problem most machines with mysql 4.1 and using only --with-mysql and --with-mysqli and --with-apxs. This particular machine is a normal centos machine. As mentioned earlier, -lmysqlclient is listed twice in EXTRA_LIBS in the Makefile. This normally doesnt make a difference. However, in this case, removing the 2nd -lmysqlclient causes it to build properly. This is the libtool command that fails: /bin/sh /home/cpapachebuild/buildapache/php-5.0.5/libtool --silent --preserve-dup-deps --mode=link gcc -g -O2 -prefer-non-pic -rpath /home/cpapachebuild/buildapache/php-5.0.5/libs -avoid-version -module -L/usr/lib/mysql -R /usr/lib/mysql ext/libxml/libxml.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/iconv/iconv.lo ext/mysql/php_mysql.lo ext/mysqli/mysqli.lo ext/mysqli/mysqli_api.lo ext/mysqli/mysqli_prop.lo ext/mysqli/mysqli_nonapi.lo ext/mysqli/mysqli_fe.lo ext/mysqli/mysqli_report.lo ext/mysqli/mysqli_repl.lo ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo ext/pcre/pcrelib/pcre_dfa_exec.lo ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_info.lo ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_ord2utf8.lo ext/pcre/pcrelib/pcre_printint.lo ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo ext/pcre/pcrelib/pcre_ucp_findchar.lo ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_sxe.lo ext/sqlite/sqlite.lo ext/sqlite/sess_sqlite.lo ext/sqlite/libsqlite/src/opcodes.lo ext/sqlite/libsqlite/src/parse.lo ext/sqlite/libsqlite/src/encode.lo ext/sqlite/libsqlite/src/auth.lo ext/sqlite/libsqlite/src/btree.lo ext/sqlite/libsqlite/src/build.lo ext/sqlite/libsqlite/src/delete.lo ext/sqlite/libsqlite/src/expr.lo ext/sqlite/libsqlite/src/func.lo ext/sqlite/libsqlite/src/hash.lo ext/sqlite/libsqlite/src/insert.lo ext/sqlite/libsqlite/src/main.lo ext/sqlite/libsqlite/src/os.lo ext/sqlite/libsqlite/src/pager.lo ext/sqlite/libsqlite/src/printf.lo ext/sqlite/libsqlite/src/random.lo ext/sqlite/libsqlite/src/select.lo ext/sqlite/libsqlite/src/table.lo ext/sqlite/libsqlite/src/tokenize.lo ext/sqlite/libsqlite/src/update.lo ext/sqlite/libsqlite/src/util.lo ext/sqlite/libsqlite/src/vdbe.lo ext/sqlite/libsqlite/src/attach.lo ext/sqlite/libsqlite/src/btree_rb.lo ext/sqlite/libsqlite/src/pragma.lo ext/sqlite/libsqlite/src/vacuum.lo ext/sqlite/libsqlite/src/copy.lo ext/sqlite/libsqlite/src/vdbeaux.lo ext/sqlite/libsqlite/src/date.lo ext/sqlite/libsqlite/src/where.lo ext/sqlite/libsqlite/src/trigger.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: brian at cpanel dot net Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I've looked at this a while and maybe my comments can help. I was able to reproduce this problem most machines with mysql 4.1 and using only --with-mysql and --with-mysqli and --with-apxs. This particular machine is a normal centos machine. As mentioned earlier, -lmysqlclient is listed twice in EXTRA_LIBS in the Makefile. This normally doesnt make a difference. However, in this case, removing the 2nd -lmysqlclient causes it to build properly. This is the libtool command that fails: /bin/sh /home/cpapachebuild/buildapache/php-5.0.5/libtool --silent --preserve-dup-deps --mode=link gcc -g -O2 -prefer-non-pic -rpath /home/cpapachebuild/buildapache/php-5.0.5/libs -avoid-version -module -L/usr/lib/mysql -R /usr/lib/mysql ext/libxml/libxml.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/iconv/iconv.lo ext/mysql/php_mysql.lo ext/mysqli/mysqli.lo ext/mysqli/mysqli_api.lo ext/mysqli/mysqli_prop.lo ext/mysqli/mysqli_nonapi.lo ext/mysqli/mysqli_fe.lo ext/mysqli/mysqli_report.lo ext/mysqli/mysqli_repl.lo ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo ext/pcre/pcrelib/pcre_dfa_exec.lo ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_info.lo ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_ord2utf8.lo ext/pcre/pcrelib/pcre_printint.lo ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo ext/pcre/pcrelib/pcre_ucp_findchar.lo ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/simplexml/simplexml.lo ext/spl/php_spl.lo ext/spl/spl_functions.lo ext/spl/spl_engine.lo ext/spl/spl_iterators.lo ext/spl/spl_array.lo ext/spl/spl_directory.lo ext/spl/spl_sxe.lo ext/sqlite/sqlite.lo ext/sqlite/sess_sqlite.lo ext/sqlite/libsqlite/src/opcodes.lo ext/sqlite/libsqlite/src/parse.lo ext/sqlite/libsqlite/src/encode.lo ext/sqlite/libsqlite/src/auth.lo ext/sqlite/libsqlite/src/btree.lo ext/sqlite/libsqlite/src/build.lo ext/sqlite/libsqlite/src/delete.lo ext/sqlite/libsqlite/src/expr.lo ext/sqlite/libsqlite/src/func.lo ext/sqlite/libsqlite/src/hash.lo ext/sqlite/libsqlite/src/insert.lo ext/sqlite/libsqlite/src/main.lo ext/sqlite/libsqlite/src/os.lo ext/sqlite/libsqlite/src/pager.lo ext/sqlite/libsqlite/src/printf.lo ext/sqlite/libsqlite/src/random.lo ext/sqlite/libsqlite/src/select.lo ext/sqlite/libsqlite/src/table.lo ext/sqlite/libsqlite/src/tokenize.lo ext/sqlite/libsqlite/src/update.lo ext/sqlite/libsqlite/src/util.lo ext/sqlite/libsqlite/src/vdbe.lo ext/sqlite/libsqlite/src/attach.lo ext/sqlite/libsqlite/src/btree_rb.lo ext/sqlite/libsqlite/src/pragma.lo ext/sqlite/libsqlite/src/vacuum.lo ext/sqlite/libsqlite/src/copy.lo ext/sqlite/libsqlite/src/vdbeaux.lo ext/sqlite/libsqlite/src/date.lo ext/sqlite/libsqlite/src/where.lo ext/sqlite/libsqlite/src/trigger.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: i-marcin at tlen dot pl Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I have the same problem with php-5.0.5 and MySQL 4.1 rpm`s downloaded from mysql.com. On another machine with the same OS and the same PHP version, but with MySQL 4.1 compiled from source, the problem does not exist. So I suggest to compile MySQL from source if any other solutions fail. Previous Comments: [2005-09-27 23:44:08] keith at green-light dot ca Same issue on Fedora Core 2, mysql 4.1.12, and php 5.0.4. Removed the duplicated -lmysqlclient and was able to compile. [2005-06-09 19:12:52] michael at mompopmedia dot com For what it is worth, I can confirm the same issue building php5.0.4 on RHE 3. MySQL packages as follows: MySQL-client-4.1.11-0 MySQL-shared-compat-4.1.11-0 MySQL-embedded-4.1.11-0 MySQL-bench-4.1.11-0 MySQL-shared-4.1.11-0 perl-DBD-MySQL-2.1021-3 MySQL-devel-4.1.11-0 MySQL-server-4.1.11-0 I'm also running Apache/1.3.33 chris at leftbrained dot org suggestion did the trick. [2005-05-09 18:48:49] jorge dot tiao dot pereira at gmail dot com so do i. i don´t connect mysql database to the pega in php. how do it? [2005-02-19 19:32:23] chris at leftbrained dot org I know this hasn't been looked at in some time, but I've spent that last few days working out this exact problem. Apache 2.0.53 - Built by me into /usr/local/apache MySQL 4.1.9 - Used the RPM download of of mysql.com MySQL-client-4.1.9-0 MySQL-shared-compat-4.1.9-0 MySQL-server-4.1.9-0 MySQL-bench-4.1.9-0 MySQL-devel-4.1.9-0 PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config I'm on some form of RedHat Enterprise, I'm not quite sure how I would check which one. I was coming up witht he same exact errors, and the *only* way I was able to make it work was this: cd /usr/lib/mysql rename .a .a_old *.a rename .la .la_old *.la Then run configure/make/make install Then rename these files back. cd /usr/lib/mysql rename .a_old .a *.a_old rename .la_old .la *.la_old I'm not sure what precisely these files are, and this was a last resort attempt for me, but it worked. Chris [2004-10-28 21:49:01] kpederson at mail dot ewu dot edu I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: keith at green-light dot ca Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: Same issue on Fedora Core 2, mysql 4.1.12, and php 5.0.4. Removed the duplicated -lmysqlclient and was able to compile. Previous Comments: [2005-06-09 19:12:52] michael at mompopmedia dot com For what it is worth, I can confirm the same issue building php5.0.4 on RHE 3. MySQL packages as follows: MySQL-client-4.1.11-0 MySQL-shared-compat-4.1.11-0 MySQL-embedded-4.1.11-0 MySQL-bench-4.1.11-0 MySQL-shared-4.1.11-0 perl-DBD-MySQL-2.1021-3 MySQL-devel-4.1.11-0 MySQL-server-4.1.11-0 I'm also running Apache/1.3.33 chris at leftbrained dot org suggestion did the trick. [2005-05-09 18:48:49] jorge dot tiao dot pereira at gmail dot com so do i. i don´t connect mysql database to the pega in php. how do it? [2005-02-19 19:32:23] chris at leftbrained dot org I know this hasn't been looked at in some time, but I've spent that last few days working out this exact problem. Apache 2.0.53 - Built by me into /usr/local/apache MySQL 4.1.9 - Used the RPM download of of mysql.com MySQL-client-4.1.9-0 MySQL-shared-compat-4.1.9-0 MySQL-server-4.1.9-0 MySQL-bench-4.1.9-0 MySQL-devel-4.1.9-0 PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config I'm on some form of RedHat Enterprise, I'm not quite sure how I would check which one. I was coming up witht he same exact errors, and the *only* way I was able to make it work was this: cd /usr/lib/mysql rename .a .a_old *.a rename .la .la_old *.la Then run configure/make/make install Then rename these files back. cd /usr/lib/mysql rename .a_old .a *.a_old rename .la_old .la *.la_old I'm not sure what precisely these files are, and this was a last resort attempt for me, but it worked. Chris [2004-10-28 21:49:01] kpederson at mail dot ewu dot edu I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). [2004-10-14 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: michael at mompopmedia dot com Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: For what it is worth, I can confirm the same issue building php5.0.4 on RHE 3. MySQL packages as follows: MySQL-client-4.1.11-0 MySQL-shared-compat-4.1.11-0 MySQL-embedded-4.1.11-0 MySQL-bench-4.1.11-0 MySQL-shared-4.1.11-0 perl-DBD-MySQL-2.1021-3 MySQL-devel-4.1.11-0 MySQL-server-4.1.11-0 I'm also running Apache/1.3.33 chris at leftbrained dot org suggestion did the trick. Previous Comments: [2005-05-09 18:48:49] jorge dot tiao dot pereira at gmail dot com so do i. i don´t connect mysql database to the pega in php. how do it? [2005-02-19 19:32:23] chris at leftbrained dot org I know this hasn't been looked at in some time, but I've spent that last few days working out this exact problem. Apache 2.0.53 - Built by me into /usr/local/apache MySQL 4.1.9 - Used the RPM download of of mysql.com MySQL-client-4.1.9-0 MySQL-shared-compat-4.1.9-0 MySQL-server-4.1.9-0 MySQL-bench-4.1.9-0 MySQL-devel-4.1.9-0 PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config I'm on some form of RedHat Enterprise, I'm not quite sure how I would check which one. I was coming up witht he same exact errors, and the *only* way I was able to make it work was this: cd /usr/lib/mysql rename .a .a_old *.a rename .la .la_old *.la Then run configure/make/make install Then rename these files back. cd /usr/lib/mysql rename .a_old .a *.a_old rename .la_old .la *.la_old I'm not sure what precisely these files are, and this was a last resort attempt for me, but it worked. Chris [2004-10-28 21:49:01] kpederson at mail dot ewu dot edu I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). [2004-10-14 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 12:52:08] stormchaser1 at gmail dot com forgot to mention it's the MySQL 5.0.1-alpha installed from rpms from mysql.com The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: jorge dot tiao dot pereira at gmail dot com Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: so do i. i don´t connect mysql database to the pega in php. how do it? Previous Comments: [2005-02-19 19:32:23] chris at leftbrained dot org I know this hasn't been looked at in some time, but I've spent that last few days working out this exact problem. Apache 2.0.53 - Built by me into /usr/local/apache MySQL 4.1.9 - Used the RPM download of of mysql.com MySQL-client-4.1.9-0 MySQL-shared-compat-4.1.9-0 MySQL-server-4.1.9-0 MySQL-bench-4.1.9-0 MySQL-devel-4.1.9-0 PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config I'm on some form of RedHat Enterprise, I'm not quite sure how I would check which one. I was coming up witht he same exact errors, and the *only* way I was able to make it work was this: cd /usr/lib/mysql rename .a .a_old *.a rename .la .la_old *.la Then run configure/make/make install Then rename these files back. cd /usr/lib/mysql rename .a_old .a *.a_old rename .la_old .la *.la_old I'm not sure what precisely these files are, and this was a last resort attempt for me, but it worked. Chris [2004-10-28 21:49:01] kpederson at mail dot ewu dot edu I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). [2004-10-14 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 12:52:08] stormchaser1 at gmail dot com forgot to mention it's the MySQL 5.0.1-alpha installed from rpms from mysql.com [2004-10-07 12:48:24] stormchaser1 at gmail dot com Saame problem... cvs HEAD (php 5.1) from yesterday... The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: chris at leftbrained dot org Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I know this hasn't been looked at in some time, but I've spent that last few days working out this exact problem. Apache 2.0.53 - Built by me into /usr/local/apache MySQL 4.1.9 - Used the RPM download of of mysql.com MySQL-client-4.1.9-0 MySQL-shared-compat-4.1.9-0 MySQL-server-4.1.9-0 MySQL-bench-4.1.9-0 MySQL-devel-4.1.9-0 PHP 5.0.3 - ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config I'm on some form of RedHat Enterprise, I'm not quite sure how I would check which one. I was coming up witht he same exact errors, and the *only* way I was able to make it work was this: cd /usr/lib/mysql rename .a .a_old *.a rename .la .la_old *.la Then run configure/make/make install Then rename these files back. cd /usr/lib/mysql rename .a_old .a *.a_old rename .la_old .la *.la_old I'm not sure what precisely these files are, and this was a last resort attempt for me, but it worked. Chris Previous Comments: [2004-10-28 21:49:01] kpederson at mail dot ewu dot edu I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). [2004-10-14 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 12:52:08] stormchaser1 at gmail dot com forgot to mention it's the MySQL 5.0.1-alpha installed from rpms from mysql.com [2004-10-07 12:48:24] stormchaser1 at gmail dot com Saame problem... cvs HEAD (php 5.1) from yesterday... [2004-10-06 13:28:40] php at kilimajer dot net The errror occurs with these rpms installed: MySQL-server-4.1.5-0 MySQL-client-4.1.5-0 MySQL-bench-4.1.5-0 MySQL-shared-4.1.5-0 MySQL-embedded-4.1.5-0 MySQL-devel-4.1.5-0 They are downloaded from mysql.com The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: kpederson at mail dot ewu dot edu Reported By: rjanson at msn dot com Status: No Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I can confirm a few things. I have both the static and the shared libraries installed as they both come in the standard mysql-devel rpm: /usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.14 /usr/lib/mysql /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient_r.la /usr/lib/mysql/libmysqld.a /usr/lib/mysql/libmysqlclient_r.a /usr/lib/mysql/mysqld.sym /usr/lib/mysql/libmysqlclient.la /usr/lib/libmysqlclient.so.14.0.0 /usr/lib/libmysqlclient_r.so /usr/lib/libmysqlclient_r.so.14 /usr/lib/libmysqlclient_r.so.14.0.0 If the static libraries are found, then the make dies with linking problems. I temporarily did a 'rename .a .a_old *.a' and 'rename .la .la_old *.la' in my /usr/lib/mysql directory, and then was able to make everything successfully. The output of ./configure ... | grep -i mysql gives: checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... /var/run/mysql/mysql.sock checking for MySQL UNIX socket location... /var/run/mysql/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no checking for mysql_set_server_option in -lmysqlclient... (cached) yes checking for mysql_stmt_field_count in -lmysqlclient... (cached) yes BTW, I'm running Redhat Enterprise AS using PHP-5.0.2 and MySQL-4.1.7 (stable). Previous Comments: [2004-10-14 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 12:52:08] stormchaser1 at gmail dot com forgot to mention it's the MySQL 5.0.1-alpha installed from rpms from mysql.com [2004-10-07 12:48:24] stormchaser1 at gmail dot com Saame problem... cvs HEAD (php 5.1) from yesterday... [2004-10-06 13:28:40] php at kilimajer dot net The errror occurs with these rpms installed: MySQL-server-4.1.5-0 MySQL-client-4.1.5-0 MySQL-bench-4.1.5-0 MySQL-shared-4.1.5-0 MySQL-embedded-4.1.5-0 MySQL-devel-4.1.5-0 They are downloaded from mysql.com [2004-10-06 08:52:32] [EMAIL PROTECTED] That doesn't make sense unless you only have a static version of the libmysqlclient... in which case I still think that the linker handles that correctly. Can you please try to use a shared library version of libmysqlclient though? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: stormchaser1 at gmail dot com Reported By: rjanson at msn dot com Status: Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: Saame problem... cvs HEAD (php 5.1) from yesterday... Previous Comments: [2004-10-06 13:28:40] php at kilimajer dot net The errror occurs with these rpms installed: MySQL-server-4.1.5-0 MySQL-client-4.1.5-0 MySQL-bench-4.1.5-0 MySQL-shared-4.1.5-0 MySQL-embedded-4.1.5-0 MySQL-devel-4.1.5-0 They are downloaded from mysql.com [2004-10-06 08:52:32] [EMAIL PROTECTED] That doesn't make sense unless you only have a static version of the libmysqlclient... in which case I still think that the linker handles that correctly. Can you please try to use a shared library version of libmysqlclient though? [2004-10-05 23:33:44] rjanson at msn dot com OK, finally an answer! I checked Makefile and found the following line: EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 - lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt By removing one of the -lmysqlclient entries on this line I was able to successfully make and make install with both mysql and mysqli. As confirmed by phpInfo(). I'm not sure why the other libs have multiple entries and don't cause make to crash. [2004-10-05 22:52:00] php at kilimajer dot net Workaround is to execute the last failing command with one -lmysqlclient removed, then again make. This should be fixed in ext/mysqli/config.m4. [2004-10-05 13:50:38] php at kilimajer dot net This is caused by -lmysqlclient being supplied twice to the linker (at least it was my case). The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: stormchaser1 at gmail dot com Reported By: rjanson at msn dot com Status: Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: forgot to mention it's the MySQL 5.0.1-alpha installed from rpms from mysql.com Previous Comments: [2004-10-07 12:48:24] stormchaser1 at gmail dot com Saame problem... cvs HEAD (php 5.1) from yesterday... [2004-10-06 13:28:40] php at kilimajer dot net The errror occurs with these rpms installed: MySQL-server-4.1.5-0 MySQL-client-4.1.5-0 MySQL-bench-4.1.5-0 MySQL-shared-4.1.5-0 MySQL-embedded-4.1.5-0 MySQL-devel-4.1.5-0 They are downloaded from mysql.com [2004-10-06 08:52:32] [EMAIL PROTECTED] That doesn't make sense unless you only have a static version of the libmysqlclient... in which case I still think that the linker handles that correctly. Can you please try to use a shared library version of libmysqlclient though? [2004-10-05 23:33:44] rjanson at msn dot com OK, finally an answer! I checked Makefile and found the following line: EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 - lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt By removing one of the -lmysqlclient entries on this line I was able to successfully make and make install with both mysql and mysqli. As confirmed by phpInfo(). I'm not sure why the other libs have multiple entries and don't cause make to crash. [2004-10-05 22:52:00] php at kilimajer dot net Workaround is to execute the last failing command with one -lmysqlclient removed, then again make. This should be fixed in ext/mysqli/config.m4. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: php at kilimajer dot net Reported By: rjanson at msn dot com Status: Feedback Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: The errror occurs with these rpms installed: MySQL-server-4.1.5-0 MySQL-client-4.1.5-0 MySQL-bench-4.1.5-0 MySQL-shared-4.1.5-0 MySQL-embedded-4.1.5-0 MySQL-devel-4.1.5-0 They are downloaded from mysql.com Previous Comments: [2004-10-06 08:52:32] [EMAIL PROTECTED] That doesn't make sense unless you only have a static version of the libmysqlclient... in which case I still think that the linker handles that correctly. Can you please try to use a shared library version of libmysqlclient though? [2004-10-05 23:33:44] rjanson at msn dot com OK, finally an answer! I checked Makefile and found the following line: EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 - lz -lm -lxml2 -lz -lm -lmysqlclient -lcrypt -lnsl -lm -lz -lnss_files -lnss_dns -lresolv -lnss_files -lnss_dns -lresolv -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt By removing one of the -lmysqlclient entries on this line I was able to successfully make and make install with both mysql and mysqli. As confirmed by phpInfo(). I'm not sure why the other libs have multiple entries and don't cause make to crash. [2004-10-05 22:52:00] php at kilimajer dot net Workaround is to execute the last failing command with one -lmysqlclient removed, then again make. This should be fixed in ext/mysqli/config.m4. [2004-10-05 13:50:38] php at kilimajer dot net This is caused by -lmysqlclient being supplied twice to the linker (at least it was my case). [2004-09-24 19:59:01] rjanson at msn dot com I've tried the same steps with php-5.02 and still the same results. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: php at kilimajer dot net Reported By: rjanson at msn dot com Status: Open Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: This is caused by -lmysqlclient being supplied twice to the linker (at least it was my case). Previous Comments: [2004-09-24 19:59:01] rjanson at msn dot com I've tried the same steps with php-5.02 and still the same results. [2004-09-21 01:12:32] rjanson at msn dot com I tried backing up and completely uninstalling, then reinstalling Mysql-4.1.4-0 from RPM, and still get the same result. Others out there are having this issue as well. Is there nothing to be done? --Rich [2004-09-13 20:44:01] rjanson at msn dot com I installed mysql via the RPMs provided on the MySQL site. I unsinstalled the MySQL-shared-compat-4.1.4-0 rpm and tried building agin with the same result. These are the RPMs I have installed currently: MySQL-devel-4.1.4-0 MySQL-client-4.1.4-0 MySQL-Max-4.1.4-0 MySQL-bench-4.1.3-1 MySQL-server-4.1.4-0 MySQL-shared-4.1.4-0 Is it possible something with the RPMs is causing the failure? [2004-09-13 19:38:30] nathansquires at pacbell dot net I had the same linking problem with php 5.0.1 and mysql 4.1.4a-gamma. I was able to compile with mysql and mysqli by rebuilding mysql with shared libraries (i.e. don't use --without-shared or --*flags=--all-static). If you only have static mysql libraries, trying to build php with mysql and mysqli will cause this error. [2004-09-08 08:18:54] rjanson at msn dot com I should have mentioned before that I have tried the configuration you suggest as well. In between each failed 'make' I have done a 'make clean' to be sure I am not using any leftover configuration options. No matter what path I use for mysql and mysqli, if the configuration passes, the make fails. I've seen this issue mentioned in various places, but never a resolution. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: php at kilimajer dot net Reported By: rjanson at msn dot com Status: Open Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: Workaround is to execute the last failing command with one -lmysqlclient removed, then again make. This should be fixed in ext/mysqli/config.m4. Previous Comments: [2004-10-05 13:50:38] php at kilimajer dot net This is caused by -lmysqlclient being supplied twice to the linker (at least it was my case). [2004-09-24 19:59:01] rjanson at msn dot com I've tried the same steps with php-5.02 and still the same results. [2004-09-21 01:12:32] rjanson at msn dot com I tried backing up and completely uninstalling, then reinstalling Mysql-4.1.4-0 from RPM, and still get the same result. Others out there are having this issue as well. Is there nothing to be done? --Rich [2004-09-13 20:44:01] rjanson at msn dot com I installed mysql via the RPMs provided on the MySQL site. I unsinstalled the MySQL-shared-compat-4.1.4-0 rpm and tried building agin with the same result. These are the RPMs I have installed currently: MySQL-devel-4.1.4-0 MySQL-client-4.1.4-0 MySQL-Max-4.1.4-0 MySQL-bench-4.1.3-1 MySQL-server-4.1.4-0 MySQL-shared-4.1.4-0 Is it possible something with the RPMs is causing the failure? [2004-09-13 19:38:30] nathansquires at pacbell dot net I had the same linking problem with php 5.0.1 and mysql 4.1.4a-gamma. I was able to compile with mysql and mysqli by rebuilding mysql with shared libraries (i.e. don't use --without-shared or --*flags=--all-static). If you only have static mysql libraries, trying to build php with mysql and mysqli will cause this error. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/29860 -- Edit this bug report at http://bugs.php.net/?id=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: nathansquires at pacbell dot net Reported By: rjanson at msn dot com Status: Open Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: I had the same linking problem with php 5.0.1 and mysql 4.1.4a-gamma. I was able to compile with mysql and mysqli by rebuilding mysql with shared libraries (i.e. don't use --without-shared or --*flags=--all-static). If you only have static mysql libraries, trying to build php with mysql and mysqli will cause this error. Previous Comments: [2004-09-08 08:18:54] rjanson at msn dot com I should have mentioned before that I have tried the configuration you suggest as well. In between each failed 'make' I have done a 'make clean' to be sure I am not using any leftover configuration options. No matter what path I use for mysql and mysqli, if the configuration passes, the make fails. I've seen this issue mentioned in various places, but never a resolution. [2004-09-07 07:52:34] [EMAIL PROTECTED] 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 [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=29860edit=1
#29860 [Com]: Cannot compile with mysql and mysqli extensions
ID: 29860 Comment by: pbriggs at clinitech dot net Reported By: rjanson at msn dot com Status: Open Bug Type: Compile Failure Operating System: Redhat 9 PHP Version: 5.0.1 New Comment: 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. Previous Comments: [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=29860edit=1