Sunday, 25 August 2013

Why this error is showing?

Why this error is showing?

I'm facing a strange error sometimes on my php wap site! Its not
persistent, just occurs somwtimes & If I refresh page, error is went out
and normal page appears. I'm attaching errors screenshot-

172 line of fun.inc.php is-
return mysql_real_escape_string($str);
I'm pasting line 164 to 212 for better understanding
function clean($str)
{
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
$str = str_replace("<",'',$str);
$str = str_replace(">",'',$str);
}
return mysql_real_escape_string($str);
}
function regchars($word){
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
for($i=0;$i<strlen($word);$i++){
$ch = substr($word,$i,1);
$nol = substr_count($chars,$ch);
if($nol==0){
return true;
}
}
return false;
}
function nospace($word){
$pos = strpos($word," ");
if($pos === false){
return false;
}else{
return true;
}
}
function checknumber($word){
$chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
$ch = substr($word,0,1);
$sres = ereg("[0-9]",$ch);
$ch = substr($word,0,1);
$nol = substr_count($chars,$ch);
if($nol==0){
return true;
}
return false;
}
function registerform($ef)
{
$errl = "";
switch($ef)
{
Is its a problem of my code or problem from hosting server? How can I
prevent users from showing such code??

No comments:

Post a Comment