php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15945 While starting Apache I get an undefined symbol error.mysql_field_count
Submitted: 2002-03-07 22:53 UTC Modified: 2002-04-05 09:59 UTC
From: tbirchmire at usa dot net Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.1.2 OS: RedHat 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tbirchmire at usa dot net
New email:
PHP Version: OS:

 

 [2002-03-07 22:53 UTC] tbirchmire at usa dot net
While starting Apache I get an undefined symbol error.
mysql_field_count

Running RedHat 7.2

Installed  MySQL 3.23.49a from binary into /usr/local/mysql from mysql-3.23.49a-pc-linux-gnu-i686. MySQL runs correctly.


php-4.1.2.tar.gz untarred into php-4.1.2
build was  ./configure
 "--with-mysql=/usr/local/mysql   and --with-apxs=/usr/sbin/apxs"
ran correctly  (without error)
make ran without error
make install ran without error



Apache won't start, reporting "undefined symbol"

/etc/rc.d/init.d/httpd start
Starting httpd: Syntax error on line 261 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined symbol: mysql_field_count
                                                           [FAILED]

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-08 03:00 UTC] sniper@php.net
Try checking first that the libphp4.so is finding all
necessary libraries:

# ldd /etc/httpd/modules/libphp4.so

As you might not have /usr/local/mysql/lib/mysql/ in your
/etc/ld.so.conf 

Try adding it and run /sbin/ldconfig 

--Jani

 [2002-03-08 07:08 UTC] tbirchmire at usa dot net
Try checking first that the libphp4.so is finding all
 necessary libraries:

 # ldd /etc/httpd/modules/libphp4.so

 Produced:
[root@localhost etc]# ldd /etc/httpd/modules/libphp4.so
	libc.so.6 => /lib/i686/libc.so.6 (0x4011e000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

Added /usr/local/mysql/lib/mysql to /etc/ld.so.comfig leaving off the trailing "/" because the other entries didn't have one.
Ran /sbin/ldconfig    without apparent effect as it came back to the command line without any messages.
Undefined symbol error unchanged.
.
 [2002-04-04 17:55 UTC] sniper@php.net
If you could please try the PHP 4.2.0 RC2 to see if this
happens with it too..http://www.php.net/~derick/

Also, you could try compiling with the bundled mysql libs.
ie. leave the path out from the --with-mysql option.

--Jani

 [2002-04-05 09:54 UTC] tbirchmire at usa dot net
Installing php-4.2.0RC2.tar.gz using the above procedure corrected the problem.  Apache now starts and stop without error and I can run my php scripts locally once again.  For what it's worth this problem began because RedHat shipped php without mysql enabled so I don't know how long the trouble was there. I can't be the only person running RedHat7.2 and using php with mysql.  Perhaps it's just my combination of stuff.  In any case php-4-2.0RC2 corrects the problem.
Thanks,
Tom Birchmire
 [2002-04-05 09:59 UTC] sander@php.net
Closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 02 03:00:02 2025 UTC