7 Replies Latest reply on Dec 18, 2012 7:08 AM by TGBS

    PHP testing

    vision

      Title

      PHP testing

      Your post

      I am running FMSA 9.0.3 under Mac OS 10.4.10 using the 2 computer model. I am using Safari as my test browser.

       

      To test our PHP-FM setup, I used the FM PHP Site Assistant and created a simple form (addrecord) site.  It successfully created a site using a test database that was created with the proper privileges/extended privileges and hosted by our FMS.  I moved the site to our web server and I can bring up the site in a browser on the server.  

       

      If I leave all the data entry fields blank on the addrecord page in the browser, and submit the request, a new record in the test database is generated.   But, if I enter any data in any of the data entry fields on the addrecord browser page, I get an unknown error message in the browser window and no new record in the database. Furthermore, if I successfully create a new blank record using the browser, but then try to create another blank record, an error message stating the "error result is null" is returned.   If I simply empty the browser cache or restart the browser, I can again create new blank records.  

       

      Opening the test database in FileMaker Pro using the same passwords as used in the PHP file allows normal record creation and data entry.  

       

      It seems that the PHP connection to test database is present, but clearly I have something setup incorrectly.  Suggestions?  Thanks

       

       

        • 1. Re: PHP testing
          rmanook

          Hi vision,

          Thanks for your post!  I've tried re-creating the issue, but have come up short in reproducing it (although I must admit I would be worried if adding a new record would always fail within a PHP page).  Multiple factors could be affecting the new record behavior aside from setup configuration so I'd like to try and narrow down the possible sources of issue.

           

          It looks like you've done a fair amount of testing which is really great and I'd like to build on that.  To start, I'd like to help narrow down the issue between PHP or connectivity by trying the following:

          1.  Ensure the test database is checked for XML access

          2.  Enter this URL into a web browser and enter the proper values for the server ip, database name, etc.:

          http://<server ip>/fmi/xml/fmresultset.xml?-db=<database name>&-lay=<layout name>&-new&<field name>=<value> 

          3.  Click 'Refresh' in the browser a few times

           

          The desired result is that the XML string will produce multiple new records without any issue.  It should also produce new records after data has been added to a field. If there is no issue, we can assume that PHP is the source.  If there is difficulty producing new records, we can assume that there is a connectivity breakdown.  Also, if there is any issue producing new records, the XML page will provide us with an Error Code which will give us a great place to start looking.

           

          *Note: I would recommend using FireFox for this test as it offers a better display of the XML page. 

           

          This leads me to my next question: will any records (created in FileMaker Pro) display in the PHP page?  Also, after emptying the browser cache or browser restart is there a period of everything working or will the addrecord fail immediately under the same circumstances?

           

          Here are a few additional suggestions for testing based off of my current FileMaker Server configuration:

          1.  Re-install with FileMaker's PHP if you chose to deploy with your own version of PHP as a test

          2.   Both master and worker machines are on the internal network and the PHP site is in the Library > WebServer > Documents folder on the worker machine

          3.  You can also try a single machine configuration just to factor out any issues between the servers

          4.  All of the ports in Knowledge Base article KB ID 6427 are open.  (Click on Support in the upper right corner of the forum and then click on the Knowledge Base link to access the Knowledge Base)

           

          I apologize that we do not have an immediate resolution for this particular issue.  Keep me posted on how everything works out!

           

          tsturtle

          FileMaker, Inc. 

          • 2. Re: PHP testing
            vision
              

            Thanks for the response and I will give those suggestions a try and let you know the results. 

             

            The last 4 items I have already done, except I have not tried a single computer setup.

             

            The XML test is something I never thought of and hopeful will help pinpoint the problem.

             

            As for the timing of the problem, I can create one empty record after emptying the browser cache, then it will give an error message if I try to create another record.   I can never create a record with data enter in any of the fields on the browser addrecord page. 

             

            I will add a web page to browse records to the test database and see if FM can pass find requests from FM. 

            • 3. Re: PHP testing
              vision
                

              Update:

               

              XML request failed.  No new record generated.  Error code returned was:

               

              <fmresultset version="1.0">

              <error code="959"/>

              <product build="08/27/2007" name="FileMaker Web Publishing Engine" version="9.0.2.78"/>

              <datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/>

              <metadata/>

              <resultset count="0" fetch-size="0"/>

              </fmresultset>

               

               

               

              • 4. Re: PHP testing
                rmanook

                Vision:

                 

                Thanks for gathering the information.  I just wanted to post a follow up to let you know that we're still looking into this issue.

                 

                I'll keep you updated with any further findings or test.  Thanks.

                 

                tsturtle

                FileMaker, Inc. 

                • 5. Re: PHP testing
                  scottcagle
                    

                  Good Morning,

                   

                  I'm having the exact same issue with the same type of website. I'm trying to use FM to create a registration site. I have a one machine setup below is the error message I received when I did the XML test:

                   

                  This XML file does not appear to have any style information associated with it. The document tree is shown below.

                  <fmresultset version="1.0">
                  <error code="105"/>
                  <product build="01/12/2008" name="FileMaker Web Publishing Engine" version="9.0.3.316"/>
                  <datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/>
                  <metadata/>
                  <resultset count="0" fetch-size="0"/>

                  </fmresultset>

                   

                  And here's a silly question - how do I search the KB for an article ID? I can't seem to find it.

                   

                  Thanks, 



                  • 6. Re: PHP testing
                    TGBS

                         Dear all,

                          

                         I am having similar problem to build website. I am using FM 12 server to access data. I have used window 7 (single machine) as webserver as well as FM database server.  After hosting the database on the FM server when I tried to XML request using 

                         http://xxx.yyy.zzz.zzz/fmi/xml/fmresultset.xml?-db=mydatabasename-lay=myLayoutname&-findall

                          

                         This XML file does not appear to have any style inforamtion associated with it. The document tree is shown below.  (with gray bar on top)

                         <fmresultset version="1.0">

                         <error code="105"/>

                         <product build="6/21/2012" name="FileMaker Web Publishing Engine" version="12.0.2.228"/>

                         <datasource database="" date-format="" layout="" table="" time-format="" timestamp-format="" total-count="0"/>

                         <metadata/><resultset count="0" fetch-size="0"/>

                         </fmresultset>

                          

                          

                         Any hint will be appreciated and credited.

                         TG

                          

                    • 7. Re: PHP testing
                      TGBS

                           Hi all,

                            

                           I have solved the problem and i can get XML data from my DB. 105 is layout missed error. So what I missed is the & befor -lay when I form the URL

                            

                           :)