Jump to content
Server Maintenance This Week. ×

Can't make PHP connection on localhost


This topic is 1897 days old. Please don't post here. Open a new topic instead.

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?

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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. 

Link to comment
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!

Link to comment
Share on other sites

This topic is 1897 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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