1 2 3 Previous Next 30 Replies Latest reply on Dec 8, 2016 5:54 AM by ajk

    two server installation cwp and value lists

    ajk

      Hello,

       

      Is anyone successfully running a two server combination with a worker, and master machine hosting a PHP CWP solution? Were there any issues you encountered trying to get this setup to work?

       

      I have got a couple of Windows 2012r2 based machines and I've installed the latest version of FileMaker Server 15 and installed the worker process on another worker machine. The deployment seemed to go OK without any issue. The PHP installation is the one that came with FileMaker Server, v5.5.31 with only the curl extension enabled. No matter what I do, my PHP valuelists don't appear to be working, the system generates a system 500 error with anything relating remotely to valuelists.

       

      My code (i.e. pages with value lists) was working fine on a single install of FileMaker Server, could there be a PHP API bug in the deployment or CWP over two machines? So far as far as I can see, I can retrieve, data from fields and layout names, but I can't retrieve valuelists and I've double checked the valuelist exists on my layout and php security allows you to access the valuelist.

       

      Both machines have SSL on, if that makes a difference.

       

      Thanks

        • 1. Re: two server installation cwp and value lists
          Johan Hedman

          You need one unique set of Worker and Master FMS. You can not have many Master use CWP on different Worker.

          • 2. Re: two server installation cwp and value lists
            ajk

            Yes, my installation of Master and Worker are unique. It all seems to work ok apart from displaying value lists With api for php

            • 3. Re: two server installation cwp and value lists
              Johan Hedman

              the PHP ini,file that comes with the installation of PHP could be different on each Worker. Check them out

              • 4. Re: two server installation cwp and value lists
                ajk

                I enclose a sample of a very simple script to retrieve all valuelists on a layout. It works in FileMaker Server 11 but not in FileMaker Server 15

                 

                require_once('FileMaker.php');

                 

                  $fm = new FileMaker();

                  $fm->setProperty('database', 'x);

                  $fm->setProperty('hostspec', 'x');

                  $fm->setProperty('username','x');

                  $fm->setProperty('password','');

                 

                  $findCommand = $fm->newFindCommand('Web_Members');

                  $findCommand->addFindCriterion('MemberID', '1');

                 

                  $result = $findCommand->execute();

                 

                  $row = current($result->getRecords());

                 

                  $layout = $fm->getLayout('Web_Members');

                 

                  $valueListNames = $layout->listValueLists();

                  echo '<p><pre>'.print_r ($valueListNames).'</pre></p>';

                • 5. Re: two server installation cwp and value lists
                  jkipling

                  Hi ajk,

                   

                  I saw your comment on my post about ampersands in value lists.

                   

                  What happens when you try the following command:

                  $layout->getValueList("actualValueList")

                  Where "actualValueList" is the exact name of a value list that is used as a drop down list for one of the fields on your $layout 'Web_Members'?

                   

                  Try to echo the results of that and see if you get an object array, or another Error 500.

                  • 6. Re: two server installation cwp and value lists
                    ajk

                    Hi jkipling,

                     

                    Thanks for posting. I've added $layout->getValueList("YESNO");  and it just brings an server error 500. That value list is static with just the values Yes and No. Any php command to retrieve/display valuelists causes a server 500 error.

                     

                    The rest of the API seems OK at first glance, i.e. my app has ported across as is. This test I am running is on a database with one layout and two fields with 1 record.

                     

                     

                    • 7. Re: two server installation cwp and value lists
                      TSGal

                      ajk:

                       

                      Thank you for your posts.

                       

                      For clarification, it appears the PHP code works with a single-machine deployment of FileMaker Server 15.  Correct?

                       

                      Is the PHP code referencing the web server or the database server?

                       

                      For testing purposes, instead of attempting to list all value lists, replace the $valueListNames line with:

                       

                      $valueList = $layout->getValueListTwoFields('YESNO' , $recordID);

                       

                      ($recordID is the record ID of the first record in the found set)

                       

                      In essence, remove listValueLists().

                       

                      Does this work?

                       

                      Are all of your value lists custom lists?  Or, are some based on related fields?

                       

                      TSGal

                      FileMaker, Inc.

                      • 8. Re: two server installation cwp and value lists
                        ajk

                        I've removed the listvaluelists() from my code and added the code you suggested.

                         

                        $valueList = $layout->getValueListTwoFields('YESNO' , $row->getRecordId());

                         

                        This still produces a server 500 error. comment that line out and if I print_r($result) I get a filemaker array object return correctly minus any value lists from my layout.

                         

                        I don't know if the code works on a single installation of FileMaker 15, I've only got a two server setup with FileMaker 15. My original code worked perfectly on a FileMaker 11.

                         

                        the PHP connection string is referencing the web server. The web server has an SSL certificate (one of the FileMaker supported certificates)

                         

                        The database I am connecting to is a new file which only contains 2 fields and 1 value list connected to a text field.

                        • 9. Re: two server installation cwp and value lists
                          TSGal

                          ajk:

                           

                          Thank you for the clarification of the two-machine deployment.

                           

                          In your first post, you said,

                          "My code (i.e. pages with value lists) was working fine on a single install of FileMaker Server..."  Was that just for FileMaker Server 11?

                           

                          Since the error appears to occur with the $valueList line, let's also split out the $row initialization and make it a separate line so I can verify the issue.  That is,

                           

                          $row=$first->getFirstRecord();

                          $recordid=$row->getRecordId();

                          $valueList = $layout->getValueListTwoFields('YESNO',$recordid);

                           

                          Next, comment out the $valueList line (and the following echo line) and execute the PHP code.  This should complete.  Assuming it does, then add back the $valueList line and execute.

                           

                          Do you have another instance of FileMaker Server as a single machine deployment to test?

                           

                          TSGal

                          FileMaker, Inc.

                          • 10. Re: two server installation cwp and value lists
                            ajk

                            Unfortunately, don't have another instance of a single FileMaker server 15 to test. The file I was working with, worked fine with FM11 but seems to fail with FM15. Bearing in mind the API hasn't changed much and I only have around 20 lines of simple code, none of the commands were deprecated so should work.

                             

                            Going back to your suggestions, I split out the row initialisation into separate lines. Both lines $row and $recordId execute fine on my page. As soon as I add the line $valueList it fails with a server 500 error.

                            • 11. Re: two server installation cwp and value lists
                              TSGal

                              ajk:

                               

                              Thanks for confirmation of the other steps and the $valuelist statement.

                               

                              I have sent all information to our Development and Testing departments for review.  When I receive any feedback, I will let you know.

                               

                              TSGal

                              FileMaker, Inc.

                              • 12. Re: two server installation cwp and value lists
                                ajk

                                I look forward to hearing back, need to get my site running asap now that I've ditched FileMaker 11 for 15.

                                 

                                interesting this user has the same issue as me, however it's a single server installation.

                                FMS 15, FM API, PHP and Value Lists Problem

                                • 13. Re: two server installation cwp and value lists
                                  jdavis@nicelydone.com

                                  Hi TSGal,

                                   

                                  I would like to add that I am encountering the same problem with the value list on a Single Machine Deployment on a Windows Server that I believe is 2012. I am getting the generic 500 error page. I am able to submit a new record to the database with my code. The second I add in a line of code pertaining to the Value Lists, I get the error message.

                                   

                                  I had started a thread because I couldn't find anything. Then @ajk replied to my thread. Here is the link to my thread:

                                  FMS 15, FM API, PHP and Value Lists Problem

                                   

                                  Thank you.

                                  • 14. Re: two server installation cwp and value lists
                                    TSGal

                                    jdavis:

                                     

                                    This looks identical to the original posting here.  I will respond to your original posting since other Community members are also involved.

                                     

                                    TSGal

                                    FileMaker, Inc.

                                    1 2 3 Previous Next