I have tried installing DBFM on two sites: a freshly built and an existing. Both times I received an error of "Fatal error: Call to undefined function: stripos() in /nfs/c02/h02/mnt/19665/domains/website.website.net/html/modules/CONTRIB/dbfm/dbfm.module on line 242" I have installed the appropriate supporting modules required. The only way to regain access to the site is to delete the module. Any ideas what could be causing this?

Comments

rooey’s picture

You need PHP5.

dhw1179’s picture

Status: Active » Closed (fixed)

Thanks, just realized that my server defaults to PHP4 on all sites thought PHP 5 is available.

breitner’s picture

Title: Unable to install » Unable to install
Version: 5.x-3.3 » 5.x-4.3
Status: Closed (fixed) » Active

For PHP4:

Search in dbfm.module and dbfmgreybox.module for the line with the function stripos().
Insert following code (in the line befor stripos):

if (!function_exists('stripos')) {
function stripos($string,$word){
$retval = false;
for($i=0;$i<=strlen($string);$i++) {
if (strtolower(substr($string,$i,strlen($word))) == strtolower($word)) {
$retval = true;
}
}
return $retval;
}
}

rooey’s picture

Status: Active » Closed (works as designed)