Getting error with PHP scripts ... cgi vs cli
Moderators: Developers, Moderators
Getting error with PHP scripts ... cgi vs cli
I saw that the ss_fping and ss_host* scripts all have the -q and disable errors, etc in them. However on PHP 4.3.11 I seem to have problems because I get the headers showing up!
I'm talking about the...
text\html
X-Powered-by: PHP
stuff... any way I can force it off in the php.ini? all google searches returned nothing helpful. I'm not sure if it's a bug or what... probably is. I need to update the version here, but thought I'd check here first.
Thanks,
-P
I'm talking about the...
text\html
X-Powered-by: PHP
stuff... any way I can force it off in the php.ini? all google searches returned nothing helpful. I'm not sure if it's a bug or what... probably is. I need to update the version here, but thought I'd check here first.
Thanks,
-P
uname -a
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
For 0.8.6g, please apply all patches at: http://www.cacti.net/downloads/patches/ ... re-patched
The respond on progress.
TheWitness
The respond on progress.
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?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
There are also modified versions of lib/ping.php and scripts/ss_fping.php as well as the Template here: http://forums.cacti.net/viewtopic.php?t=10049&start=30
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?
Infortunately didn't work ... this is what's in the log
11/28/2005 11:00:02 AM - CMDPHP: Poller[0] Host[2] DS[154] WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h
11/28/2005 11:00:02 AM - CMDPHP: Poller[0] Host[2] DS[154] SERVER: /var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 10.53.96.250 20 TCP 80, output: U
-P
11/28/2005 11:00:02 AM - CMDPHP: Poller[0] Host[2] DS[154] WARNING: Result from SERVER not valid. Partial Result: Content-type: text/h
11/28/2005 11:00:02 AM - CMDPHP: Poller[0] Host[2] DS[154] SERVER: /var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 10.53.96.250 20 TCP 80, output: U
-P
uname -a
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Syntax looks good, what happens when you debug the script server?
1) "php script_server.php" (cgi version)
2) /var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 10.53.96.250 20 TCP 80
3) "quit"
Between 2 and 3, you should have gotten a response.
TheWitness
1) "php script_server.php" (cgi version)
2) /var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 10.53.96.250 20 TCP 80
3) "quit"
Between 2 and 3, you should have gotten a response.
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?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I also need to update lib/poller.php. We introduced some timeout logic that appears to be very unhappy in PHP. Will rip out and repost. Just send me a PM reminder as it's early morning and I'm about to goto work.
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?
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This is the problem:
TheWitness
This is quite ODD. The script server simply includes a file and run's, why it's generating the stuff that's supposed to be suppressed by "-q" is perplexing.Content-type: text/html
X-Powered-By: PHP/4.3.11
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?
I still haven't fixed this but I notice that this error occurs on the ss_host_disk.php file for certain hosts only. This tells me that something is cached somewhere. Now I cleared the poller, but that didn't help, so I'm wondering how I can do that manually (and safely) to test.
TheWitness: I saw you tried to msg me, but I was already at home... I'm in London =P I will try to get in touch with you somehow.
Thanks,
-P
TheWitness: I saw you tried to msg me, but I was already at home... I'm in London =P I will try to get in touch with you somehow.
Thanks,
-P
uname -a
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
You may need to place the "I'm running command line mode" directive at the head of the two files:
ss_fping.php and script_server.php
Try both of those and let me know if you have any luck. I have not access to IM this morning.
TheWitness
ss_fping.php and script_server.php
Try both of those and let me know if you have any luck. I have not access to IM this morning.
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?
I am seeing some REALLY strange behaviour like ss_host_cpu showing information that I would imagine would get returned by the ss_fping.php script. ie, min, ave, max, dev, loss ...
I am confused. =\
Do I need to clear out the poller cache?
BTW here's the sample
12/06/2005 04:20:02 PM - CMDPHP: Poller[0] Host[3] DS[23] SERVER: /var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0, output: min:0.1900 avg:0.2430 max:0.5300 dev:0.0792 loss:0.0000
When I run it manually
php -q ../script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
99
-P
I am confused. =\
Do I need to clear out the poller cache?
BTW here's the sample
12/06/2005 04:20:02 PM - CMDPHP: Poller[0] Host[3] DS[23] SERVER: /var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0, output: min:0.1900 avg:0.2430 max:0.5300 dev:0.0792 loss:0.0000
When I run it manually
php -q ../script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
99
-P
uname -a
I ran it manually...
php -q script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 127.0.0.1 20 ICMP
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
min:0.1900 avg:0.2095 max:0.3200 dev:0.0392 loss:0.0000
99
/var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 127.0.0.1 20 ICMP
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
min:0.1900 avg:0.2050 max:0.3200 dev:0.0292 loss:0.0000
99
php -q script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 127.0.0.1 20 ICMP
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
min:0.1900 avg:0.2095 max:0.3200 dev:0.0392 loss:0.0000
99
/var/www/html/cacti-0.8.6g/scripts/ss_fping.php ss_fping 127.0.0.1 20 ICMP
/var/www/html/cacti-0.8.6g/scripts/ss_host_cpu.php ss_host_cpu 10.53.98.145 3 1:161:800:pbulteel:::MD5::[None] get usage 0
min:0.1900 avg:0.2050 max:0.3200 dev:0.0292 loss:0.0000
99
uname -a
Who is online
Users browsing this forum: No registered users and 0 guests