Problam regarding adodb-mysql.inc.php

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
sharpknifeedge
Posts: 13
Joined: Sat Jan 22, 2005 6:23 am
Location: Tehran
Contact:

Problam regarding adodb-mysql.inc.php

Post by sharpknifeedge »

Hi,

I just finished cacti installation, followed the docs, but whenever I point my browser to the cacti machine I got the following message:

######################################
Fatal error: Call to undefined function: mysql_connect() in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 338
######################################

Also followed other people's problems here about this message but didn't find anything !

Can anybody help me, please?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

"php -m" should return a number of lines including one like this "mysql". If not you need to include the mysql.so file in your php.ini file.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
sharpknifeedge
Posts: 13
Joined: Sat Jan 22, 2005 6:23 am
Location: Tehran
Contact:

I did that but ...

Post by sharpknifeedge »

I type "php -m" and it returns:

######################################
PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/mysql.so' - Shared object "libmysqlclient.so.10" not found in Unknown on line 0
[PHP Modules]
pcre
session
standard
xml

[Zend Modules]
#######################################

I found the path of mysql.so and tried to locate php.ini but I found 4 referers to php.ini and unfortunately I don't know in which of them I should put the path to that mysql.so!

What should I do then "The Witness"?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Create a small file in the root of Cacti called "php_info.php". In that file, place the following line:

<?php phpinfo(); ?>

From your web browser, point to that file. Your PHP.INI file path will be specified. After you have finished debugging, remove that file as it presents too much of your system information to others.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
sharpknifeedge
Posts: 13
Joined: Sat Jan 22, 2005 6:23 am
Location: Tehran
Contact:

Solved!

Post by sharpknifeedge »

Thank you for your help! The problem is solved!
routermech
Posts: 2
Joined: Mon Aug 29, 2005 4:39 pm
Location: Colorado
Contact:

drivers/adodb-mysql.inc.php on line 338

Post by routermech »

I have this same problem, the web pages gives;

Fatal error: Call to undefined function: mysql_connect() in cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 338


But php lists mysql...

I type "php -m" and it returns:

[root@hoth root]# php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dba
dbx
dio
domxml
exif
ftp
gd
gettext
gmp
iconv
imap
ldap
mbstring
mysql
ncurses
odbc
openssl
overload
pcntl
pcre
posix
pspell
session
shmop
sockets
standard
sysvsem
sysvshm
tokenizer
wddx
xml
yp
zlib

[Zend Modules]

Thanks Mike
kookedgoose
Posts: 1
Joined: Tue Sep 06, 2005 11:18 am

Post by kookedgoose »

I am getting a similar error when running poller.php

Fatal error: Call to undefined function: mysql_connect() in /usr/share/cacti/site/lib/adodb/drivers/adodb-mysql.inc.php on line 339

am pretty sure the lack of mysql when i do php -m is the problem, however mysql.so appears on the bottom of php.ini (and yes i checked the correct file and restarted apache).

any ideas.
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

Check the first topic in this forum on SELinux because I was getting the same adodb-mysql.inc.php error on my CentOS box before I disabled SELinux.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests