April 18, 200619 yr Newbies The connection settings should be correct, when they weren't I would not get any response from the FM8 server. The firewall here is set up to allow communication between the web server on the outside and the FM server on the inside using port 80. $serverIP = '***.***.**.*'; //Public Address for Web Server $webCompanionPort = 80; // for FM7SA, this should be the web server port $dataSourceType = 'FMPro7'; $webUN = '**username**'; // defaults for Book_List in FM7; both should be blank for Book_List in FM5/6 $webPW = '**password**'; if (strtolower($dataSourceType) == 'fmpro7') { $CedarwoodFile = "CEDARWOOD.fp7"; } else { $CedarwoodFile = 'Cedarwood.fp7'; } $scheme = 'http'; // generally this will be 'http'; 'https' for SSL connections to FileMaker Here is the page requesting the info. $WQuery = new FX($serverIP, $webCompanionPort, $dataSourceType, $scheme ); $WQuery->SetDBUserPass($webUN, $webPW ); // These two I set in server_data.php $WQuery->SetDBData ($CedarwoodFile, "WebQuery"); $WQuery->AddDBParam("Approved", "Yes"); $WQuery->AddDBParam("IncludeWeb", "Yes"); $WQuery->AddDBParam('TargetAudience', 'Technology - Instructional'); $ReturnedData = $WQuery->FMFind(); echo $ReturnedData; print_r($ReturnedData); Result: ArrayArray ( [data] => Array ( ) [linkNext] => [linkPrevious] => [foundCount] => 0 [fields] => Array ( ) => http://*************/fmi/xml/FMPXMLRESULT.xml?-db=CEDARWOOD.fp7&-lay=WebQuery&-max=50&Approved=Yes&IncludeWeb=Yes&TargetAudience=Technology+-+Instructional&-find [query] => [errorCode] => 802 [valueLists] => Array ( ) ) Please help me determine where I am going wrong here. Edit: I am using FX.PHP Edited April 18, 200619 yr by Guest
April 18, 200619 yr Hi, Try changing your query to the following $WQuery = new FX($serverIP, $webCompanionPort, $dataSourceType, $scheme ); $WQuery->SetDBPassword($webPW, $webUN ); // These two I set in server_data.php $WQuery->SetDBData ($CedarwoodFile, "WebQuery"); $WQuery->AddDBParam("Approved", "Yes"); $WQuery->AddDBParam("IncludeWeb", "Yes"); $WQuery->AddDBParam('TargetAudience', 'Technology - Instructional'); $ReturnedData = $WQuery->FMFind(); The SetDBPassword is the correct format for the FX command, not SetDBUserPass. Also, the password is always first, followed by the username
Create an account or sign in to comment