Jump to content
Server Maintenance This Week. ×

Seperate Web Server access trouble


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

Recommended Posts

I am having trouble retrieving information from my Filemaker server using PHP. The problem is that my company's website is hosted externally while the Filemaker server is in house. I can get the basic Filemaker PHP interactions to work when I am testing on our server, but I cannot get it to work from our hosted website.

I am trying to use an include statement for php files that are located on the Filemaker server. The idea being that these files will have functions I set up to return the necessary data to the website. But the include does not work. I get an error telling me it cannot find the file. I can access files on our in house server from and external source, I just cannot include. As near as I can tell the web hosting on our in house server is working fine.

Does anyone know how I can get this to work or if there is a better way of requesting information from a remote web server?

Link to comment
Share on other sites

Why do you want the php files on a separate server from your php server? I've never tried include() on a remote file supposedly it will work on newer versions of php. http://us.php.net/manual/en/function.include.php , but it seems like a hassle.

The API interacts with the Filemaker server via a cURL request to the XML feed, so it does not need to be on the same server as Filemaker. Move the Filemaker library (and any other files) to the local server then pass the address of the Filemaker server to the Filemaker constructor.


$fm = new Filemaker('MyDatabase', 'myFmserver.com', 'userName', 'password');

Link to comment
Share on other sites

We have our website elsewhere because that is how we have always had it, and now the concern is having out server going down and losing both our website and filemaker. I have tried copying the Filemaker PHP files to the webserver but have been unsuccessful at using them. That is why I am trying to do the work on our server and send then send the info to the webserver. Is there some specific place I need to have the files in order to access them properly?

Link to comment
Share on other sites

I understand why you have Filemaker and You web pages on a separate server (we have a similar set up though both servers on on a local network). What I don't understand is why you are attempting to use php files on two separate servers.

Just to be clear the Filemaker PHP API is not part of the Filemaker server. It is simply a collection of PHP objects to simplify the interaction with Filemaker's XML feed.

I have tried copying the Filemaker PHP files to the webserver but have been unsuccessful at using them.

Exactly what do you mean by unsuccessful?

You can place the PHP API files anywhere you like. Your "website" php code needs to be able to find the Filemaker.php file so you either need to place it (and the Filemaker folder) in a directory that's in the php include_path (which by default includes the local folder i.e '.'), provide the exact location in your include() statement, or a relative link from a location in the include path in your include() statement.




/* File is in a directory that is in the include_path*/

include('Filemaker.php'); 



 /* Full path to file*/

include('/home/users/me/my_php_includes/Filemaker.php');



/* relative path to file up one level to home dir then down to file*/

include('../my_php_includes/Filemaker.php'); 

Link to comment
Share on other sites

This topic is 5607 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.