2 Replies Latest reply on Jul 13, 2017 11:28 AM by fmpdude

    Logging Errors on FMS

    marinahany

      Hello all,

       

      Background:

      I just took over an old project that someone else started at work. They have been using FMS, FMPro and FM WebDirect so far. My task is to also use FM CWP with PHP so that we can have a few more features that WebDirect is not offering.

       

      How I discovered the issue:

      I have been working with the Todd Duell FileMaker API for PHP 13 Textbook and it's excellent but I just hit a road block with uploading container fields (display works fine). The file was giving me a 500 error code (that's not the issue for now). Knowing that that's a connection error, I wanted to look under the hood in the log files to see what I'm doing wrong. The FMS 16 Custom Web Publishing Guide suggests 4 ways of checking logs on pages 94 to 97, and none of them is working for properly for me.

       

      The Problem:

      1. Web Server Access and Error Logs (IIS Windows Event Viewer):

      Looks fine. No apparent errors there.

       

      2. Web Publishing Engine Log:

      All of my messages look something like this "/fmi/xml/fmresultset.xml?-db=FMPHP_Sample&-layoutnames" . Why does it think I'm using XML? I enabled PHP everywhere on pro and server.

      • In the wpe.log file, the MODULE_TYPE is blank for all the errors. According to the book, it should say PHP since that's the language I am using.
      • The latest time stamp I have is from 2 days ago. How often does this file update? Is there any way I can change a setting to make it update more frequently? The error codes on it are very helpful feedback for me but are not readily available.

       

      3. Web Server Module Error Log

      • The book says I should find a file there called web_server_module_log.txt at {C:\Program Files\FileMaker\FileMaker Server\Logs} but that file does not exist.

       

      4. Tomcat Logs:

      • In the AdminHelper log file, I see plenty of errors that look like the following. Why don't those files (Access.log and fmdapi.log) exist? Would that be due to an installation mistake? I believe the fmdapi.log would have some useful information if we have it. What would happen if I just created blank files there and called them exactly like that and wait for the system to start populating them?

      2017-07-13 10:09:28,171 [LogViewerIndex-worker_143] INFO logs.LogViewerIndex - LogViewer.updateIndex(): C:\Program Files\FileMaker\FileMaker Server/Logs/Access.log does not exist

      2017-07-13 10:09:28,171 [LogViewerIndex-worker_146] INFO logs.LogViewerIndex - LogViewer.updateIndex(): C:\Program Files\FileMaker\FileMaker Server/Logs/fmdapi.log does not exist

      2017-07-13 11:09:28,233 [LogViewerIndex-worker_147] INFO logs.LogViewerIndex - LogViewer.updateIndex(): C:\Program Files\FileMaker\FileMaker Server/Logs/Access.log does not exist

      2017-07-13 11:09:28,233 [LogViewerIndex-worker_150] INFO logs.LogViewerIndex - LogViewer.updateIndex(): C:\Program Files\FileMaker\FileMaker Server/Logs/fmdapi.log does not exist

      • Is there any chance that it's not liking this path because of the forward and the backward slashes? If so how do we fix that?

       

       

      Thanks in advance!

      Marina

        • 1. Re: Logging Errors on FMS
          beverly

          You have posted to Community Feedback. Perhaps these instructions will help you move the question to Discussions where more will see it?

          Beverly

          1 of 1 people found this helpful
          • 2. Re: Logging Errors on FMS
            fmpdude

            A 500 Error code is a "generic" Server Error. It's used when nothing else applies. I doubt this is a connection error, but I don't know enough about your setup.

             

            A few ideas...

             

            (1) Try the Charles reverse proxy program. It's free for evaluation. You just load it and it will list out all the requests and responses. It's a super powerful and useful program.

             

            Reverse Proxy • Charles Web Debugging Proxy

             

            --


            (2) Also, why don't you just create the two log (text) files named that are missing?

             

            I really dislike programs that report on errors rather than, in this case, creating the silly log files.

             

            --

             

            (3) Another idea, try a PHP IDE like PHPStorm from Intellij so maybe you can debug (step through) your program to check variables along the way. I don't know how FMP uses PHP, but, given PHP files that are misbehaving, I'd definitely try to step through them.

             

            PhpStorm: Lightning-Smart IDE for PHP Programming by JetBrains

             

            --

             

            (4) Add your own logging statements in the code to get better info along the way so you can test assumptions.

             

            HOPE THIS HELPS.