msg# 1
xavhmn
From: Athis mons, france
Posts: 36
[03-Sep-2005 08:56:16] PHP Notice: unserialize(): Error at offset 9 of 50 bytes in l:\monsite\xoop\html\modules\protector\include\precheck.inc.php on line 44
[03-Sep-2005 08:56:16] PHP Warning: Invalid argument supplied for foreach() in l:\monsite\xoop\html\modules\protector\include\precheck.inc.php on line 46
Votes:118
Average:6.02
msg# 1.1
All you have to do is updating the module.
Votes:91
Average:5.49
msg# 1.1.1
xavhmn
From: Athis mons, france
Posts: 36
I removed the module, and reinstalled, but I always have the same problem
Votes:106
Average:5.75
msg# 1.1.1.1
Dave_L
From: Virginia, USA
Posts: 35
Line 44 of modules/protector/include/precheck.inc.php is:
$reliable_ips = unserialize( $conf['reliable_ips'] ) ;
To determine why that error is occuring, modify that code as follows and post the ouput:
var_dump('reliable_ips', $conf['reliable_ips']);
$reliable_ips = unserialize( $conf['reliable_ips'] ) ;
Votes:73
Average:4.66
msg# 1.1.1.1.1
xavhmn
From: Athis mons, france
Posts: 36
result:
string(12) "reliable_ips" string(19) "a:1:{i:0;s:0:\"\";}"
Votes:80
Average:4.88
msg# 1.1.1.1.1.1
xavhmn
From: Athis mons, france
Posts: 36
up
Votes:81
Average:5.19
msg# 1.1.1.1.1.2
hi hmn.
I'm sorry my late answer.
Prehaps, it is caused by two conditions.
Both:
- magic_quotes_gpc on
- buggy version of xoops core in sql escaping.
I've modified the precheck.inc.php in next version of Protector.
See you!
Votes:90
Average:5.56
msg# 1.1.1.1.1.2.1
xavhmn
From: Athis mons, france
Posts: 36
good job thanks
Votes:0
Average:0.00
msg# 1.2
xavhmn
From: Athis mons, france
Posts: 36
I have little error in debug mode
Notice: unserialize() [function.unserialize]: Error at offset 9 of 50 bytes in file /modules/protector/include/postcheck.inc.php line 24
Warning: Invalid argument supplied for foreach() in file /modules/protector/include/postcheck.inc.php line 25
Notice: unserialize() [function.unserialize]: Error at offset 9 of 20 bytes in file /modules/protector/include/postcheck.inc.php line 34
Warning: array_intersect() [function.array-intersect]: Argument #2 is not an array in file /modules/protector/include/postcheck.inc.php line 34
Warning: preg_match() [function.preg-match]: Unknown modifier '2' in file /modules/protector/class/protector.php line 545
Votes:0
Average:0.00
msg# 1.2.1
Which version of XOOPS core do you use?
And tell me the value of "reliable IP address" in preference.
Votes:0
Average:0.00
msg# 1.2.1.1
xavhmn
From: Athis mons, france
Posts: 36
i use xoops 2.0.14 and xoops 2.0.15
and reliable ip :^192.168.|127.0.0.1|66.249.72.
Votes:0
Average:0.00
msg# 1.2.1.1.1
I've just tested it with 2.0.15, I cannot catch it.
(work fine)
can you insert a line for debugging?
// reliable ips
var_dump( $conf['reliable_ips'] ) ;
$reliable_ips = unserialize( $conf['reliable_ips'] ) ;
foreach( $reliable_ips as $reliable_ip ) {
if( ! empty( $reliable_ip ) && preg_match( '/'.$reliable_ip.'/' , $_SERVER['REMOTE_ADDR'] ) ) {
return true ;
}
}
Votes:1
Average:0.00
msg# 1.2.1.1.1.1
xavhmn
From: Athis mons, france
Posts: 36
The result:
string(90) "a:4:{i:0;s:9:"^192.168.";i:1;s:9:"127.0.0.1";i:2;s:10:"192.168.1.";i:3;s:10:"66.249.72.";}"
Votes:0
Average:0.00
msg# 1.2.1.1.1.1.1
The reult looks quite normal.
Is there the errors displayed still?
Votes:0
Average:0.00
msg# 1.2.1.1.1.1.1.1
xavhmn
From: Athis mons, france
Posts: 36
work correctly
Votes:0
Average:0.00
msg# 1.2.1.1.1.1.1.1.1
Perhaps, some wrong data existed in the field.
I should modify the error handling of the place.
Votes:1
Average:10.00