php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34487 php 5.0.4 does'nt compile
Submitted: 2005-09-13 03:43 UTC Modified: 2005-09-15 03:49 UTC
From: rporticio at yahoo dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.0.5 OS: Red hat 9 linux
Private report: No CVE-ID: None
 [2005-09-13 03:43 UTC] rporticio at yahoo dot com
Description:
------------
php 5.0.4  doesn't compile after configuring

please note that there is no 5.0.4 in your PHP version above.

Reproduce code:
---------------
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql=/usr 

make

(some codes here...)

ext/mysql/php_mysql.lo(.text+0x2076): In function `zif_mysql_create_db':
/home/php/php-5.0.4/ext/mysql/php_mysql.c:1166: undefined reference to `mysql_create_db'
ext/mysql/php_mysql.lo(.text+0x2279): In function `zif_mysql_drop_db':
/home/php/php-5.0.4/ext/mysql/php_mysql.c:1208: undefined reference to `mysql_drop_db'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Expected result:
----------------
there is no error and it is ready for the next command make install.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-13 09:39 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

And make sure your installed mysql headers match the installed libraries. Which seems to be reason for this compile failure anyway.
 [2005-09-14 10:39 UTC] rporticio at yahoo dot com
i already use php 5.0.5 the new version and i loaded 4 mysql rpm packages namely:
 MySQL-client-4.1.14-0.i386.rpm
MySQL-devel-4.1.14-0.i386.rpm for header files as you suggested
MySQL-server-4.1.14-0.i386.rpm
MySQL-shared-4.1.14-0.i386.rpm

using rpm -Uvh
here's next what i did

cd to php-5.0.5 and follow the isntruction in php manual
in installing apache 2 on unix systems with php5.0.5 as follows

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

the result is:

----- some codes here

ext/mysql/php_mysql.lo(.text+0x2076): In function `zif_mysql_create_db':
/home/php/php-5.0.5/ext/mysql/php_mysql.c:1169: undefined reference to `mysql_create_db'
ext/mysql/php_mysql.lo(.text+0x2279): In function `zif_mysql_drop_db':
/home/php/php-5.0.5/ext/mysql/php_mysql.c:1211: undefined reference to `mysql_drop_db'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
 [2005-09-14 10:45 UTC] sniper@php.net
I'm sorry but this can't be bug in PHP. There is some stale mysql header file somewhere along the include path which has MYSQL_VERSION_ID < 40000.

 [2005-09-15 03:49 UTC] rporticio at yahoo dot com
Thank you for the quick response and for the information.
God Bless!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 28 16:00:02 2025 UTC