Pb with IP > 127.0.0.0

nico059 - June 19, 2008 - 17:26
Project:ipAuthenticator - authenticates an IP to a role
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi Jonathan,

my IP was greter thant 127.0.0.0 (207.x.x.x), when i recorder this ip, the ip recorded in the BD is 0.0.0.0 ....

The probleme is that that the php function ip2lon return a negative number (on my windows pc, and mac OS X server), then it can't be recorded in the database column (int(10), unsigned
).
I changed manually the mysql column type to int(10) (negative and positive) and every thing work No 1 !!!
Thx for your module

in the install this should be something like that (not tested ...)

'ip1' => array(
'description' => t('contains the first IP address'),
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE
),
'ip2' => array(
'description' => t('contains the second IP address'),
'type' => 'int',
'unsigned' => FALSE,
'not null' => TRUE
),

Regards !

#1

jonfrancisskydiver - July 11, 2008 - 15:55

Could you send me the PHP version that you are using? I haven't had this issue with the default install.
Thanks,
Jonathan

#2

jptavan - July 15, 2008 - 22:30

Same problem/solution for me, with PHP Version 5.2.6 and 4.4.8.

It work after reinstalling the module with the suggested change in ip_authenticator_schema ('unsigned' => FALSE).

 
 

Drupal is a registered trademark of Dries Buytaert.