9 Replies Latest reply on Feb 22, 2014 2:53 PM by gwallis

    Exact Location of PHP Script

    gwallis

      I have recently updated my Macintosh Operating System to 'Mavericks'. In doing so I have lost the ability to run a PHP Script that supports a transfer of Data from an iPad to a database located on Filemaker Server 13.

       

      I believe that I have installed FMS 13 correctly and enabled PHP as well as the Apache webserver. However, I can not figure out where to place the PHP script within the operating system. It used to go in the 'Sites' folder in the User's Root Directory. I have searched and read various messages on this forum that have indicated that the 'Sites' folder was no longer used.

       

      I need a definative answer as to where to place the PHP Scripts.

       

      Any help in this matter would be greatfully appreciated!

       

      Gary

        • 1. Re: Exact Location of PHP Script
          Mike_Mitchell

          Gary -

           

          One of the little quirks of FMS 13 is the diversion of the normal Apache directory structure to support WebDirect. If you place your PHP scripts in this path:

           

               \Library\FileMaker Server\HTTPServer\htdocs\

           

          they should function normally using the FMS-installed PHP engine.

           

          HTH

           

          Mike

          • 2. Re: Exact Location of PHP Script
            gwallis

            Mike,

             

            Are those supposed to be Back Slashes (\) or Forward Slashes (/)?

             

            I appreciate your help...

             

             

            Gary

            • 3. Re: Exact Location of PHP Script
              Mike_Mitchell

              You’re on the Mac, right? Just drill down along that path to find the directory.

               

              (But yes, they’re supposed to be back slashes.)

              • 4. Re: Exact Location of PHP Script
                gwallis

                Mike,

                 

                So I access the php script with the following URL from the iPad:

                 

                "http://65.30.216.***\Library\Filemaker Server\HTTPServer\htdocs\GPS_Script.php?"  Does this look about right?

                 

                And one other question... if I may... Should I have a specific port 'Open' for PHP?   Port Forwarding??

                 

                Gary

                • 5. Re: Exact Location of PHP Script
                  Mike_Mitchell

                  Um … no.

                   

                  If you put your PHP scripts in that directory, they’ll show up at the machine’s normal address. For example, here at the house, I have my Mac set up to run FMS. All I have to do is type:

                   

                       http://10.0.1.2/netcastersolutions/index.php

                   

                  in my browser and the document located at

                   

                       \Library\FileMaker Server\HTTPServer\htdocs\netcastersolutions\index.php

                   

                  opens.

                   

                  As to the other, PHP communications happen over port 80, just like any other web communications. So you shouldn’t have to do anything special, unless you’re trying to access the server inside the firewall from outside the firewall and the server’s IP address is not the same as the router’s. In that case, you’d need port forwarding and a fixed IP address for both the router and the server.

                  • 6. Re: Exact Location of PHP Script
                    gwallis

                    Mike,

                     

                    Thank you... I appreciate your assistance in this matter.  I have not quite got it figured out yet, but you have given much food for thought.

                     

                    Thanks again,

                     

                    Gary

                     

                    P.S.

                     

                    I will let you know where I screwed up when I get it working.

                    • 7. Re: Exact Location of PHP Script
                      gwallis

                      Mike,

                       

                      I finally got my PHP Script in the right place and working.... sort of.

                       

                      When accessing the script php returns the following errors:

                       

                      Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in/Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/FileMakerImpl.php on line 204

                       

                      Strict Standards: Non-static method FileMaker::getMinServerVersion() should not be called statically, assuming $this from incompatible context in /Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/Parser/FMResultSet.php on line 50

                       

                      Strict Standards: Non-static method FileMaker_Implementation::getMinServerVersion() should not be called statically, assuming $this from incompatible context in /Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker.phpon line 129

                       

                      Strict Standards: Non-static method FileMaker::isError() should not be called statically, assuming $this from incompatible context in/Library/FileMaker Server/Web Publishing/publishing-engine/php/mavericks/lib/php/FileMaker/Implementation/FileMakerImpl.php on line 209

                       

                       

                      Actually it goes on for another 7 or 8 lines... and it seems to not like the way the URL is formatted, i.e the 'Strict Standards: Non-static method Filemaker::' portion of the error.

                       

                      Again, the URL that calls the php script is working, but I continue to get this error echoed each and every time.  This is the very same URL that was working in the past (before upgrading to Mavericks).  Any idea what has changed in Filemaker's PHP API?

                      I hate to ignore something that seems so dramatically wrong!

                       

                      Gary

                      • 8. Re: Exact Location of PHP Script
                        Mike_Mitchell

                        That’s not your problem. Well, I know it’s your problem, but it’s not because of anything you did.  

                         

                        The PHP API is not compatible with the latest release of PHP (5.4), which requires “strict standards” for method declarations. There’s not much you can do about the actual error at present (unless you have better PHP chops than I do and can Frankenstein the API to conform to the requirements). About all you can do is suppress the errors. Put these two lines at the beginning of each of your pages:

                         

                        ini_set('display_errors',0);

                        ini_set('error_reporting',30719);

                         

                        (If you have an include that happens in every page, you can put it there instead; it’s easier.)

                         

                        These two lines will tell the PHP engine not to echo out these error messages.

                         

                        HTH

                         

                        Mike

                        • 9. Re: Exact Location of PHP Script
                          gwallis

                          Mike.... you are 'The Man'!

                           

                          Once again I am in your debt.

                           

                          I got everything working as it should... at least from a LAN aspect.  The WAN connection is currently alluding me.... but, I will get it all sorted out.

                           

                          Thanks again for all your help,

                           

                          Gary