forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Tjnashster on May 29, 2008, 12:54:48 pm

Title: [Solved]: Fatal error: Call to undefined function: strripos() in /www/busin !!!!help!!!!
Post by: Tjnashster on May 29, 2008, 12:54:48 pm
please help every time you click on a picture all you get is Fatal error: Call to undefined function: strripos() in /www/business/8821/tom/plugins/remove_modify/codebase.php on line 11

what can i do to stop this >?????
Title: Re: Fatal error: Call to undefined function: strripos() in /www/busin !!!!help!!!!
Post by: just_some_guy on May 29, 2008, 02:06:26 pm
Its a problem with the "remove_modify" plugin, remove it and that should stop the problem.
Title: Re: Fatal error: Call to undefined function: strripos() in /www/busin !!!!help
Post by: Tjnashster on May 29, 2008, 03:43:50 pm
cheers was worried i had broken it badly then !!!!
Title: Re: [Solved]: Fatal error: Call to undefined function: strripos() in /www/busin !!!!help!!!!
Post by: Veronica on May 29, 2008, 07:39:56 pm
strripos() is a PHP 5 function only
You probably have an old version of PHP 4 installed
Upgrade to PHP 5 will remove your
Call to undefined function: strripos() in .......
Title: Re: [Solved]: Fatal error: Call to undefined function: strripos() in /www/busin
Post by: Joachim Müller on May 30, 2008, 07:05:56 am
Workaround as suggested in http://www.php.net/manual/en/function.strripos.php:
Code: [Select]
<?php

if(!function_exists("stripos")){
    function 
stripos(  $str$needle$offset 0  ){
        return 
strpos(  strtolower$str ), strtolower$needle ), $offset  );
    }
/* endfunction stripos */
}/* endfunction exists stripos */

if(!function_exists("strripos")){
    function 
strripos(  $haystack$needle$offset 0  ) {
        if(  !
is_string$needle )  )$needle chr(  intval$needle )  );
        if(  
$offset 0  ){
            
$temp_cut strrev(  substr$haystack0abs($offset) )  );
        }
        else{
            
$temp_cut strrev(    substr(   $haystack0max(  ( strlen($haystack) - $offset ), 0  )   )    );
        }
        if(   (  
$found stripos$temp_cutstrrev($needle) )  ) === FALSE   )return FALSE;
        
$pos = (   strlen(  $haystack  ) - (  $found $offset strlen$needle )  )   );
        return 
$pos;
    }
/* endfunction strripos */
}/* endfunction exists strripos */
?>
Title: Re: [Solved]: Fatal error: Call to undefined function: strripos() in /www/busin !!!!help!!!!
Post by: Tjnashster on June 26, 2008, 12:12:44 am
ok thanks for all your help