[FX.php List] Question about an FX error

Steve Winter steve at bluecrocodile.co.nz
Wed Mar 17 13:48:49 MDT 2010


Hi Bob,

The same diagnostic process still exists... do a print_r($findResult) at line 21, and this will tell you what's what FM is complaining about and therefore enable you to determine what's happening differently in lines 1 - 20 on the PHP 5 server...

Cheers
Steve


On 17 Mar 2010, at 19:45, Bob Patin wrote:

> 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
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Steve Winter
steve at bluecrocodile.co.nz
m: +44 77 7852 4776
3 Calshot Court, Channel Way
Ocean Village, Southampton SO14 3GR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20100317/6845439b/attachment.html


More information about the FX.php_List mailing list