Jump to content
Sign in to follow this  
doughemi

Can't make PHP connection on localhost

Recommended Posts

xpost:

I have installed a copy of my website on my local server with installed FMS 17. 

Direct contact with the (local copy of the) database works fine through File–>Hosts–>localhost, and I can access the Admin Console via localhost:16001.

When I try to connect via a php script, I get an Error 22 message:

Communication Error: (22) The requested URL returned error: 503 Service Unavailable - This can be due to an invalid username or password, or if the FMPHP privilege is not enabled for that user.

I can run other scripts which do not access the database successfully.

I made this installation so that I had a testbed for my operational website. The database and php scripts are exactly identical to the files on my remote host (except, of course, for the server name in the php connector files).

What steps should I take to isolate the problem?

Share this post


Link to post
Share on other sites

I ran the uninstaller, and removed everything that still said "FileMaker Server" after moving my php files to another directory.

I reinstalled FMS17 and moved my php files back into /Library/FileMaker Server/HTTPServer/htdocs directory.

Now when I try to open localhost/phpinfo.php (for example; anything else does the same) I get an error message

Quote

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. You don't have permission to access the requested object. It is either read-protected or not readable by the server.

I can open /htdocs/index.html successfully.

What permissions should these files have?

Can I set them with the Finder's Get Info utility or must they be set in Terminal?

Is there something else I have overlooked?

Edited by doughemi

Share this post


Link to post
Share on other sites

As you probably have seen from my earlier threads I struggled to get php working but thanks to help including you it is working fine. 

What I can say is that I haven’t had to place my website in the filemaker directory and it resides on a separate server. The FileMaker php file and fold reside in the web data folder. 

Share this post


Link to post
Share on other sites

Yes, my production database is set up the same way, and works fine. What I'm trying to do is create a test system on my local computer that mirrors the production system so I can develop without messing with the live system. I could do it with FM14, but so far not with FM17. I've been playing with fire for far too long!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Koonce
      I have an export script and it tries to save to server i need it to save to the local desktop cannot get scrip to work... I know Im doing wrong... need help thanks in advance.
       
    • By carlsson
      Today I updated FM Server from 17.02 to 17.05. After this update WebDirect refuses to start. 
      When I click on the slider, it says "Enabled",  but when I go back again it's Disabled.
      I have looked for Java updates, but I already have the latest update applied. 
       
      I'm on macOS 10.13.6 with all security patches applied.
      I haven't installed SSL yet, but it worked before this update so....
      Where should I look more?
       
      Please help! 😩


    • By Nuos
      Hey Folks
      Im running Server 17 and have a number of scripts configured to run. Recently, some have stopped executing.  What I mean is I select it to run (or the server runs it as scheduled) and then when I run it manually, there are records that have not been processed. So I checked logs  log. "Last Scripting Error (802)"
      Any recommendations how to resolve this?
       

    • By fmworm
      Hello Everyone,
      We are planning to use FileMaker server 17 on AWS. And for client, thinking of using AppStream 2.0.
      I would like to know if there is any sort of issues using Appstream 2.0, means, performance issue or any limited functionality.
      Also would like to take your suggestions, instead of using Appstream 2.0, is there any other solution or way to connect filemaker apps hosted on AWS.. without installing filemaker client on user. machine.
      Thanks in advance.
       
    • By Spidey
      Hi,
      I am totally new in xslt.  I have the following xslt and I tried to export as xml.   I got an error.    "SAXParseException: invalid document structure".  Is there a problem in my structure?  What's the proper structure?
       
      <?xml version='1.0' encoding='UTF-8' ?>
      <xsl:stylesheet version='1.0'
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
        xmlns:fm="http://www.filemaker.com/fmpdsoresult"
        exclude-result-prefixes="fm">
            <xsl:output version='1.0' encoding='UTF-8' indent='yes'
              method='xml' />
            <xsl:template match="/">
            <cityforcast>
                  <xsl:for-each select="fm:FMPDSORESULT/fm:ROW">
                        <forcast>
                              <id><xsl:value-of select="./fm:ID” /></id>                       
                              <city><xsl:value-of select="./fm:City” /></city>
                              <temperature><xsl:value-of select="./fm:Temperature” /></temperature>
                              <humidity><xsl:value-of select="./fm:Humidity” /></humidity>
      <windspeed><xsl:value-of select="./fm:Wind Speed” /></windspeed>
                              <winddirection><xsl:value-of select="./fm:Wind Direction” /></winddirection>
                              <clouds><xsl:value-of select="./fm:Clouds” /></clouds>
                        </forcast>
                  </xsl:for-each>
            </cityforcast>
            </xsl:template>
      </xsl:stylesheet>
      Weather.fmp12
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.