[FX.php List] testing connection to database

Tom Sepper tsepper at directorschoice.travel
Thu Mar 29 08:04:18 MDT 2007


This is interesting.  How much overhead does something like this add to
the load/response time? 


---
Tom Sepper
Director of Information Technology
Director's Choice Tour & Travel

P 806.762.6354
F 806.763.7637

tsepper at directorschoice.travel
http://www.directorschoicetourandtravel.com



-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Alex Gates
Sent: Thursday, March 29, 2007 8:27 AM
To: 'FX.php Discussion List'
Subject: [FX.php List] testing connection to database

Hi everyone-

What methods are you using to test the connection to the database?


I'm trying this:

                                           
include_once('FX/FX.php');						
include_once('FX/server_data.php');
include_once('FX/FX_Error.php');


$testfind=new FX($serverIP, $webCompanionPort, 'FMPro7');
$testfind->SetDBData('filename.fp7','layoutname');
$testfind->SetDBPassword('xxxxx','xxxxx');
$testfindResult=$testfind->FMFindany();
echo $testfindResult['errorCode'];



We had our FileMaker server go down this morning and I realized that I
didn't have any tests to the server.

I'd ultimately like to say
if($testfindResult['errorCode'] != 0) {

Send email to my mobile phone because there is a critical problem with
the server.

}


But instead of getting an error code, I get:

Fatal error: Cannot use object of type FX_Error as array...

Am I missing something simple?

Alex 


_______________________________________________
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