[FX.php List] Question about an FX error

Bob Patin bob at patin.com
Wed Mar 17 13:45:58 MDT 2010


Line 22 is just an IF statement:

if ($findResult['foundCount']>0){

This is a little login script that has been working fine for several years...

Even when we login with a known username/password, we get that error; if she puts it on Tiger Server, exact same database, same pages, it works fine.

So I know it's not the script itself, which is below; this has to be a setting in PHP 5 that's different on her new server. 

include_once("FX/FX.php");
include_once("FX/server_data.php");

$email = $_POST['email'];
$password = $_POST['password'];

if ((strlen($email)<1) or (strlen($password)<1)){
	include_once('login_error.htm');
	exit;
}

$find = new FX($serverIP,$webCompanionPort, $dataType, $scheme);
$find -> SetDBData($dbname , "web");
$find -> SetDBPassword($webPW,$webUN);
$find->AddDBParam('Work_Email','=='.preg_replace('/([@*#?!=<>"])/','\\\${1}',$email));
$find->AddDBParam('Password','=='.preg_replace('/([@*#?!=<>"])/','\\\${1}',$password));
$findResult=$find->FMFind();

if ($findResult['foundCount']>0){
	foreach($findResult['data'] as $key=>$findData);
	  // sets a bunch of session variables here... 
}else{
	// goes to the error page, sets a session variable here...
	include_once('login_error.htm');
}



On Mar 17, 2010, at 2:25 PM, Joel Shapiro wrote:

> Hey Bob
> 
> What's on line 22?
> 
> -Joel
> 
> 
> On Mar 17, 2010, at 12:20 PM, Bob Patin wrote:
> 
>> I have a client who just moved from Tiger Server to Leopard Server which runs PHP5, and now a simple little login script is showing this error:
>> 
>> Fatal error: Cannot use object of type FX_Error as array in /Volumes/dbraid/WebServer/Documents/php8/ccpsnew/login_process.php on line 22
>> 
>> I'm thinking that it's a PHP setting that's different in 5, but I don't know what it might be; does anyone have an idea what is different in PHP5's defaults in Leopard Server that might cause this?
>> 
>> Thanks,
>> 
>> Bob Patin
>> bob at patin.com
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list