2 Replies Latest reply on Jul 17, 2012 2:41 AM by sebman

    FilemakerServer Advanced 12 Custom Web Publishing Container Images



      FilemakerServer Advanced 12 Custom Web Publishing Container Images

      Your post

      Hello Fellow FMSA 12 Admins,

      I just made a complete new Install of FileMaker Server Advanced 12 onto a newly set up macmini running 10.7.4 using
      Filemakers own PHP. I didn't change any php or Database files, but somehow Images comming from container Fields stored 
      in the Database are not beeing displayed anymore. I get the following Error Message:

      Original Error Message:
      Die Grafik "http://www.domain.com/image.php?path=/fmi/xml/cnt/data.jpg?
      -db=DATABASE&-lay=Internet&-recid=xxxx&-field=container" konnte nicht angezeigt werden, weil sie Fehler enthält.

      The Image "...." could not be displayed, because it contains errors.

      The Database is accessable via PHP and XML privilages and i checked Usernames and Passwords twice. 
      These are the calling Methods:

      Image call:
      <img src='inc/image.php?path=".urlencode($records[0]->getField('container'));

          require_once ('FileMaker.php');
          $fm = new FileMaker();
          $fm->setProperty('database', 'DATABASE');
          $fm->setProperty('username', 'USERNAME');
          $fm->setProperty('password', 'PASSWORD');

           if (isset($_GET['path'])){
                $url = $_GET['path'];
                $url = substr($url, 0, strpos($url, "?"));
                $url = substr($url, strrpos($url, ".") + 1);
                if($url == "jpg"){
                     header('Content-type: image/jpeg');
                else if($url == "gif"){
                     header('Content-type: image/gif');
                     header('Content-type: application/octet-stream');
                echo $fm->getContainerData($_GET['path']);

      On our old Setup (10.5.8 with Filemaker 11) this worked flawlessly... Can anybody give me a hint what i might be missing?

      Greetings from Hamburg