February 26, 200817 yr Is there any reason this code would not work. It's driving me mad after spending an entire day trying to get it to run a script! There are no problems with the connection to the database, the layout and the script exists. The script is web compatible. I don't see any errors just a blank screen and looking at the database the script has not run. If I run the script from the client it works fine. Am I being dumb here? I think I have the latest api - downloaded the server installation package at the beginning of the month (fms_9.0v3_full_ESD) <?php require_once('include/FileMaker.php'); require_once('include/commonFunctions.inc.php'); $DB_HOST = 'localhost'; $DB_NAME = 'Sem_data'; $DB_USER = ''; $DB_PASS = ''; $webReg = new FileMaker($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS); $fmresult = $webReg->newPerformScriptCommand('delegates','test'); $fmresult->execute(); ?>
March 3, 200817 yr Username / Password? Easiest way to check what's wrong is to trap for an error e.g.: require_once('include/FileMaker.php'); require_once('include/commonFunctions.inc.php'); $DB_HOST = 'localhost'; $DB_NAME = 'Sem_data'; $DB_USER = ''; $DB_PASS = ''; $webReg = new FileMaker($DB_NAME, $DB_HOST, $DB_USER, $DB_PASS); $fmresult = $webReg->newPerformScriptCommand('delegates','t est'); $fmresult->execute(); if( FileMaker::isError($fmresult) ) echo $fmresult->getCode().': '.$fmresult->getMessage();
March 3, 200817 yr Author Thanks, I'm the idiot - I had not given the script a starting layout assuming that the layout specified in the php call to the script would work and that the first record would automatically be selected. By adding a goto layout script step and some finding to get to the right record (passed to the script as a parameter) I managed to get it to work. Cheers Pete
Create an account or sign in to comment