PEAK XOOPS - php error in precheck.inc.php in englishin japanese

php error in precheck.inc.php

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/9/5 4:59
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
Previous post - Next post | Parent - Children.1 | Posted on 2005/9/6 6:46
GIJOE  ÀèǤ·³Áâ   Posts: 4110
All you have to do is updating the module.
Votes:91 Average:5.49
Previous post - Next post | Parent - Children.1 | Posted on 2005/9/14 14:26
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
Previous post - Next post | Parent - Children.1 | Posted on 2005/9/15 21:13
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
Previous post - Next post | Parent - Children.1 .2 | Posted on 2005/9/18 14:52
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
Previous post - Next post | Parent - No child | Posted on 2005/11/1 3:47
xavhmn  ¾åÅùʼ From: Athis mons, france  Posts: 36
up
Votes:81 Average:5.19
Previous post - Next post | Parent - Children.1 | Posted on 2005/11/29 14:42
GIJOE  ÀèǤ·³Áâ   Posts: 4110
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
Previous post - Next post | Parent - No child | Posted on 2005/12/3 5:25
xavhmn  ¾åÅùʼ From: Athis mons, france  Posts: 36
good job thanks
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/23 8:25
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
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/24 5:45
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Which version of XOOPS core do you use?
And tell me the value of "reliable IP address" in preference.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/24 14:22
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
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/27 4:09
GIJOE  ÀèǤ·³Áâ   Posts: 4110
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
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/27 5:06
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
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/27 5:37
GIJOE  ÀèǤ·³Áâ   Posts: 4110
The reult looks quite normal.
Is there the errors displayed still?
Votes:0 Average:0.00

question Re: php error in precheck.inc.php

msg# 1.2.1.1.1.1.1.1
Previous post - Next post | Parent - Children.1 | Posted on 2006/10/27 14:06
xavhmn  ¾åÅùʼ From: Athis mons, france  Posts: 36
work correctly
Votes:0 Average:0.00

question Re: php error in precheck.inc.php

msg# 1.2.1.1.1.1.1.1.1
Previous post - Next post | Parent - No child | Posted on 2006/10/28 5:47
GIJOE  ÀèǤ·³Áâ   Posts: 4110
Perhaps, some wrong data existed in the field.
I should modify the error handling of the place.
Votes:1 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!