Jump to content

Archived

This topic is now archived and is closed to further replies.

debram99

Problem configuring php 5.1.6 with mysql 5.0.24a on Fedora 4

Recommended Posts

I'm a newbie to php, mysql, and apache.  I can't get php to configure with mysql.  I'm on Fedora core 4.  I successfully installed apache2 and mysql 5.0.24a. 

I'm running the following configure command for php:

./configure --prefix=/usr/local/php
              --with-config-file-path=/usr/local/php
              --with-mysql=/usr/local/mysql
              --with-apxs2=/usr/local/apache/bin/apxs
              --enable-track-vars
              --enable-magic-quotes
           
It gives me the following error:
        configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.

If I exclude the --with-mysql, then it configures with no problem.  I've tried including the --with-zlib-dir=/usr/includes (and other directories), but it then it gives the following error:
        configure: error: mysql configure failed. Please check config.log for more information.

I see nothing obvious in the config.log.  Here are the last several lines of the log:

file.cpp: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x28c): In function `TaoCrypt::FileSink::~FileSink(void)':
file.cpp: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
configure: failed program was:
#line 58781 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_error();

int main() {
mysql_error()
; return 0; }




Any help would be much appreciated.

Share this post


Link to post
Share on other sites
Look for libz.so or libz.a with find or locate
[code]
locate libz.so
[/code]
Use the directory that the "lib" directory is in as the value for the zlib-dir. eg if you find libz.so in "/usr/lib" use "/usr" as the directory.

EDIT: After searching I've seen that some have had problems compiling against MYSQL 5 libs. You may want to download 4.1 and compile PHP against those libraries instead, while still using 5.0 for your server.
[code]
http://dev.mysql.com/downloads/mysql/4.1.html
[/code]

Share this post


Link to post
Share on other sites
Thanks for the info, Shoz.  I found the libz files in /usr/lib.  I tried using --with-zlib-dir=/usr, but I still had the same problem on mysql 5.1.  I installed mysql 4.1 and had the same problem.  So I began to think maybe I needed a different tarball.

I had downloaded the mysql tarball listed under heading "Linux (x86, glibc-2.2, 'standard' is static, gcc)".  I downloaded the tarball listed under "Linux (x86)" (I don't know the real difference b/w the two), and it worked with php. 

Thanks again.

Share this post


Link to post
Share on other sites
[quote author=debram99 link=topic=107311.msg434287#msg434287 date=1158254850]
Thanks for the info, Shoz.  I found the libz files in /usr/lib.  I tried using --with-zlib-dir=/usr, but I still had the same problem on mysql 5.1.  I installed mysql 4.1 and had the same problem.  So I began to think maybe I needed a different tarball.

I had downloaded the mysql tarball listed under heading "Linux (x86, glibc-2.2, 'standard' is static, gcc)".  I downloaded the tarball listed under "Linux (x86)" (I don't know the real difference b/w the two), and it worked with php. 

Thanks again.

[/quote]
I think the "Linux (x86)" download is compiled against glibc-2.3.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.