[LIP] Newbie: Error with PHP: undefined function: mysql_connect()

Sanjay Arora <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Organization Transcontinental Impex Pvt. Ltd.
Message-ID <[email protected]>
Please help. Newbie running Centos 4.2 with mySQL & PHP (binary RPM
install, php shows it was compiled with --with-mysql=shared) as per versions given below. Getting error in vegadns package
(DJB TinyDNS GUI) :

Fatal error: Call to undefined function: mysql_connect()
in /home.www/html/vegadns/src/connect.php

Some diagnostics I ran for info on version etc.:

[root@soochak src]# mysqladmin -u root ping
mysqld is alive
[root@soochak src]# mysqladmin -u root debug
[root@soochak src]# mysqladmin -u root status
Uptime: 200575  Threads: 1  Questions: 11  Slow queries: 0  Opens: 13
Flush tables: 1  Open tables: 2  Queries per second avg: 0.000
[root@soochak src]# mysqladmin -u root version
mysqladmin  Ver 8.41 Distrib 4.1.12, for redhat-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          4.1.12
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /home.dbdata/mysql/mysql.sock
Uptime:                 2 days 7 hours 43 min 15 sec

Threads: 1  Questions: 12  Slow queries: 0  Opens: 13  Flush tables: 1
Open tables: 2  Queries per second avg: 0.000

[root@soochak src]# php --version
PHP 4.3.9 (cgi) (built: Nov 10 2005 20:38:14)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

051122 16:52:26  mysqld started
051122 16:52:29  InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections.
Version: '4.1.12'  socket: '/home.dbdata/mysql/mysql.sock'  port: 3306
Source di stribution

Status information:

Current dir: /home.dbdata/mysql/
Running threads: 1  Stack size: 196608
Current locks:
lock: 0x8dd82a8:

lock: 0x8db2f40:


Key caches:
default
Buffer_size:       8388600
Block_size:           1024
Division_limit:        100
Age_limit:             300
blocks used:             4
not flushed:             0
w_requests:              4
writes:                  4
r_requests:              7
reads:                   4


handler status:
read_key:            2
read_next:           0
read_rnd             0
read_first:          2
write:               2
delete               0
update:              0

Table status:
Opened tables:         13
Open tables:            2
Open files:             4
Open streams:           0

Alarm status:
Active alarms:   0
Max used alarms: 1
Next alarm time: 0
[root@soochak log]#

Q: Does compiling --with-mysql=shared means that there should be a mysql.so lib somewhere under php...I could not find one.

Please help...have searched...asked on mail lists but no correct pointers to the problem.

With regards.
Sanjay.





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.