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 naio
      I have FMS17 running a system shell script that does the following:
      Tar the latest backup folder and leave it into a specific 'tar' folder Mount an external volume share rsync external share and tar folder The script was running twice a day without any problem until last week when I upgraded the server OS from High Sierra to Catalina.
      FMS event log just shows the following:
      Schedule "schedule-name" aborted; aborted by user. Possibly it's a problem with permissions but how to fix it?
    • By gczychi
      Browsing through my event logs, I am finding weird scripting errors, like:
      ... Information 645 ...local Schedule "Import Main (every minute 8-20)" scripting error (401) at "Import : Import Main : 36 : Perform Find". How can a simple «Perform Find» script step (which works just fine in the server scheduled script, btw.) generate a scripting error? Occasions where the FoundSet = 0 should be considered «normal».
      I also have found other errors, that shouldn't be errors, like «Go to Record/Request/Page [ Next ; Exit after last ]», when there is no next Record.
      What is the best way to prevent this? It’s clogging the log files.
      Thanks a lot for any insight!
      Gary
       
    • 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?
       

×
×
  • Create New...

Important Information

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