64bit hex count converting to int causes php problem

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
pjm
Posts: 1
Joined: Mon Feb 23, 2009 8:23 pm

64bit hex count converting to int causes php problem

Post by pjm »

My problem is the following. I'm getting hex values and converting to INT gives me problems.

I'm actually using the template for the general san fibre alliance mibs. ( http://forums.cacti.net/viewtopic.php?t ... ght=mcdata )
The issue turns out to be the values are 64bit values in hex. The largest INT value in php is not 64bit compliant and hence my problem.

I actually created a perl script to convert the value but I'm wondering if anyone has had this problem and come up with a more elegant solution.

-Pierre
dalaro
Posts: 8
Joined: Wed Jun 18, 2008 1:06 pm

Post by dalaro »

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

HEX conversion lately was treated by cacti087d. Don't know if this solves your problem, but I encourage you to try it out
Reinhard
scruboy01
Cacti User
Posts: 74
Joined: Tue Apr 05, 2005 11:33 am
Location: Grand Rapids, MI, US

Post by scruboy01 »

I just re-loaded some queries that have hex values in them and noticed that it does now list them as a hex value. Is there a way in the template or resource file to specify that the value will be hex and to convert it to decimal? Ex: IP - hex to dotted decimal
frankfegert
Posts: 28
Joined: Fri Nov 16, 2007 1:55 pm
Location: Stuttgart, Germany

Re: 64bit hex count converting to int causes php problem

Post by frankfegert »

Hello,
pjm wrote:My problem is the following. I'm getting hex values and converting to INT gives me problems.

I'm actually using the template for the general san fibre alliance mibs. ( http://forums.cacti.net/viewtopic.php?t ... ght=mcdata )
The issue turns out to be the values are 64bit values in hex. The largest INT value in php is not 64bit compliant and hence my problem.

I actually created a perl script to convert the value but I'm wondering if anyone has had this problem and come up with a more elegant solution.

-Pierre
had the same problem, see http://bugs.cacti.net/view.php?id=1587 for a quick'n'dirty fix.

Best regards,

Frank
Post Reply

Who is online

Users browsing this forum: fpiorek and 5 guests