7 Replies Latest reply on Jun 15, 2016 7:12 AM by mikebeargie

    Port 443 - Connection made, no data returned?

    jb301

      Hi guys,

       

      I'm experiencing some issues accessing port 443 when attempting to retrieve data from our FileMaker server. I am using the FX.php PHP class to make my connection, but this shouldn't be relevant. Previously, we have been accessing port 80 without any issues. It is my understanding that FileMaker can use port 80 and 443 by default.

       

      However, upon switching the port to 443, it connects (I think) but I do not receive any results (or rather, I seem to receive an empty data set). To ensure the port was in fact open, I used telnet to attempt to ping the port, and it was successful. So from what I can guess, I am being allowed to make a connection, but it is not allowing data to be sent back to me. Is there perhaps some sort of server setting the is looking for some additional authentication or certificate that is not set? A big part of the problem is I do not have access to the remote desktop for the server, it is essentially a black box right now.

       

      Any help would be greatly appreciated, thank you.

        • 1. Re: Port 443 - Connection made, no data returned?
          mikebeargie

          Port 443 requires that you install an SSL certificate on your server. Have you done so?

           

          Otherwise PHP will fail to connect as it will see you attempting to connect via a secure port to an insecure server.

           

          Are you error checking your find? If it's throwing an error and you are not capturing it, then you are just processing an empty results set without trapping the error that was most likely thrown.

          • 2. Re: Port 443 - Connection made, no data returned?
            jb301

            Hi Mike,

             

            As far as I can tell there is an SSL certificate on the FileMaker server. The server is a black box to me, but I am able to connect to it using HTTPS via telnet. As soon as I pass 'HTTPS' as an optional parameter to FX.php, I receive an error:

             

            Instantiating FX.php.

            Configuring database connection...

            Setting user name and password...

            Unable to parse FileMaker XML. Use the DEBUG constant and try connecting with the resulting URL manually.
            You should also double check the user name and password used, the server address and port, and WPE configuration.
            Finally, be sure that you have specified the correct data type (e.g. FileMaker 5 or 6 versus 7 or 8.)

             

            Although it seems like that HTTPS parameter was simply optional for MFPro7, and so it may be a mistake to be passing that in. I'm not sure how to get it to attempt to connect with an HTTPS URL rather than HTTP though... The FX docs aren't amazing.

            • 3. Re: Port 443 - Connection made, no data returned?
              mikebeargie

              Is the PHP code simple enough that you can switch over to using the official filemaker PHP API?

               

              FX.php hasn't really been updated in over a few years, and support is minimal. I haven't used it in over 5 years so I can't recall what it does for it's connection string, but usually it's around the same place in your code where you put the username and password to connect.

              • 4. Re: Port 443 - Connection made, no data returned?
                jb301

                Hi Mike,

                 

                It turns out the IP address for the server had changed, and it seems that it doesn't have an SSL certificate. I will be getting in touch with people who can check for me.

                 

                The FX connection I was attempting to setup looked like this, I'm assuming the HTTPS connection is being rejected. I'm eager to convert things over to the official API when time permits.

                 

                $fmconn = new FX(FILEMAKER_HOST, 443, "FMPro12", "HTTPS");

                $fmconn->FMUseCURL(false);

                $fmconn->SetDBData(FILEMAKER_NAME, FILEMAKER_LOUT, 1);

                $fmconn->SetDBPassword(FILEMAKER_PASS, FILEMAKER_USER);

                 

                Thank you for all of your help so far, I will update the thread when I've confirmed/denied if there is an SSL certificate installed on the server.

                • 5. Re: Port 443 - Connection made, no data returned?
                  mikebeargie

                  Then I think you may just need to change:

                  $fmconn = new FX(FILEMAKER_HOST, 443, "FMPro12", "HTTPS");

                   

                  to this:

                  $fmconn = new FX(FILEMAKER_HOST, 80, "FMPro12", "HTTP");

                   

                  and retest it.

                   

                  And yes, switch when you get a chance. I would just take your existing code, drop it in a new test directory with the FileMaker API, convert your code and test, and push it live when ready.

                  • 6. Re: Port 443 - Connection made, no data returned?
                    jb301

                    Yes, it does work on port 80 via HTTP, I was just confused as to why it wouldn't work via HTTPS on port 443. A missing SSL is really one of the only things that makes sense. When I make a direct connection to the server behind our firewall, the browser is saying the connection is not secure, so I think that must be the issue. Hopefully we will be able to check soon.

                    • 7. Re: Port 443 - Connection made, no data returned?
                      mikebeargie

                      Indeed, everything points to no SSL installed.