Re: [PHP] MySQL and MySQLi compiling
Thanks for all the help, I managed to get it working, though I'm not quite sure the reasoning behind it. I used some info I got off of http://bugs.php.net/bug.php?id=29860 to do it. I posted my particular resolution to the bug report. It seems to me that *something* isn't right Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Richard Lynch wrote: Here's the deal: "configure" needs to find *BOTH* 'mysql.h' files and 'mysql.so'/'mysql.lib' files *UNDER* the directory you feed it. Figure out where your mysql.h files are. Figure out where your mysql.lib/mysql.so files are. . Thanks for the response, in fact I can't find any mysql.lib files, and the only mysql.so I found is under perl directory. I had tried /usr as the argument to --with-mysql , but it made no obvious change. I'm including some file paths that seem like the could be important below. Thanks, Chris [The only mysql.so that locate could find] /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql.so [EMAIL PROTECTED] php]# rpm -q --filesbypkg MySQL-devel MySQL-devel /usr/bin/comp_err MySQL-devel /usr/bin/mysql_config MySQL-devel /usr/include/mysql MySQL-devel /usr/include/mysql/chardefs.h MySQL-devel /usr/include/mysql/errmsg.h MySQL-devel /usr/include/mysql/history.h MySQL-devel /usr/include/mysql/keycache.h MySQL-devel /usr/include/mysql/keymaps.h MySQL-devel /usr/include/mysql/m_ctype.h MySQL-devel /usr/include/mysql/m_string.h MySQL-devel /usr/include/mysql/my_alloc.h MySQL-devel /usr/include/mysql/my_config.h MySQL-devel /usr/include/mysql/my_dbug.h MySQL-devel /usr/include/mysql/my_dir.h MySQL-devel /usr/include/mysql/my_getopt.h MySQL-devel /usr/include/mysql/my_global.h MySQL-devel /usr/include/mysql/my_list.h MySQL-devel /usr/include/mysql/my_net.h MySQL-devel /usr/include/mysql/my_no_pthread.h MySQL-devel /usr/include/mysql/my_pthread.h MySQL-devel /usr/include/mysql/my_semaphore.h MySQL-devel /usr/include/mysql/my_sys.h MySQL-devel /usr/include/mysql/my_xml.h MySQL-devel /usr/include/mysql/mysql.h MySQL-devel /usr/include/mysql/mysql_com.h MySQL-devel /usr/include/mysql/mysql_embed.h MySQL-devel /usr/include/mysql/mysql_time.h MySQL-devel /usr/include/mysql/mysql_version.h MySQL-devel /usr/include/mysql/mysqld_error.h MySQL-devel /usr/include/mysql/raid.h MySQL-devel /usr/include/mysql/readline.h MySQL-devel /usr/include/mysql/rlmbutil.h MySQL-devel /usr/include/mysql/rlprivate.h MySQL-devel /usr/include/mysql/rlshell.h MySQL-devel /usr/include/mysql/rltypedefs.h MySQL-devel /usr/include/mysql/sql_common.h MySQL-devel /usr/include/mysql/sql_state.h MySQL-devel /usr/include/mysql/sslopt-case.h MySQL-devel /usr/include/mysql/sslopt-longopts.h MySQL-devel /usr/include/mysql/sslopt-vars.h MySQL-devel /usr/include/mysql/tilde.h MySQL-devel /usr/include/mysql/typelib.h MySQL-devel /usr/include/mysql/xmalloc.h MySQL-devel /usr/lib/mysql MySQL-devel /usr/lib/mysql/libdbug.a MySQL-devel /usr/lib/mysql/libheap.a MySQL-devel /usr/lib/mysql/libmerge.a MySQL-devel /usr/lib/mysql/libmygcc.a MySQL-devel /usr/lib/mysql/libmyisam.a MySQL-devel /usr/lib/mysql/libmyisammrg.a MySQL-devel /usr/lib/mysql/libmysqlclient.a MySQL-devel /usr/lib/mysql/libmysqlclient.la MySQL-devel /usr/lib/mysql/libmysqlclient_r.a MySQL-devel /usr/lib/mysql/libmysqlclient_r.la MySQL-devel /usr/lib/mysql/libmystrings.a MySQL-devel /usr/lib/mysql/libmysys.a MySQL-devel /usr/lib/mysql/libnisam.a MySQL-devel /usr/lib/mysql/libvio.a MySQL-devel /usr/share/doc/packages/MySQL-devel MySQL-devel /usr/share/doc/packages/MySQL-devel/EXCEPTIONS-CLIENT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Chris wrote: ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysql-include-dir=/usr/include/mysql --with-mysql-lib-dir=/usr/lib/mysql --with-mysqli=/usr/bin/mysql_config it might work. I've managed to stave of the need for the mysql extension for a week or two, but I have a good feeling about that one, and am hopeful it will work. I'll probably end up trying that one this weekend. It didn't work. :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Chris wrote: > Hi, I've been trying to get these 2 compiled together for a while, and > have had no luck. > > WHere my problem lies, I think, is that I'm not sure what directory > should be specified on the --with-mysql part Here's the deal: "configure" needs to find *BOTH* 'mysql.h' files and 'mysql.so'/'mysql.lib' files *UNDER* the directory you feed it. Figure out where your mysql.h files are. Figure out where your mysql.lib/mysql.so files are. Whatever directory structure they have in common, that's what you want. In your case, since you were trying to use '/usr/include/mysql' I'm betting that your mysql.lib and mysql.so are in '/usr/lib/mysql' Which means that the only part in common those two directories have is '/usr' and *THAT* is what you should use. Again -- 'configure' has to start at the directory you feed it, and it has to walk down the sub-directories, and it has to find both the 'mysql.h' files and the 'mysql.lib/mysql.so' files. Hope that helps. PS This is true of all the extensions, and other configure scripts in general. PPS After you do a "make install" do an "ldconfig" if you are on a system that uses "ldconfig" -- "man ldconfig" will tell you more, including show you a 'verbose' option so you can confirm your software really really got installed. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/ --with-mysqli=/usr/bin/mysql_config ./configure --with-apxs2=/usr/sbin/apxs2 --with-mysql=/usr/include/mysql/ --with-mysqli=shared,/usr/bin/mysql_config Build either one as shared. I have my own compiled Apache (It is Apache 2) , and MySQL 4.1.9 installed (the packages off mysql.com). The PHP documentation jsut says point it to the install dir. I'm nto sure what counts as the install dir for the MySQL packages. Any advice would be appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Hans Zaunere wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/ --with-mysqli=/usr/bin/mysql_config I have my own compiled Apache (It is Apache 2) , and MySQL 4.1.9 installed (the packages off mysql.com). The PHP documentation jsut says point it to the install dir. I'm nto sure what counts as the install dir for the MySQL packages. Any advice would be appreciated. Both MySQL and MySQL libs can be compiled into PHP. Try --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config H I actually tried that one (along with several others). In my continuing saga I tried this: ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql-include-dir=/usr/include/mysql/ --with-mysql-lib-dir=/usr/lib/mysql/ --with-mysqli=/usr/bin/mysql_config It compiled, but the mysql extension wasn't there. It strikes me thatmaybe if I tried ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysql-include-dir=/usr/include/mysql --with-mysql-lib-dir=/usr/lib/mysql --with-mysqli=/usr/bin/mysql_config it might work. I've managed to stave of the need for the mysql extension for a week or two, but I have a good feeling about that one, and am hopeful it will work. I'll probably end up trying that one this weekend. Thanks, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
dan wrote: Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/ --with-mysqli=/usr/bin/mysql_config I have my own compiled Apache (It is Apache 2) , and MySQL 4.1.9 installed (the packages off mysql.com). The PHP documentation jsut says point it to the install dir. I'm nto sure what counts as the install dir for the MySQL packages. Any advice would be appreciated. Below is a snippet of some of the error I'm getting I'm actually getting ALOT more, they all seem to be "First defined here" errors. Thanks, Chris /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0x40): first defined here /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0xc0): In function `vio_delete': : multiple definition of `vio_delete' >snip< I had in my mind that they could not be used together, and I began to wonder why again, as I had since forgotten. When I try to use "--with-mysql --with-mysqli", I get the following: ... ... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /tmp/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no configure: error: --with-mysql (using bundled libs) can not be used together with --with-mysqli. So I guess that might help you out. The only other thing I can think of is if you have two different mysql-devel or mysql library packages installed. Hope that helps -dant Thanks, but the documentation (PHP) does say that both can be compiled in at the same time, they just need to be compiled against the same version. I actually got this to work on a different install, one in which the MySQL wasn't the package, and jsut had a single isntallation directory. On that one I used --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL and MySQLi compiling
> Hi, I've been trying to get these 2 compiled together for a while, and > have had no luck. > > WHere my problem lies, I think, is that I'm not sure what directory > should be specified on the --with-mysql part > > ./configure --with-apxs2=/usr/local/apache/bin/apxs > --with-mysql=/usr/include/mysql/ --with-mysqli=/usr/bin/mysql_config > > I have my own compiled Apache (It is Apache 2) , and MySQL 4.1.9 > installed (the packages off mysql.com). The PHP documentation jsut says > point it to the install dir. I'm nto sure what counts as the install dir > for the MySQL packages. > > Any advice would be appreciated. Both MySQL and MySQL libs can be compiled into PHP. Try --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config H > > Below is a snippet of some of the error I'm getting I'm actually getting > ALOT more, they all seem to be "First defined here" errors. > > Thanks, > Chris > > /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0x40): first defined here > /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0xc0): In function > `vio_delete': > : multiple definition of `vio_delete' > /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0xc0): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x0): In function > `vio_errno': > : multiple definition of `vio_errno' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x0): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x20): In function > `vio_read': > : multiple definition of `vio_read' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x20): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x60): In function > `vio_write': > : multiple definition of `vio_write' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x60): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x80): In function > `vio_blocking': > : multiple definition of `vio_blocking' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x80): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0xe0): In function > `vio_is_blocking': > : multiple definition of `vio_is_blocking' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0xe0): first defined here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x100): In function > `vio_fastsend': > : multiple definition of `vio_fastsend' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x100): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x160): In function > `vio_keepalive': > : multiple definition of `vio_keepalive' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x160): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x1a0): In function > `vio_should_retry': > : multiple definition of `vio_should_retry' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x1a0): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x1d0): In function > `vio_close': > : multiple definition of `vio_close' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x1d0): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x230): In function > `vio_description': > : multiple definition of `vio_description' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x230): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x240): In function > `vio_type': > : multiple definition of `vio_type' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x240): first defined > here > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x250): In function > `vio_fd': > : multiple definition of `vio_fd' > /usr/lib/mysql/libmysqlclient.a(viosocket.o)(.text+0x250): first defined > here > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and MySQLi compiling
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/ --with-mysqli=/usr/bin/mysql_config I have my own compiled Apache (It is Apache 2) , and MySQL 4.1.9 installed (the packages off mysql.com). The PHP documentation jsut says point it to the install dir. I'm nto sure what counts as the install dir for the MySQL packages. Any advice would be appreciated. Below is a snippet of some of the error I'm getting I'm actually getting ALOT more, they all seem to be "First defined here" errors. Thanks, Chris /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0x40): first defined here /usr/lib/mysql/libmysqlclient.a(vio.o)(.text+0xc0): In function `vio_delete': : multiple definition of `vio_delete' >snip< I had in my mind that they could not be used together, and I began to wonder why again, as I had since forgotten. When I try to use "--with-mysql --with-mysqli", I get the following: ... ... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /tmp/mysql.sock checking for mysql_close in -lmysqlclient... (cached) yes checking for MySQLi support... yes checking whether to enable embedded MySQLi support... no configure: error: --with-mysql (using bundled libs) can not be used together with --with-mysqli. So I guess that might help you out. The only other thing I can think of is if you have two different mysql-devel or mysql library packages installed. Hope that helps -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php