5 Replies Latest reply on Nov 19, 2013 10:21 AM by tcwaters

    CWP issues with new server install

    tcwaters

      We have a new FMSA 12 install on Windows servers as a three box config. FMP app access to the server works fine; IWP access works fine; but PHP access is not working as expected. Using the PHP Custom Web Publishing Test, I get this error:

       

      The PHP connection to the FMServer_Sample database failed.

      The PHP test was not able to communicate with the Web Publishing Engine. Make sure you have PHP publishing enabled and the database has the fmphp extended privilege enabled. (Error 22; Unknown error)

       

      In the Server Admin Console "Enable PHP publishing" is checked.

       

      In the FMServer_Sample DB, the default settings for this database look as if the fmphp extended privilege enabled.

       

      This is FMSA 12.04.405 running on Windows 2008 Server R2

       

      THX!

        • 1. Re: CWP issues with new server install
          beverly

          TC, did you allow FMS to install the PHP or use an existing install?

           

          Beverly

          • 2. Re: CWP issues with new server install
            tcwaters

            THx Beverly.  I will check with the tech who did the install. I am guessing this leads to make sure to let FMSA install the PHP?  If that isn't what was done, is there an easy remedy?  Uninstall and then re-install on the helper box?

            • 3. Re: CWP issues with new server install
              beverly

              If FMS installs PHP, then you are assured that it is a valid version and all the necessary 'hooks' (if any) are there. You might search this forum, there may be some more answers on using already installed PHP. Check the version first, then I believe it had to do with those include paths, but it has been a while for this contingency. I just let FMS install PHP and all is right with the world.

              • 4. Re: CWP issues with new server install
                tcwaters

                Beverly,

                I'm going to make two replies here with the first, being narrative, and the other being actual code.

                 

                Our Enterprise web folks will not allow Filemaker to install the PHP on the web server.  They told me that v 5.2.14.  They told me they would review the errors we are getting to see if there is something at the Server end of this they can do.

                 

                What we were able to do was install the v12_FM_API_for_PHP_Standalone.

                 

                Then we created a simple test page. The errors and the code this page produces are below in  another reply.

                 

                I can niot have you look at the actual web page, as the stage/test server is only visible within oyr network.

                • 5. Re: CWP issues with new server install
                  tcwaters

                  Here is the code and the errors being produced on ourt set up:

                   

                  FMSA12

                  PHP v 5.2.14

                   


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 65


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 72


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 80


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 107


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 150


                  Strict Standards: Assigning the return value of new by reference is deprecated in D:\sites\pharmacy\FileMaker\Implementation\Parser\FMResultSet.php on line 153


                  Find All Records in PharmSchool Dir (HTTPS)


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context inD:\sites\pharmacy\FileMaker\Implementation\Command\FindAllImpl.php on line 16


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically in D:\sites\pharmacy\test.php on line 30


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107

                  Communication Error: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed


                  Find All Records in PharmSchool Dir (HTTP)


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context inD:\sites\pharmacy\FileMaker\Implementation\Command\FindAllImpl.php on line 16


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in D:\sites\pharmacy\FileMaker\Implementation\CommandImpl.php on line85


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically in D:\sites\pharmacy\test.php on line 46


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107

                  XML error: Not well-formed (invalid token) at line 1


                  List layouts (HTTPS)


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in D:\sites\pharmacy\FileMaker\Implementation\FileMakerImpl.php on line259


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically in D:\sites\pharmacy\test.php on line 62


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107

                  Communication Error: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed


                  List layouts (HTTP)


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in D:\sites\pharmacy\FileMaker\Implementation\FileMakerImpl.php on line259


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in D:\sites\pharmacy\FileMaker\Implementation\FileMakerImpl.php on line264


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107


                  Strict Standards: Non-static method FileMaker::isError() should not be called statically in D:\sites\pharmacy\test.php on line 80


                  Strict Standards: is_a(): Deprecated. Please use the instanceof operator in D:\sites\pharmacy\FileMaker.php on line 107

                  XML error: Invalid document end at line 2

                   

                  Here is our PHP code on test.php:

                  <?php

                  //////////////////////////////////////////////////////

                  //////////////////////////////////////////////////////

                  // Include FileMaker API

                  require_once ('FileMaker.php');

                  $database = 'PharmSchool';

                  $layout = 'php_Dir_02';

                  $username = 'CodeUser';

                  $password = 'cpsp2011';

                  $server_ssl = 'https://tincture12.pharmacy.pitt.edu';

                  $server = 'http://tincture12.pharmacy.pitt.edu';

                  ?>

                   

                   

                  <hr />

                  <h1>Find All Records in PharmSchool Dir (HTTPS)</h1>

                  <?php

                  // database connection

                  $fm = new FileMaker($database, $server_ssl, $username, $password);

                  $findCommand = $fm->newFindAllCommand('php_Dir_02');

                  $result = $findCommand->execute();

                  // Get array of found records

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

                            echo '<p class="error">' . $result->getMessage() . '</p>';

                  }

                  else {

                            $records = $result->getRecords();

                            $res_count=count($records);

                  }

                  ?>

                   

                   

                  <hr />

                  <h1>Find All Records in PharmSchool Dir (HTTP)</h1>

                  <?php

                  // database connection

                  $fm = new FileMaker($database, $server, $username, $password);

                  $findCommand = $fm->newFindAllCommand('php_Dir_02');

                  $result = $findCommand->execute();

                  // Get array of found records

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

                            echo '<p class="error">' . $result->getMessage() . '</p>';

                  }

                  else {

                            $records = $result->getRecords();

                            $res_count=count($records);

                  }

                  ?>

                   

                   

                  <hr />

                  <h1>List layouts (HTTPS)</h1>

                  <?php

                  // database connection

                  $fm = new FileMaker($database, $server_ssl, $username, $password);

                  // Call listLayouts() to get array of layout names.

                  $layouts = $fm->listLayouts();

                  // If an error is found, return a message and exit.

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

                      echo '<p class="error">' . $layouts->getMessage() . '</p>';

                  }

                  else {

                            // Print out layout names

                            foreach ($layouts as $layout) {

                                      echo $layout . "<br>";

                            }

                  }

                  ?>

                   

                   

                  <hr />

                  <h1>List layouts (HTTP)</h1>

                  <?php

                  // database connection

                  $fm = new FileMaker($database, $server, $username, $password);

                  // Call listLayouts() to get array of layout names.

                  $layouts = $fm->listLayouts();

                  // If an error is found, return a message and exit.

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

                      echo '<p class="error">' . $layouts->getMessage() . '</p>';

                  }

                  else {

                            // Print out layout names

                            foreach ($layouts as $layout) {

                                      echo $layout . "<br>";

                            }

                  }

                  ?>