Click to See Complete Forum and Search --> : [RESOLVED] Problem Configuring Php 5 With Apache Mysql


durahman
08-08-2006, 05:47 AM
I am using RedHat ES Ver3.0

Install Apache 2.0.59
Install MySQL 5.0.22

Downloaded PHP 5.1.4

Configure using:

./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs

Receive Error:

configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.

Download zlib-1.2.3: configure and install

Reconfigure PHP using:

./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-zlib=/usr/local/zlib-1.2.3

Receive error:

checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz

Appreciate for any help. TQ

tsinka
08-09-2006, 04:00 PM
Use --with-zlib-dir instead of --with-zlib. Which prefix did you use configuring zlib ?
Isn't there a zlib package available for RedHat ES Ver3.0 ?
Thomas

durahman
08-10-2006, 02:10 AM
Done that.

Now I get this error:
.......................
checking for MySQL UNIX socket location... no
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.

I am using MySQL 5.0.24 standard binary

tsinka
08-10-2006, 06:14 AM
Ok,

I'm not sure if that are general problems of the mysql extension regarding php 5.x.
Did you check that libmysqlclient*.so files exist somewhere inside /usr/local/mysql/lib ?

Besides that there are some pitfalls when using the mysql extension instead of the mysqli extension on mysql 4.1.x/5.x.

Thomas

durahman
08-10-2006, 08:31 PM
libmysqlclient*.so files do not exist.

I can only find libmysqlclient*.a in /usr/local/mysql/lib.

I tried using mysql RPMs for RedHat 3, but get checksum error though it is correct when I check as instructed.

It seem the insruction by MySQL ad PHP didnot help much (blur) for newbies.

TQ

tsinka
08-11-2006, 08:15 AM
What does the file /etc/redhat-release contain, which rpm package did you try to install and which error do you get exactly. It looks like the standard binaries you can download from MySQL have been compiled with --all-static so no shared libraries exist at all. This a bit of a problem because you need the shared mysql client libraries to compile php as shared module.

Either try to solve the rpm problems or try to compile the client libs yourself.

Thomas

durahman
08-11-2006, 08:42 PM
Thanks Thomas.

I'll try to solve the rpm problem first.

durahman
08-15-2006, 08:15 PM
Solve the problem.

Install:

perl-DBI-1.32-5.i386.rpm
MySQL-server-standard-Version-i386.rpm
MySQL-client-standard-Version-i386.rpm
MySQL-devel-standard-Version-i36.rpm

Then reconfigure and install PHP5 after.