rebuilding php5 with mysql

karloff

Well-Known Member
#1
I have been trying to rebuild mysql (4.1) with php5 but keep getting the error

checking for specified location of the MySQL UNIX socket... /var/lib/mysql/mysql.sock
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
this is what my config.log says
configure:59329: $? = 0
configure:59332: test -s conftest
configure:59335: $? = 0
configure:59347: result: yes
configure:60034: checking if iconv is glibc's
configure:60052: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib conftest.c -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm >&5
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.a when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
configure:60058: $? = 0
configure:60062: test -z
|| test ! -s conftest.err
configure:60065: $? = 0
configure:60068: test -s conftest
configure:60071: $? = 0
configure:60074: result: yes
configure:60361: checking if iconv supports errno
configure:60403: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib conftest.c -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm >&5
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.a when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.a when searching for -lxml2
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
configure:60406: $? = 0
configure:60408: ./conftest
configure:60411: $? = 0
configure:60414: result: yes
configure:60447: checking if your cpp allows macro usage in include lines
configure:60468: gcc -c -I/usr/include -g -O2 conftest.c >&5
configure:60474: $? = 0
configure:60478: test -z
|| test ! -s conftest.err
configure:60481: $? = 0
can't find any info on this, can anyone suggest a fix?
 

mistwang

LiteSpeed Staff
#2
If you were building 64bit PHP binary, you should add "--with-libdir=lib64" option.
With this option, seems the "--with-mysql=/usr" works without expanding mysql package under "/usr/local/mysql".
 

karloff

Well-Known Member
#3
If you were building 64bit PHP binary, you should add "--with-libdir=lib64" option.
With this option, seems the "--with-mysql=/usr" works without expanding mysql package under "/usr/local/mysql".
does this make sense?

--with-mysqli --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-simplexml --with-libdir=lib64
 

karloff

Well-Known Member
#5
looks all good:)

how can i test to see if the connection is there and is ok?

my site still seems to be coming up blank therefore the connection must be broken.

edit: just checked, phpmyadmin just verified that
 

karloff

Well-Known Member
#7
If you were building 64bit PHP binary, you should add "--with-libdir=lib64" option.
With this option, seems the "--with-mysql=/usr" works without expanding mysql package under "/usr/local/mysql".
mistwang, where did you get that info, i'm going to post some info on my blog which may be helpful to others:rolleyes:, however i would like to know the background to those great suggestions

cheers
 
Top