Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Does anyone know where to get sample code to check FM12 php?

Featured Replies

  • Newbies

I got my php server and fms12 working find. PHP server returns <?php echo "hello world" ?> just fine and filemaker server 12 is running with clients no problem. I can't seem to get the FMS12 to respond to my code. I keep getting fetal errors.

My config:

Win2003; FMS12; IIS&PHP; FMS12 enabled CWP w PHP; Yes, Extended Security set to allow Php connections.

Below is the test file I want to connect to:

$server=192.168.0.1;

$file= a.fmp12;

$layout= php; // this is the layout that has the fields

$field="id";

$user="admin",$password=""

the above is not the code I ran, but i am hoping i can get a sample because my code is producing the following error:

PHP Fatal error: Class 'FileMaker' not found in C:\Inetpub\wwwroot\FM.php on line 2

Looks like not all the required PHP API files are on the server - try redoing the add of the entire API...

  • Author
  • Newbies

Thanks for your reply.

I found the problem - it was actually a coding problem. If anyone is interested in developing a CWP site using filemaker and php, it is actually easier than I thought to setup (developing the website will the fun part since I found lots of reference materials). I am surprised there is not more information available on how to do this. It is so easy to setup but the problem is the materials are poorly organized - this is probably why nobody really bothers to work with it.

Below is a list I wish someone would have made available:

I installed on Windows 2003 Server, but just substitute the php server for your server OS. Time Estimate: (20minutes) | Experience level needed: (low)

1. Install FMS with web publishing engine including php publishing engine

Set the following: Filemaker Server Admin Console->Configuration ->Web Publishing ->Enable Php publishing, record pre-validation, (8UF-8), Error Message(English)

2. Install php server (I installed on win 2003 server using the php installer but you can use for your OS)

http://windows.php.net/download/

*I found the installation order didn't matter.

3. The Reference Manual was Worthless!. The author brought very little attention to the sample files on your FM12 server. Well, these files were the most important! item in the installation process because they have a working php site with fmp12.

http://www.filemaker.com/support/product/docs/12/fms/fms12_cwp_php_en.pdf

4. On your FMS12, Go to folder: //YOUR SERVER/Program Files/Filemaker/Filemaker Server/Examples/PHP/

-You will find these folders:

API Examples & Tutorial (Double Click and select English)

5. Copy Folder API Examples and Folder English (Subfolder to Tutorial)

Paste in your webserver directory. For me it was C:wwwroot

6. Rename them - API Examples I renamed "FM1", English renamed "FM2". Folder name doesn't matter but i used short names to lessen my typing when access these files in the web browser.

7. In the above folders you will find two fmp12 files: "FMPHP_Sample.fmp12" & "questionaire.fmp12"

Cut them out and paste them where you host your other Filemaker 12 Server files. - Then open them in your Filemaker Server Admin Console->Databases (open these files)

8. Then open your new Php site sample: http://SERVER/FM1/index.html and http://SERVER/FM2/index.html

9. Drink a glass of wine and Enjoy

10. DONE!!

Now make a copy of the php files that were created by FM and open them with Note++

http://notepad-plus-plus.org/

*Only play with the COPIES of the php code - to study and replace the referenced sample fmp12 files with your own fmp12 files. Study these php files and (now) use the reference manual. Decode these files and customize.

Additional information I found useful to decode php, but NOT! needed to know before install:

References:

Nixon, Robbin. "Php, MySQL & JavaScript", O'reilly

YouTube had some great videos that eased the worry of php server install - thanks for those posts

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.