Installing on Ubuntu -- Issues with poller.php
Moderators: Developers, Moderators
Installing on Ubuntu -- Issues with poller.php
Hi all,
I installed cacti on ubuntu with apt-get install cacti. Initially it was working but not working well, I was having various problems, but I was able to get to the web page and create devices. However, nothing was showing up in the graphs, so after a little investigation, I decided to remove it and reinstall it, again with apt-get. Well on the second install, it wasn't asking me any of the configuration questions, so i uninstalled it a second time, and went through my file system deleting all the files i could find that had cacti in the name. I also deleted the cacti mysql user and database.
Now I can install it and get the configuration questions, but some other things aren't happening. First, it created the cacti mysql user, but not the database. Simple enough, i created it manually. Second several files were in the wrong location, so I moved them manually to where cacti was expecting to see them. Now when I run poller.php, I get the following output:
Warning: array_merge(): Argument #2 is not an array in /usr/share/cacti/site/poller.php on line 61
Warning: Invalid argument supplied for foreach() in /usr/share/cacti/site/poller.php on line 115
sh: -: not found
11/05/2008 11:29:03 AM - SYSTEM STATS: Time:0.0096 Method:cmd.php Processes:1 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources: RRDsProcessed:0
Anyone have any idea what I should do?
Thanks,
-Scott
I installed cacti on ubuntu with apt-get install cacti. Initially it was working but not working well, I was having various problems, but I was able to get to the web page and create devices. However, nothing was showing up in the graphs, so after a little investigation, I decided to remove it and reinstall it, again with apt-get. Well on the second install, it wasn't asking me any of the configuration questions, so i uninstalled it a second time, and went through my file system deleting all the files i could find that had cacti in the name. I also deleted the cacti mysql user and database.
Now I can install it and get the configuration questions, but some other things aren't happening. First, it created the cacti mysql user, but not the database. Simple enough, i created it manually. Second several files were in the wrong location, so I moved them manually to where cacti was expecting to see them. Now when I run poller.php, I get the following output:
Warning: array_merge(): Argument #2 is not an array in /usr/share/cacti/site/poller.php on line 61
Warning: Invalid argument supplied for foreach() in /usr/share/cacti/site/poller.php on line 115
sh: -: not found
11/05/2008 11:29:03 AM - SYSTEM STATS: Time:0.0096 Method:cmd.php Processes:1 Threads:N/A Hosts:0 HostsPerProcess:0 DataSources: RRDsProcessed:0
Anyone have any idea what I should do?
Thanks,
-Scott
Reinstalled again after purge
So, I uninstalled everything again, and used dpkg --purge to get rid of everything instead of just manually deleting everything, and this seemed to help as I was asked all the initial questions during the install. However, I got a strange notice:
I am going to cross-post this to the ubuntu forums, just in case.
I am not entirely sure what this means. When I run the poller manually now I get this output on the command line:WARNING: include path for php has changed!
libphp-adodb is no longer installed in /usr/share/adodb. New installation path is now /usr/share/php/adodb.
Please update your php.ini file. Maybe you must also change your web-server configuration.
I also get this message when i point firefox at the cacti page:sh: -: not found
11/05/2008 02:04:05 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
11/05/2008 02:04:05 PM - SYSTEM STATS: Time:292.9695 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
Warning: pclose(): 48 is not a valid stream resource in /usr/share/cacti/site/lib/rrd.php on line 47
I would really love to get this working. If anyone can clue me in to what I'm doing wrong, I would be forever grateful.Fatal error: Call to undefined function mysql_pconnect() in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 376
I am going to cross-post this to the ubuntu forums, just in case.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Open a shell and type
If you don't see mysql listed, you are missing MySQL support in PHP.
TheWitness
Code: Select all
php -m
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?
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?
Thanks for your reply. Here is the output of php -m
php -m
[PHP Modules]
bcmath
bz2
calendar
ctype
date
dba
dom
exif
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mime_magic
mysql
mysqli
ncurses
openssl
pcntl
pcre
PDO
pdo_mysql
posix
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This is definately PHP configuration related. It may be that Unbuntu has a CLI php configuration and an Apache php configuration. If you create a little script that does the following:
phpinfo.php
<?php phpinfo(); ?>
Put it in the root of your web server and access it from a browser, do you also see references to the MySQL module, and is it configured correctly.
TheWitness
phpinfo.php
<?php phpinfo(); ?>
Put it in the root of your web server and access it from a browser, do you also see references to the MySQL module, and is it configured correctly.
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?
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?
Here is the only line that contains anything about mysql in phpinfo:TheWitness wrote:This is definately PHP configuration related. It may be that Unbuntu has a CLI php configuration and an Apache php configuration. If you create a little script that does the following:
phpinfo.php
<?php phpinfo(); ?>
Put it in the root of your web server and access it from a browser, do you also see references to the MySQL module, and is it configured correctly.
TheWitness
additional .ini files parsed /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/snmp.ini
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Is there a "major" section called "mysql" just like "snmp"? If not, it's a PHP configuration issue.
TheWitness
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?
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?
Hey sorry for the late reply. My phpinfo page doesn't have a major heading for SNMP or MYSQL. I do have both these directives in my php.ini:
Something I noticed when I restart apache2 with apache2ctl is that I get this warning twice:; Enable snmp extension module
extension=snmp.so
; Enable mysql exetension module
extension=mysql.so
[warn] module php5_module is already loaded, skipping
Who is online
Users browsing this forum: No registered users and 1 guest