Hi, When I try to run mysql functions from php I get a "function not defined" message
I get this error ( warning ) when I run php : <error> php PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/libmysqlclient.so.6: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference in Unknown on line 0 </error>
What is the problem related with and how can it be solved ?
Regards, Sourabh
Here are the details of the configuration:
PHP version: php -v PHP 4.3.3 (cgi) (built: Oct 21 2003 09:51:55) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
MySQL version:
mysql> status -------------- mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
-bash-2.05b$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 3.23.58
Packages installed : -bash-2.05b$ rpm -qa | grep php php-4.3.3-6 php-imap-4.3.3-6 php-ldap-4.3.3-6 php-mysql-4.0.2-1
-bash-2.05b$ rpm -qa | grep mysql mysql-server-3.23.58-4 mysql-3.23.58-4 php-mysql-4.0.2-1
Distribution: Fedora Cora 1
On 2/13/07, saurabh daptardar saurabh.daptardar@gmail.com wrote:
Hi, When I try to run mysql functions from php I get a "function not defined" message
I get this error ( warning ) when I run php :
<error> php PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/libmysqlclient.so.6: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference in Unknown on line 0 </error>
What is the problem related with and how can it be solved ?
Regards, Sourabh
Here are the details of the configuration:
PHP version: php -v PHP 4.3.3 (cgi) (built: Oct 21 2003 09:51:55) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
MySQL version:
mysql> status
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
hmmm. did mysql have database functions in 3.23?? or are u talking of the php functions that connect to mysql? also, afaik, fc1 came with glibc-2.3. Try the following command and see what u get from it. it should list the glibc_2.0 dependency
'rpm -q --provides glibc'
this is what my sys(FC6) spits out.
libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.2.6)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.3.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libc.so.6(GLIBC_2.5)(64bit)
Also, on an related note, what r u still doing with FC1 man? it's been over 2 years i think, since i moved off kernel 2.4, and so should u. also, FC1 is ancient. unless you have a very offbeat requirement, i suggest you move up to fc5(server) or fc6(desktop). if you need php4(it's ok, lots of ppl still do) or mysql 3.23(Heaven Forbid), u can get them onto the new fedora's too.
Rajeev
-bash-2.05b$ mysql
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 3.23.58
Packages installed : -bash-2.05b$ rpm -qa | grep php php-4.3.3-6 php-imap-4.3.3-6 php-ldap-4.3.3-6 php-mysql-4.0.2-1
-bash-2.05b$ rpm -qa | grep mysql mysql-server-3.23.58-4 mysql-3.23.58-4 php-mysql-4.0.2-1
Distribution: Fedora Cora 1
-- www.yuj.in -- http://mm.glug-bom.org/mailman/listinfo/linuxers
Hi,
On 2/13/07, Rajeev R. K. rajeevrk@gmail.com wrote:
hmmm. did mysql have database functions in 3.23?? or are u talking of the php functions that connect to mysql?
Yes , you are right . I am talking of php fuctions that connect to MySQL database.
also, afaik, fc1 came with glibc-2.3. Try the following command and see
what
u get from it. it should list the glibc_2.0 dependency
'rpm -q --provides glibc'
libc.so.6 libc.so.6(GCC_3.0) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.1) libc.so.6(GLIBC_2.1.2) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.1) libc.so.6(GLIBC_2.2.2) libc.so.6(GLIBC_2.2.3) libc.so.6(GLIBC_2.2.4) libc.so.6(GLIBC_2.2.6) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.2) libc.so.6(GLIBC_2.3.3) libc.so.6(GLIBC_PRIVATE)
Also, on an related note, what r u still doing with FC1 man? it's been
over
2 years i think, since i moved off kernel 2.4, and so should u. also, FC1
is
ancient. unless you have a very offbeat requirement, i suggest you move up to fc5(server) or fc6(desktop). if you need php4(it's ok, lots of ppl
still
do) or mysql 3.23(Heaven Forbid), u can get them onto the new fedora's
too.
Yes , I agree that FC1 is ancient . But let us assume that FC1 is a precondition and proceed forward.
Eagerly , awaiting for a solution
Regards, Sourabh
Subject: Re: [ILUG-BOM] PHP - MySQL problem
On 2/13/07, saurabh daptardar saurabh.daptardar@gmail.com wrote:
Hi, When I try to run mysql functions from php I get a "function not defined" message
Hi My web server log contains following error:
[Tue Feb 13 10:54:57 2007] [error] [client 172.16.16.50] PHP Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5, referer: http://172.16.16.50/
Any suggestion? I feel saurabh and me are facing same problem.
Dinesh
Dinesh Kumar wrote:
Subject: Re: [ILUG-BOM] PHP - MySQL problem
On 2/13/07, saurabh daptardar saurabh.daptardar@gmail.com wrote:
Hi, When I try to run mysql functions from php I get a "function not defined" message
Hi My web server log contains following error:
[Tue Feb 13 10:54:57 2007] [error] [client 172.16.16.50] PHP Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 5, referer: http://172.16.16.50/
Any suggestion? I feel saurabh and me are facing same problem.
hi Dinesh,
If you are using 4.x series of PHP, refer to my previous mail. I faced same problem and just tried defining that module in extensions section of php.ini file, it worked. Also check that you have compiled php with mysql (phpinfo()) and that the file mysql.so (or something like that, don't remember exactly) is present in extensions directory of php.
saurabh daptardar wrote:
Hi, When I try to run mysql functions from php I get a "function not defined" message
I get this error ( warning ) when I run php :
<error> php PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/libmysqlclient.so.6: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference in Unknown on line 0 </error>
Try defining that extension in your php.ini, look towards end of php.ini for extension definition. Don't forget to restart webserver after you make any changes to php.ini file.