unable to add addresses with 172.17 in phpipam

Problems with the Windows version of XAMPP, questions, comments, and anything related.

unable to add addresses with 172.17 in phpipam

Postby snowflake235 » 31. July 2018 16:53

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
snowflake235
 
Posts: 2
Joined: 31. July 2018 16:51
XAMPP version: 7.25
Operating System: Windows Server 2016

Re: unable to add addresses with 172.17 in phpipam

Postby Altrea » 31. July 2018 17:27

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.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: unable to add addresses with 172.17 in phpipam

Postby snowflake235 » 31. July 2018 18:41

Ok..then how do u suggest i resolve this? As the tool really works well apart from this only anomaly!
snowflake235
 
Posts: 2
Joined: 31. July 2018 16:51
XAMPP version: 7.25
Operating System: Windows Server 2016

Re: unable to add addresses with 172.17 in phpipam

Postby Nobbie » 31. July 2018 19:51

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.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: unable to add addresses with 172.17 in phpipam

Postby Altrea » 31. July 2018 20:55

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
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 121 guests