Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


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

Recommended Posts

  • Newbies
Posted

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

Posted

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

  • Newbies
Posted

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

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