June 23, 201213 yr Newbies Can someone give me a basic script to test the FM connection. I've tried an fx script and a filemaker.php script, and can't tell by the errors if it's connecting or not. Here are the two files I've tried: <?php error_reporting (E_ALL); define('DEBUG', true); require_once('FX.php'); require_once('FMErrors.php'); define('FM_IP', 'xxx.xxx.x.xxx'); define('FM_PORT', '80'); define('FM_VERSION', 'FMPro7'); define('FM_USERNAME', 'xxx'); define('FM_PASSWORD', 'xxx'); $returnCount=200; $instanceName=new FX(FM_IP, FM_PORT, FM_VERSION); $instanceName->SetDBData('Web_Forms', 'Orders_ListView', $returnCount); $instanceName->SetDBUserPass(FM_USERNAME, FM_PASSWORD); $instanceName->AddDBParam('Order_Number', "TSR179412"); $Result=$instanceName->FMFind(); echo $Result."<br>"; echo "Hello Trish 1"; The page I get has this: Accessing FileMaker Server 7+ data. Using FileMaker URL: http://web:[email protected]&-find Catchable fatal error: Object of class FX_Error could not be converted to string in E:InetpubwwwrootFormsBuildings.php on line 24 Clicking on the link takes me nowhere, so I’m not sure if it’s getting connected or not. The second script I tried was with filemaker.php: <?php require_once ('FileMaker.php'); $fm = new FileMaker(); $fm->setProperty('database', 'WEB_Forms'); $fm->setProperty('hostspec', 'http://xxx.xxx.x.xxx/'); $fm->setProperty('username', 'xxxxxxx'); $fm->setProperty('password', 'xxxxxxx'); $connected = $fm->listLayouts(); If(FileMaker::isError($connected)){ echo "not connected"; } else { echo 'connected'; } ?> and get this response: Warning: require_once(C:Program FilesFileMakerFileMaker ServerWeb Publishingpublishing-enginephpincludesImplementationParser/../../Layout.php) [function.require-once]: failed to open stream: No such file or directory in C:Program FilesFileMakerFileMaker ServerWeb Publishingpublishing-enginephpincludesImplementationParserFMResultSet.php on line 2 Fatal error: require_once() [function.require]: Failed opening required 'C:Program FilesFileMakerFileMaker ServerWeb Publishingpublishing-enginephpincludesImplementationParser/../../Layout.php' (include_path='.;C:Program FilesFileMakerFileMaker ServerWeb Publishingpublishing-enginephpincludes;E:InetpubwwwrootFormsFX;E:InetpubwwwrootFormsFileMaker;E:InetpubwwwrootFormsFileMakerImplementation') in C:Program FilesFileMakerFileMaker ServerWeb Publishingpublishing-enginephpincludesImplementationParserFMResultSet.php on line 2 13 minutes ago · Like
June 24, 201213 yr The error occurred before the php script connected to your database. In your Filemaker.php script, it appears that you do not have the correct path to FileMaker,php in your require_once() statement. There should be a FileMaker directory at the same level as FileMaker.php which contains a number of other required files which FileMaker.php is expecting to find. These would both have to be in the same directory as yourscript.php (because of your require_once path). That directory will have to be in the correct directory on the server, most likely E:Inetpubwwwroot. I am not familiar with FX.php, so I can't help on that side.
June 24, 201213 yr Author Newbies Finally fixed! I uninstalled FMS, rebooted and reinstalled FMS back onto the E: drive ... reset my IIS, and voila! All is tested and working as intended!
Create an account or sign in to comment