1 2 Previous Next 25 Replies Latest reply on Nov 24, 2016 3:28 PM by planteg

    Questions about CWP with PHP


      Hi all,


      to learn some more about FileMaker Server, I study CWP with PHP. I must say that I am doing my experiments with a somewhat different kind of hardware: I have FMS (I know I am two versions behind) installed in single system mode. On top of that I use a Raspberry Pi 3 with apache2 and php 5.6.26+deb8u1 installed.I added the FM PHP API to the installation in /var/www/html.


      To learn CWP is use this tutorial Introduction to FileMaker Custom Web Publishing (CWP) with PHP | Blue Feather - FileMaker Developer, Android, Web It seams to be old (outdated ?) though.


      I tried the first part with newFindAnyCommand():


      $fm = new FileMaker("Test Database", "", "PHP User", "password");
      $findCommand = $fm->newFindCommand("PHP Test");
      $findCommand->addFindCriterion("name", "Adam");
      $findCommand->setRange(0, 1);
      $result = $findCommand->execute();
      if (FileMaker::isError($result)) {
      $record = $result->getFirstRecord();
      $name = $record->getField("Name");
      $color = $record->getField("Favorite Color");
      echo("$name - $color");


      but I don't get any result, and no error. The only thing I see a the content of an echo() that i added right after the include.


      My first question is can I use the FM PHP API on a system that does not host the FMS Web Server ? And if so, what is wrong with my code or approach ?


      I had a different setup using two Pis: one host the Web server + PHP and the second one a MySQL database and works well (I use the CodeIgniter Framework).


      Many thanks

        1 2 Previous Next