开发者

Filemaker with PHP

Im using Filemaker API in PHP to retrieve the records from Filemaker Pro 11 Advance Database. But its showing error:

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

开发者_如何学CThough I have set all Extend Privileges and gave it to user. Please anyone can help me...


Although you mention you've taken care of this, whenever I've come across this problem it's been because the user being used to log in with PHP doesn't have the fmphp extended privilege set.

First know which user you're trying to log in as in PHP. Then, in FileMaker choose File>Manage>Security from the menu bar. Take a look at the Accounts tab and note the privilege set assigned to your web user. Click the Privilege Sets tab and double-click on this privilege set in the list. In the Extended Privilege list on the bottom right make sure there is a checkbox next to "Access via PHP Web Publishing".

While you're there, double-check the password you're working with. It has to be either you're not working with the right extended privilege set or you're not logging in with the right credentials.


I am pretty sure you must have resolved this by now but if you have not here is another suggestion. I had the same issue today and had all the extended privileges set.

The issue was with FileMaker API. Make sure the Php FM API being used is of the same version as the FileMaker server in which your db is hosted. FM Server 11 will require API released for FMS 11. I was using the last standalone API released for FMS 9 and hence it did not work. On updating php to FMAPI 13 I was able to connect and get the layouts.

The FileMaker API for PHP package was included as a .zip file in the following location:

For IIS (Windows): drive:\Program Files\FileMaker\FileMaker Server\Web Publishing\FM_API_for_PHP_Standalone.zip

For Apache (Mac OS): /Library/FileMaker Server/Web Publishing/FM_API_for_PHP_Standalone.zip


Double check your connection params, it should look something like this...

// filemaker server connection param
$connection =& new FileMaker('DBName', 'http://www.domain.com');
$connection->setProperty('username', 'youruser');
$connection->setProperty('password', 'yourpass');


First, check if the PHP API is installed and running. On the server, go to http://localhost - You will see a screen telling the PHP API is running. If you see something else, you probably have to dig into the installation of the PHP API - possibly redeploy the server and checking off the PHP API. See that the server passes the web-server test.

Next, Check that the user that logs on to the server has the right privilege set. We usually create a second account for the PHP API, where the privileges are set correctly to MODIFY records, and VIEW Layouts, and of course have the fmphp attribute set.

If you still cannot connect, try from the web-server to do a

wget http://fmhost_ip/
cat index.html
  • see that you get something that can resemble a FileMaker API running page (look at the HTML code output).


Make sure you get the "FileMaker Database Server Website" landing page on the url (without the /fmi/... address), My issue was using another domain/sub-domain that IIS was using for another website.


I know this is really old. But in addition to the ISAPI fix. I needed to add a URL rewrite rule. The pattern needed to be:

^fmi/(.*)

And the rewrite URL needed to be:

http://localhost:16020/fmi/{R:1}

With those in place, the PHP API started working again.


after a few hours trying i found a solution to comunicate the php with the IIS... on your IIS manager, just need to add to your default web site, in ISAPI Filters, and add this executable... "C:\Program Files\FileMaker\FileMaker Server\Web Publishing\publishing-engine\web-server-support\iis\isapi_redirect.dll" - with anuy name

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜