Page 1 of 1

unable to add addresses with 172.17 in phpipam

PostPosted: 31. July 2018 16:53
by snowflake235
long2ip() under XAMPP is broken.... The below should print 200.0.0.0.
Please file a bug report with the XAMPP team.
# php -a
Interactive shell
php > print long2ip('3355443200');
PHP Warning: long2ip() expects parameter 1 to be integer, string given in php shell code on line 1
PHP Stack trace:
PHP 1. {main}() php shell code:0
PHP 2. long2ip() php shell code:1

Warning: long2ip() expects parameter 1 to be integer, string given in php shell code on line 1

Call Stack:
39.6715 375288 1. {main}() php shell code:0
39.6715 375288 2. long2ip() php shell code:1

Re: unable to add addresses with 172.17 in phpipam

PostPosted: 31. July 2018 17:27
by Altrea
http://php.net/manual/en/function.long2ip.php wrote:Note:

On 32-bit architectures, casting integer representations of IP addresses from string to integer is not suppossed to give correct results for numbers which exceed PHP_INT_MAX.

Re: unable to add addresses with 172.17 in phpipam

PostPosted: 31. July 2018 18:41
by snowflake235
Ok..then how do u suggest i resolve this? As the tool really works well apart from this only anomaly!

Re: unable to add addresses with 172.17 in phpipam

PostPosted: 31. July 2018 19:51
by Nobbie
snowflake235 wrote:Ok..then how do u suggest i resolve this? As the tool really works well apart from this only anomaly!


1) First of all, you applied wrong parameter, you applied a string instead an integer. Leaf out that useless single quotes.
2) If it stll does not work, use Linux instead of Windows, Xampp comes in 64bit for Linux.

Re: unable to add addresses with 172.17 in phpipam

PostPosted: 31. July 2018 20:55
by Altrea
Alternatively you could install and configure Apache, PHP, MySQL etc all on their own and optimized against your requirements.

Or include a 64bit php installation into XAMPPs Apache

Or search for a webserver stack thst compiles all components in 64 bits

Or ask the developer of this application for a workaround

There are many ways to handle this specific problem, but none of them are in scope of support here in this forum except using xampp for linux instead