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
-
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 >?????
-
Its a problem with the "remove_modify" plugin, remove it and that should stop the problem.
-
cheers was worried i had broken it badly then !!!!
-
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 .......
-
Workaround as suggested in http://www.php.net/manual/en/function.strripos.php:
<?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( $haystack, 0, abs($offset) ) );
}
else{
$temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );
}
if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;
$pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );
return $pos;
}/* endfunction strripos */
}/* endfunction exists strripos */
?>
-
ok thanks for all your help