July 21, 200916 yr Greetings FMers, I am experiencing some odd behavior I am trying to track down and document. I am using PHP Site Assistant to generate a web interface (iPhone, actually) for a FileMaker Server 10 Advanced hosted table. When I generated an 'out of the box' full PHP site, I was unable to edit records in my table. Submitting the edited record invariably bumped me back to a PHP login screen. It took near forever to figure out that it wasn't a permissions problem and trace it to the validation of a few fields in my table. (is there a debug option somewhere that I am missing that will report what actual errors are occurring? I build these into my PHP/Perl Scripts!) Specificly, if I set any field to validate and require 'not empty', AND the value for that field does NOT change on the web form, it causes my PHP edit record script to bail out to the login screen. I've double checked that the approriate fields are displayed, have values, and such. If I do change the value of the field on the web form, than the edit will work, even with the 'not empty' validation. The validation works appropriately when I am using FileMaker natively. If I turn off 'not empty' validation, and instead validate by calculation = not IsEmpty(field) my PHP edit scripts work fine. So what am I missing that PHP barfs on any field validated by 'not empty'? or is it truly a bug? BTW, I'm running Server 10 Advanced 10.0.1.64; I see that there are updates available, and will get those installed soon. I didn't see a patch that enumerated this problem among them. Thanks for your thoughts. Tony
July 21, 200916 yr (is there a debug option somewhere that I am missing that will report what actual errors are occurring? I build these into my PHP/Perl Scripts!) Yes if an error occurs The API will return a Filemaker_Error object (it's an extension of PEAR_Error) you can check for it with the static isError() function in the Filemaker Class e.g. $result = $record->commit(); if (FileMaker::isError($result)) { echo 'Error: (' . $result->getCode() . ') ' . $result->getMessage() . "n"; exit; } As to the rest of your post, I haven't run into this so I'm afraid I can't be of much help there. It certainly sounds like a bug though. Edited July 21, 200916 yr by Guest
July 29, 200916 yr Author *bump* Can anyone report that they are using FileMaker PHP and can successfully validate records with a field rule of "not Empty"?
July 30, 200916 yr The attached works for me with: FM Server Version 10.0.1.64 on IIS / Win2K3 PHP code on LAMP My general feeling on tweaking the SA code is that you'll spend more time fixing unintended consequences than building what you need from scratch. My guess is that's what's at play here. testNotEmptyValid.zip
Create an account or sign in to comment