[FX.php List] I need a refresher

Steve Winter steve at bluecrocodile.co.nz
Fri Dec 9 00:20:21 MST 2011


Hi John

I feel like I'm in a parallel universe here…!

The username/password thing must be a red herring (UK expression, umm, misleading variable?) since you have them just as 'wrong' in the case where it does work, so that can't be the issue.

As I said yesterday 507 is data validation by calculation failure. As I said almost every time I see that error it's the DataGuard plugin. Well, DataGaurd - SynDek, same dog, different name (umm, NZ expression, you say tomato I say tomato etc etc).

The way both of those systems work is to use a validation calculation to call a plugin - if the plugin isn't there, then the va;libation returns 0, and you get error 507.

The plugin can either be on the local machine, or on the server, but for web access the plugin needs to be double-installed on the server, once in the  regular server plugins folder, once in a special web plugins folder (which depending on your version of FMS moves around a bit, and may not exist).

I've had a quick look on the SyncDek site, but they seem to have changed their documentation and made it non-searchable so I can't seem to find the instructions, but to do a quick test to sees that this is what's mucking things up, locate the SyncDek field SyncDek_ModDateTime and turn off the validation on that field and try again, I've got 2p that says with that turned off it'll work…

Then all you need to do is find out how you enable SyncDek for web access and all will be well again...

Cheers
Steve


> Hey guys thanks for your brain power on this. Tomorrow I will try switching PW & UN. I have never had trouble in the past with this.
> But I did just think of a possible issue with the FM table I am using.
> The table is in a solution that uses SyncDek to sync data to India and SyncDek requires a special field for a primary key and I wonder if that calculated field is preventing editing from XML. (The FileMaker client requires a plugin to be present for data entry)
> I will switch tables and test the exact script, I bet it will work.
> Thanks again,
> John
> 
> 
> On 12/8/11 9:55 PM, "Bob Patin" <bob at patin.com> wrote:
> 
>> That *is* interesting; somewhere in the past I had username & pw backwards and it just didn't do anything at all... but I don't remember what the error message was. In fact, as I think of it, I don't think it returned any error code...
>> 
>> 
>> Bob Patin
>> Longterm Solutions LLC
>> P.O. Box 3408
>> Brentwood, TN 37024
>> bob at longtermsolutions.com
>> 615-333-6858
>> http://www.longtermsolutions.com
>> iChat: bobpatin
>> AIM: longterm1954
>> Twitter: bobpatin
>> Google+: http://www.longtermsolutions.com/plus
>> --
>> FileMaker 9, 10 & 11 Certified Developer
>> Member of FileMaker Business Alliance and FileMaker TechNet
>> --
>> FileMaker hosting and consulting for all versions of FileMaker
>> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>> On Dec 8, 2011, at 9:27 PM, Jonathan Schwartz wrote:
>> 
>>> Agreed...so how is the Find query getting results using the same flawed parameter setting?
>>> 
>>> Jonathan Schwartz
>>> Exit 445 Group
>>> 415-370-5011
>>> 
>>> On Dec 8, 2011, at 16:37, Bob Patin <bob at patin.com> wrote:
>>> 
>>>> Jonathan's exactly right; password first, then username.
>>>> 
>>>> 
>>>> Bob Patin
>>>> Longterm Solutions LLC
>>>>  <mailto:bob at longtermsolutions.com> bob at longtermsolutions.com
>>>> 615-333-6858
>>>>  <http://www.longtermsolutions.com/> http://www.longtermsolutions.com <http://www.longtermsolutions.com/> 
>>>> FileMaker 9, 10 & 11 Certified Developer
>>>> Member of FileMaker Business Alliance and FileMaker TechNet
>>>> --
>>>> Twitter: bobpatin
>>>> Google+:  <http://www.longtermsolutions.com/plus> http://www.longtermsolutions.com/plus
>>>> AIM: longterm1954
>>>> iChat: bobpatin
>>>> --
>>>> Expert FileMaker Consulting 
>>>> FileMaker Hosting for all versions of FileMaker
>>>> 
>>>> On Dec 8, 2011, at 6:01 PM, Jonathan Schwartz wrote:
>>>> 
>>>>> John,
>>>>> 
>>>>> Two suggestions:
>>>>> 
>>>>> 1) check the order of parameters for SetDBUserPass. Doesn't the Pass come first?
>>>>> 
>>>>> 2) Reduce the problem query to just an edit request on a single record. Hardcore the recid. At least you will know that you are dealing with a single issue, rather than  one involving a query and edit of multiple records on a loop.
>>>>> 
>>>>> Try that and see where you get. 
>>>>> 
>>>>> Jonathan Schwartz
>>>>> Exit 445 Group
>>>>> 415-370-5011
>>>>> 
>>>>> On Dec 8, 2011, at 11:21, John Funk < <mailto:jfunk at criticalsolution.com> jfunk at criticalsolution.com> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> I am a bit rusty at PHP and FX....I have some code below that I need to figure out why I keep getting an error 507 error.
>>>>>> The script works “getting” the three FileMaker records that match the $Item string.
>>>>>> I just cannot figure out why it will not edit the record with the $RecID
>>>>>> Thanks for any help.
>>>>>> John Funk
>>>>>> 
>>>>>> <?php
>>>>>> require_once ('FX/FX.php');
>>>>>> require_once ('FX/server_data.php');
>>>>>> define('DEBUG', True); 
>>>>>> 
>>>>>> //Get Item Info from URL
>>>>>> $Item=$_REQUEST['Item'];
>>>>>> $Date=$_REQUEST['Date'];
>>>>>> 
>>>>>> //echo "Item=".$Item.'<br>';
>>>>>> //echo "Date=".$Date.'<br>';
>>>>>> //exit;
>>>>>> 
>>>>>> //GETTING THE ARRAY OF RECORDS WORKS
>>>>>> $groupSize='10';
>>>>>> $request = new FX($ServerIP, $Port, $DataSourceType);
>>>>>> $request->SetDBData($fmdb,'XML_Items',$groupSize);
>>>>>> $request->SetDBUserPass($fmAccount, $fmPass);
>>>>>> $request->AddDBParam('ItemNumber_Prism', "=".$Item);
>>>>>> $result =$request->FMFind();
>>>>>> $records =$result['data'];
>>>>>> 
>>>>>> foreach($records as $record)
>>>>>> {
>>>>>> $RecID=$record['recid'][0];
>>>>>> $TCIN=$record['ItemNumber_Prism'][0];
>>>>>> $ASIN=$record['ASIN_Prism'][0];
>>>>>> $ImageUploadedDate=$record['ImageUploadedDate'][0];
>>>>>> $Notes=$record['Notes'][0];
>>>>>> 
>>>>>> //EDITING THE EACH RECORD DOES NOT WORK
>>>>>> $request = new FX($ServerIP, $Port, $DataSourceType);
>>>>>> $request->SetDBData($fmdb,'XML_Items',1);
>>>>>> $request->SetDBUserPass($fmAccount, $fmPass);
>>>>>> $request->AddDBParam('-recid', $RecID);
>>>>>> $request->AddDBParam('Notes', ‘TEST’);   //FAILS HERE with 507
>>>>>> $result = $request->FMEdit();
>>>>>> 
>>>>>> }
>>>>>> 
>>>>>> ?>
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> FX.php_List mailing list
>>>>>>  <mailto:FX.php_List at mail.iviking.org> FX.php_List at mail.iviking.org
>>>>>>  <http://www.iviking.org/mailman/listinfo/fx.php_list> http://www.iviking.org/mailman/listinfo/fx.php_list
>>>>> _______________________________________________
>>>>> FX.php_List mailing list
>>>>>  <mailto:FX.php_List at mail.iviking.org> 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
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz



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


More information about the FX.php_List mailing list