poller.php mysql_connect();

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

Moderators: Developers, Moderators

Post Reply
imi
Posts: 2
Joined: Tue Jun 14, 2005 8:48 am

poller.php mysql_connect();

Post by imi »

Hi everbody,

When I execute poller.php manually from shell I get the error:

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

According to documentation is this a problem with the mysql-connection. However, I can log in to cacti and browse everything. Shouldn't this be impossible if there is a problem with the connection?

My stuff:
cacti 0.8.6d
debian 3.1
Apache/1.3.33
PHP 4.3.10-15
MySQL 4.0.24
lowalcohol
Posts: 2
Joined: Wed Jun 15, 2005 3:55 am

same here

Post by lowalcohol »

... debian just got to a new stable version

i did an apt-get dist upgrade,
my "history" of cacti is browsable (e.g. cacti still works, with populated graphs, but without new data)

i get exactly the same error

php -m does NOT show mysql

Code: Select all

#php -m

[PHP Modules]
bcmath
bz2
calendar
ctype
dba
dbx
exif
filepro
ftp
gettext
iconv
mbstring
mime_magic
ncurses
openssl
overload
pcntl
pcre
posix
session
shmop
snmp
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlrpc
yp
zip
zlib

[Zend Modules]
I know this is a common problem and i know that in the past the sollution was probably posted. Using the search function all i found was many post redirecting to the search option :( i am not interessted in just another utfs answer!

some posts refer to the installation manual, however i don't understand what needs to be ajusted in /etc/php4/apache/php.ini

cacti version 0.8.6.d (according the cacti - version database)

php.ini:

Code: Select all


(...)

[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no limit.
mssql.max_links = -1

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Connec timeout
;mssql.connect_timeout = 5

; Query timeout
;mssql.timeout = 60

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

; Limits the number of records in each batch.  0 = all records in one batch.
;mssql.batchsize = 0

; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss
;mssql.datetimeconvert = On

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. Default = 25
;mssql.max_procs = 25

(...)
Attachments
php.txt
php.ini
(36.59 KiB) Downloaded 293 times
lowalcohol
Posts: 2
Joined: Wed Jun 15, 2005 3:55 am

manual

Post by lowalcohol »

in the manual:

I get a "Call to undefined function: mysql_connect()" error message from Cacti.

Your installation of PHP does not have MySQL installed or enabled. On binary-based distributions, make sure you have the 'php-mysql' package installed. Also make sure that 'extension=mysql.so' is uncommented in your php.ini file.


php4-mysql has been installed

the line extension=mysql.so was commented out, removed the comment and restarted the cacti server.

editing only /etc/php4/apache/php.ini didnt work as expected, so
changed all the php.ini files in /etc/php4/cgi/ and in etc/php4/cli


now php-m shows mysql
imi
Posts: 2
Joined: Tue Jun 14, 2005 8:48 am

Post by imi »

Thank you guys!
Now I can execute poller.php. The extension=mysql.so was commented out in etc/php4/cli. Now...let's see if I can get those graphs to show something... :)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests