11 Replies Latest reply on Sep 26, 2016 2:24 PM by mprand

    FMS 14 CWP website will not connect with database

    mprand

      Hi All,

       

      I have a FMS14 install, with a CWP website - recently upgrade from FMS12.  Despite the fact that Web server and the Web Publishing engine are both "green" on the console status, the database is hosted and has PHP and XML extended privileges enabled, my website does not seen to connect with the filemaker database. I was working with a person to verify that my fmandphp class was working fine and he tells me that the error I was getting indicates a broken installation of the web component of filemaker.  He gave me a php script to run and I've attached the error that I was getting.  I don't know how to fix this and reinstall needs to be a very last resort at this point.  Any help would be much appreciated.

       

      Thanks,

      Michelle

        • 1. Re: FMS 14 CWP website will not connect with database
          Johan Hedman

          Have you tried to use the Test your PHP-connection from FileMaker Admin Console?

          • 2. Re: FMS 14 CWP website will not connect with database
            mprand

            Yes, we tested PHP and it seems to be working fine.

            • 3. Re: FMS 14 CWP website will not connect with database
              nicolai

              It sounds like either  htdocs in the HTTPServer folder had been moved or the file has been renamed.

               

              Try to add phpinfo to this folder

               

              Since it is in FIleMaker server folder, make sure you only have one install at the time.

               

              We do not know you setup, but it is possible you are using custom PHP install instead of the one installed by FileMaker Server. New Server installation could have install FileMaker php again.

              • 4. Re: FMS 14 CWP website will not connect with database
                beverly

                Yes! I was about to suggest the phpinfo().

                There can be more than one installation of WebServer and more than one installation of PHP.

                It would be helpful to know the path(s) that are being used: 1) when the error is produced, 2) when the Test to PHP from console is being called.

                 

                I'd also like to know what "script" is being called when the error was produced. (what php calls)?

                 

                beverly

                • 5. Re: FMS 14 CWP website will not connect with database
                  mprand

                  Hi!  The phpinfo file is residing in the my website directory in a phpmyadmin folder.  This is where it resided under our FMS 12 installation and the website in on an E drive. I did not have the FMS 14 installer install PHP again since I was already running the supported version. Just a bit more background - I am running a Windows 2008 server (R2,SP1), IIS 7.  When I go to test my website using "localhost" in the web browser, my pages all load just fine but the results pages are blank of database results and only show the html components of the page (logo, etc.)

                  • 6. Re: FMS 14 CWP website will not connect with database
                    mdenyse

                    If I'm not mistaken, the PHP API changed between 12 and 13; are you using the latest FM PHP API files that came with FM 14?

                     

                    Also, since you say the HTML is rendering in the browser your PHP isn't terminating; I suspect error messages are being suppressed and/or you're not checking the 'right' error result.

                     

                    First make sure you've got the latest PHP API files and if that doesn't resolve it, start putting in more error checking. Additionally, if you have all of your files local on your development machine, you can use MAMP Pro and the MacGDBp debugger to step through your PHP code to see where things are heading south.

                     

                    Mark

                    1 of 1 people found this helpful
                    • 7. Re: FMS 14 CWP website will not connect with database
                      mprand

                      Hi Beverly - the person I was working with created the fm-and-php class that my website was created with.  He had me use the following script, which I put into a php file and put in my website folder and then called from the website by putting in http:/localhost/testfmandphp.php (i.e. name of the file)  Here is the script:

                       

                      <?php

                      include("./fmandphp.php");

                      $FM = new FM_and_PHP();

                      $FM->setFileMakerHost("localhost","80","7");

                       

                      $FM->setDebugLevel(1);

                      $FM->setCommand("find");

                       

                      $FM->doGetQuery();

                       

                      ?>

                       

                      In the web page, it gives me the following link:

                      http://localhost:80/fmi/xml/FMPXMLRESULT.xml?-max=20&-find=&-skip=0

                       

                      Which results in the attached error.  I've also attached a pic of the results of the same test on my FMS12 server for comparison.

                       

                      FMS14 Error.png

                       

                      FMS12 Reults.png

                      • 8. Re: FMS 14 CWP website will not connect with database
                        mprand

                        Hi Mark - I am not a php or IIS expert and I don't understand most of what you posted.  I did not install PHP with the FMS 14 installer and to be honest, I'm not really sure what to do with standalone api, or if it is even relevant here because my website pages are using fm-and-php class and not the filemaker class.  When I loaded the contents of the standalone api zip into my website folder and created a small test php page, similar to the one I listed above for fmandphp, I received a 22 error, which is a communication error, but it doesn't give me any additional info and I am not an expert on this - someone else built the website years ago and I inherited it.  This is the script:

                         

                        <?php

                        include "FileMaker.php";

                        $fm = new FileMaker("localhost");

                        $result = $fm->listDatabases();

                        if (FileMaker::isError($result)) {

                           echo 'Oops. Error='. $result->getCode();

                        }

                        else {

                           foreach ($result as $database) {

                              echo $database ."\n";

                           }

                        }

                        ?>

                         

                        It returns and "Oops. 22"

                        • 9. Re: FMS 14 CWP website will not connect with database
                          beverly

                          for those needing a bit more info:

                          === google translate ===

                          What is FM-and-PHP?

                           

                          FM-and-PHP is a free PHP class with which one can appeal to 5.0 to 12.0 databases via PHP FileMaker Pro.

                           

                          Although FM-and-PHP works similarly FX.php, it has been completely redesigned and independently.

                          • 10. Re: FMS 14 CWP website will not connect with database
                            mprand

                            The person I have been working with this week, from Schubec, confirmed that it works with FMS 14 as well

                            • 11. Re: FMS 14 CWP website will not connect with database
                              mprand

                              Hi All,

                               

                              Thanks so much to everyone who offered suggestions to this issue!  The problem was resolved this morning.  We needed to removed the IASPI filter for FM Web Publishing that the FileMaker server installer puts into IIS.  Since I am not using the FM API have this filter in place caused a connection issue to the databases.

                               

                              Michelle

                              2 of 2 people found this helpful