Mactrack not returning IPs, script stops after PHP warning
Moderators: Developers, Moderators
Mactrack not returning IPs, script stops after PHP warning
Hello,
I'm having a problem with a new install of Mactrack where no IPs are being returned. I initially had the problem on a Cat6509 w/sup720, but to rule out device type, i also tried a 3800 router, and that had the same problem. I'm using the get_standard_arp_table function, and when running mactrack_scanner.php, i get an error "PHP Warning: Parameter 2 to get_standard_arp_table() expected to be a reference, value given in /usr/share/cacti/plugins/mactrack/mactrack_scanner.php on line 192". The last line of the debug results for both scans is "DEBUG: Scanning function is 'get_standard_arp_table'". I did try to downgrade the mactrack_cisco.php file to the one from mactrack v2.4 as mentioned in http://forums.cacti.net/about36226.html , however this didn't make a difference. I'll attach the debug results of the 6509 scan.
Thanks for your help,
Nick
I'm having a problem with a new install of Mactrack where no IPs are being returned. I initially had the problem on a Cat6509 w/sup720, but to rule out device type, i also tried a 3800 router, and that had the same problem. I'm using the get_standard_arp_table function, and when running mactrack_scanner.php, i get an error "PHP Warning: Parameter 2 to get_standard_arp_table() expected to be a reference, value given in /usr/share/cacti/plugins/mactrack/mactrack_scanner.php on line 192". The last line of the debug results for both scans is "DEBUG: Scanning function is 'get_standard_arp_table'". I did try to downgrade the mactrack_cisco.php file to the one from mactrack v2.4 as mentioned in http://forums.cacti.net/about36226.html , however this didn't make a difference. I'll attach the debug results of the 6509 scan.
Thanks for your help,
Nick
- Attachments
-
- scanner.txt
- Scanner debug output from Cat6509
- (41.83 KiB) Downloaded 374 times
I have the same Problem here with an linux router:
After I change
to
I runs here fine
After I change
Code: Select all
function get_standard_arp_table($site, &$device) {
Code: Select all
function get_standard_arp_table($site, $device) {
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That's really odd. Have to see what is going wrong. There should be nothing wrong with that function declaration unless the $device is uninitialized.
What versions of PHP are you all running?
What versions of PHP are you all running?
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?
hy,
here ist is debian:
Could it an php5.3 issue?
here ist is debian:
Code: Select all
root@lanmgr:[~] > php -v
PHP 5.3.2-1 with Suhosin-Patch (cli) (built: Mar 13 2010 22:18:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
root@lanmgr:[~] >
God!Panther_1 wrote:I have the same Problem here with an linux router:
After I change
toCode: Select all
function get_standard_arp_table($site, &$device) {
I runs here fineCode: Select all
function get_standard_arp_table($site, $device) {
i change "($site, $device)" to "($site, &$device)" and it works!
root@Cacti:/usr/share/cacti/site/plugins/mactrack# php -v
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:01:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
root@Cacti:/usr/share/cacti/site/plugins/mactrack#
Thanks guys, fixed for me too!
# php -v
PHP 5.3.2-pl0-gentoo (cli) (built: Jul 12 2010 23:45:52)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Code: Select all
# diff mactrack_functions.php.orig mactrack_functions.php
333c333
< function get_standard_arp_table($site, &$device) {
---
> function get_standard_arp_table($site, $device) {
2196c2196
< function get_netscreen_arp_table($site, &$device) {
---
> function get_netscreen_arp_table($site, $device) {
PHP 5.3.2-pl0-gentoo (cli) (built: Jul 12 2010 23:45:52)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This will be fixed a little differently in 2.9.
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?
Who is online
Users browsing this forum: No registered users and 3 guests