[FX.php List] PerformFMscript not performing?

Bob Patin bob at patin.com
Thu Mar 28 08:14:03 MDT 2013


Denis,

I don't think that this is unique to this being code to run a script, since 802, as Webko said, means it can't find the file.

Here's what I use in a web app right now:

$q = new FX( $serverIP, $webCompanionPort, $dataType, $scheme );
$q->SetDBData( $dbname4, 'web_order_lineitems' );
$q->SetDBPassword( $mpw, $mun );
$q->AddDBParam('_kf_orderID',$orderID);
$qResult = $q->FMFind();
				
if (FX::isError($qResult)){
   header('Location: tb_ticket_misc_error.php?e='.$qResult['errorCode']);
}

The first thing I'd do is make sure that your database name is being pulled in, along with all the other variables (assuming you're using a page to store all these). Once you know that it's finding the database, then I'd double-check the layout name...

I'm using a FIND here just for grins, but I've used an FMView before as well... I also send the errorCode to my error page so that I can display it somewhere on the page for debugging and reporting purposes.

Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker




On Mar 27, 2013, at 9:52 PM, Denis Somar <dsomar at gmail.com> wrote:

> Nope. All my other PHP FX queries are working fine with that setup though.  Thus I'm perplexed!  Thanks for taking a crack though.
> 
> D
> 
> On Wed, Mar 27, 2013 at 10:48 PM, Tim 'Webko' Booth <tim.webko at gmail.com> wrote:
> 802- Unalbe to open file
> 
> Incorrect database name, or user / password combo are the most common reasons for this.
> 
> Try a normal FX query.
> 
> Does the script need to talk to another file?
> 
> On 28 March 2013 13:45, Denis Somar <dsomar at gmail.com> wrote:
> Hi all,
> 
> What's the exact start to finish code for setting up a script to execute via FX.php?
> 
> I have
> 	$q = new FX( $serverIP, $webCompanionPort, $dataSourceType );
> 	$q->SetDBUserPass( $webUN, $webPW );
> 
> 	$q->PerformFMScript('09-mark-submitted-quote-lines');
> 
> And am not getting anything.  I also tried adding:
> 	$r = $q->FMEdit();
> 	$ErrorCode = $r['errorCode'];
> 
> And I keep getting an error 802.
> 
> Am lost so any help is appreciated!
> 
> Best,
> Denis
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20130328/c3025f75/attachment.html


More information about the FX.php_List mailing list