Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6101 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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();

?>

Posted

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();

Posted

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

This topic is 6101 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.