AnsweredAssumed Answered

Web Publishing Engine Get(DocumentsPath) Function Returns the Wrong Folder

Question asked by tduell_1 on Aug 6, 2012

Summary

Web Publishing Engine Get(DocumentsPath) Function Returns the Wrong Folder

Product

FileMaker Server

Version

12.0

Operating system version

OS X and Windows

Description of the issue

When running a script on FileMaker Server 12 from a PHP page the web publishing engine returns an incorrect path when you use the Get(DocumentsPath) function.

Steps to reproduce the problem

Create a simple table with 1 field - DocumentsPath. Then create a script that creates a new record and sets the field with the value from the function Get(DocumentsPath).

1. Test the Get(DocumentsPath) function on FileMaker Pro. Returns the correct path:

/Macintosh HD/Users//Documents/

2. Test the Get(DocumentsPath) function from the FileMaker Server Admin Console (i.e. run the same script from FileMaker Server). Return the correct path:

/Macintosh HD/Library/FileMaker Server/Data/Documents/

3. Test the Get(DocumentsPath) function from a PHP page that runs the same script from FileMaker Server. Returns an incorrect path:

/Macintosh HD/Library/FileMaker Server/Documents/

Expected result

/Macintosh HD/Library/FileMaker Server/Data/Documents/

Actual result

/Macintosh HD/Library/FileMaker Server/Documents/

Configuration information

Tested on FMS 12 on both OS X and Windows 7.

Workaround

Cannot use the Get(DocumentsPath) function. You have to manually trap for the OS and hard code the correct path if you have to use PHP to access the Documents folder on FMS.

Outcomes