Forum Moderators: coopster

Message Too Old, No Replies

php 5 install with mysql 4.1.Mysql Client Api is 3.23.52?

I have been trying to fix this for hours

         

deizu

1:30 am on Mar 2, 2005 (gmt 0)

10+ Year Member



I have a number of different installs of mysql.

mysql3.23 via rpm
mysql4.0 (max) binary (archive .gz) //you know what I mean
mysql4.1 (max) binary (archive .gz)

I have been trying to change the 'mysql client api' version for a couple of hrs now. After doing the install I see the following in my phpinfo() output.

Active Persistent Links 0
Active Links 0
Client API version 3.23.52
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/progs/mysql-4.1.1/include
MYSQL_LIBS -L/progs/mysql-4.1.1/lib -lmysqlclient

I'm using the mysql-4.1 install, to compile php with mysql.

As you can see the MYSQL_INCLUDE path and LIB paths are correct referring to the 4.1 installation dir. However the Client Api still says 3.23.52

I have attempted to edit the Makefile changing CC=gcc to CC=gcc -I/progs/mysql-4.1.1/include

I have also removed the header files from the rpm(3.23) install which reside in /usr/include/mysql and instead put a sybmolic link.

ln -s /progs/mysql-4.1.1/include /usr/include/mysql

After every attempt the client api still says 3.23.

The shortened version of my configure is

./configure --prefix=/path/to/apache --with-apxs2=etc etc --with-mysql=/progs/mysql-4.1.1

Any help would be appreciated.

think it's also relevant that when I try to install the 'mysqli' support I get the following errors.

Btw I get these errors when I configure php with '--with-mysqli' by itself or with --with-mysql(ie --with-mysqli=/etc/etc/mysql_config --with-mysql=/etc/)

I remove the second '-lmysqlclient' from the Makefile when I have (--with-mysql and --with-mysqli) in the config line. That removes the multiple defines etc error, but I get these errors now.

ext/mysqli/mysqli.lo: In function `php_clear_stmt_bind':
/path/to/php-5.0.3/ext/mysqli/mysqli.c:94: undefined reference to `mysql_stmt_close'
ext/mysqli/mysqli.lo: In function `php_set_local_infile_handler_default':
/path/to/php-5.0.3/ext/mysqli/mysqli.c:774: undefined reference to `mysql_set_local_infile_handler'
ext/mysqli/mysqli_api.lo: In function `zif_mysqli_autocommit':
/path/to/php-5.0.3/ext/mysqli/mysqli_api.c:65: undefined reference to `mysql_autocommit'

I get many more of the same errors. I assume it has something to do with not including the mysql4.1 headers seeing how the 'mysqli' extension is specifically for the new features of mysql4.1.

Again, If you can provide some assistance thank you in advance.

deizu

5:46 am on Mar 2, 2005 (gmt 0)

10+ Year Member



Well for anyone with a similar problem, I was able to solve my problems by doing 2 things. Possible that doing the first with a small change would have worked, but I'll just put exactly what I did.

I added the library dir for my mysql-4.1 install in ld.so.conf. running 'ldconfig' after of course.

I then had to disable the libmysqlclient files that were in my /usr/lib dir. Which were put there by my mysql3.23 install I believe.

(chmod o-r libmysqlclient_r.so and libmysqlclient.so and
renamed libmysqlclient.a/la to name.a.bak name.la.bak)

I configured and compiled as a normal user. That's the reason for just chmoding with o-r to disable the files from use for that user.

After doing the above, the correct libraries were apparently found and compilation of both mysql and mysqli went fine. No need to edit the Makefile btw.