4 Replies Latest reply on Jan 27, 2014 1:00 PM by ErichWetzel

    Custom Web Pubishing PHP, FMS 13

    ErichWetzel

      Title

      Custom Web Pubishing PHP, FMS 13

      Your post

           Does anyone know how to point a PHP custom web publishing page from a standalone web server to the FMS13 database server?

           We are moving from FMSA11 to FMS13. In the past the Web Publishing Engine was on our stand alone web server and the database machine was separate. In order to take advantage of the new features of 13 we put FMS13 as a single machine.

           Our testing database has FMS13 on a single machine installation. Our testing business web site is on a stand alone web server on the same subnet at the FMS13 machine. I need to know if anyone has experience with this type of setup. It seems to me that the standalone web site should be able to call the database server for data. But initial testing does not seem to permit that. I bet I am doing something wrong.

           Our web site PHP pages do not seem to be getting the FileMaker.php if i read the error below correctly. The same PHP pages seem to work when the WPE is on the Web site server like our current setup. Having the WPE on our web site machine is not possible if we want to use the new features of FMS since it needs to create its own web server. 

           The PHP page has an include file defining the database that has been pointed to the IP of the FMS13 single machine, and by extension of course its WPE.

           Any ideas would be appreciated. Thanks.

           -Erich

           Error result below :

      Into errorHandler() at line 15
      
      ---ERRNO---
      2
      
      ---ERRSTR---
      require_once(FileMaker.php): failed to open stream: No such file or directory
      
      ---ERRFILE---
      /Volumes/Data/websitedata/inspiration.php
      
      ---ERRLINE---
      7
      
      ---ERRCONTEXT---
      Array
      (
          [_GET] => Array
              (
              )
      
          [_POST] => Array
              (
              )
      
          [_COOKIE] => Array
              (
              )
      
          [_FILES] => Array
              (
              )
      
      )
      
      
      Backtrace of errorHandler()
      Array
      (
          [0] => Array
              (
                  [file] => /Volumes/Data/websitedata/inspiration.php
                  [line] => 7
                  [function] => errorHandler
                  [args] => Array
                      (
                          [0] => 2
                          [1] => require_once(FileMaker.php): failed to open stream: No such file or directory
                          [2] => /Volumes/Data/websitedata/inspiration.php
                          [3] => 7
                          [4] => Array
                              (
                                  [_GET] => Array
                                      (
                                      )
      
                                  [_POST] => Array
                                      (
                                      )
      
                                  [_COOKIE] => Array
                                      (
                                      )
      
                                  [_FILES] => Array
                                      (
                                      )
      
                              )
      
                      )
      
              )
      
          [1] => Array
              (
                  [file] => /Volumes/Data/websitedata/inspiration.php
                  [line] => 7
                  [function] => require_once
              )
      
      )
      


      Fatal error: require_once(): Failed opening required 'FileMaker.php' (include_path='.:') in /Volumes/Data/websitedata/inspiration.phpon line 7

        • 1. Re: Custom Web Pubishing PHP, FMS 13
          jmw

               Erich, 

               If I understand your setup correctly, the PHP files creating the website are on the server and FM Server is installed on the on the FMS13 machine. This would mean (I think) that the FM.PHP file is located on the FMS13 machine where it might need to be in order to access the services from FileMaker (WPE).

               The error code implies that the FM.PHP is not installed on the webserver machine, or at least not within the PHP search path. You might need to manually install it on the webserver machine or have the PHP search path include the FM files. Thing is that all the PHP code now runs on the webserver machine, not on the FMS13 machine. This means that you'll need to take care that in dbaccess.php (or whatever you have where the database name is set in the FM object) the database is correctly located on the FMS13 machine. But even so, this will not be enough if FM.PHP needs WPE to access the databases as that runs on the other machine. Accessing services on one machine from another might be possible, I don't know and I am not sure I want to know, it seems a troublesome path. I assume it would imply altering FM.PHP to that effect, which I would not do. Also server performance will quite likely drop should you succeed...

               I assume you have non-FM sites as well on the webserver machine? Is there any reason why these can not be on the FMS13 machine?

          • 2. Re: Custom Web Pubishing PHP, FMS 13
            ErichWetzel

                 Jan,

                 I was hoping to have our business web site totally separate from the single machine install of FileMaker Server. It may be too much for the machine to handle all at once.

                  

                 My thought as to the trouble, is what you describe. It just seems odd to me that the WPE has its own PHP engine but cannot be requested for data from a PHP page on another server with proper credentials.

                  

                 For example I can now contact the FileMaker Server with a browser and get data. Why can't a web server do that on its own and then pass the data to users? Isn't that the point of a "server?"

                  

                 Up until this point I have had the web server on the same machine as the WPE. But the WPE was an add on to our site. Now it MUST be the other way around. Now our site must be an add on to filemaker.

                  

                 Thanks for the input.

            • 3. Re: Custom Web Pubishing PHP, FMS 13
              jmw

                   Erich,

                   the webserver could do it; f.e. by requesting a webpage from the FMS13 server and then process that webpage (f.e. a page in XML). Although technically possible I think, performance would drop (and maybe even big time...) and also the pages of the site would increase in number and be more complicated to maintain. Not a nice solution. 

                   Having said all that; it seems that you might want to reconsider the buildup of the servers. You might want to go for better server specs than the current machine can deliver. Unless you can separate the FM-sites and the non-FM-sites in a router or something similar, maybe adding/reassigning/IP-addresses in the router(s). Maybe this something you should contact FM about; ask them what the possibilities are. 

                   I do not think I would go the way of separating FM.PHP and WPE, you'll never be really sure whether the connections between will work for each and every occasion. 

                   I just realized; you have FMS installed as a one-machine setup? If so, maybe you can try the two-machine setup to test performance. I just had a quick look and it might be quite like what you want to have anyway.

              • 4. Re: Custom Web Pubishing PHP, FMS 13
                ErichWetzel

                     Jan,

                      

                     What I am looking for is for our web server to have no connection to the filemaker server other than calling it for some data when creating CWP PHP pages. Looks like it is not possible from what you have done and what I have been testing.

                      

                     I am headed next to testing our site in the http root location indicated in the FMS documentation. I assume that it will work as advertised. Part of the issue is that I will need to manually edit the apache site settings to get it to appropriately handle our site. In the past I had done it via the ServerAdmin.app or Server.app GUI which we have learned is not compatible. That is my primary source of concern. Secondarily, is our site's needs merged with a piece of Filemaker being accessed via web needs and processed by the same machine.

                      

                     I will post my results here.

                      

                     -Erich