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.

FMP & WC & PHP

Featured Replies

In recent weeks there has been some discussion about using PHP with FMP. It also appears that some have had success in linking FMP dbs with PHP. I am hoping to spur additional discussion on this topic with this post (primarily for my own edification).

As I understand, PHP is a scripting language developed to link high-end databases to the web. PHP scripts are embedded in HTML documents and provide the link betwen the web server and the db. This adds security to the db since it is not published on the web per se. PHP is closely associated with SQL dbs and Apache web server software.

In my situation, the IT boys are currently not interested in publishing FMP dbs directly to the web but have offered to use an SQL ODBC infrastructure as an intermediary (IT boys like make work projects is my guess). If I understand how PHP works, PHP scripts are included in the html and when processed by the web server, query or post the information to the db and then upload the page to the user's browser.

1. Does PHP access FMP through WC? (I assume it does)

2. How robust is this process?

3. We're using Apache on Linux. If I'm using a Mac, how do I test the PHP and dbs without access to the web server?

Thanks for your input.

phil courterelle

Calgary Herald

[email protected]

Hi, Phil! Here's my ignorant but interested point-of-view. Maybe someone more knowledgeable will add/correct as needed, though...

(1) PHP/FMP

No, you would use Apache as your web server with the PHP module activated. PHP code would be in your HTML code just like CDML but PHP pages are hidden from view. Actually, I guess it's more like HTML is in your PHP pages (though you can put php tags in html pages, too). FMP is the database but all the interactions with it are done w/PHP instead of CDML.

(2) SPEED

I think (wild guess) that it would really, really crank.

(3) APACHE / MAC

If you're on Mac OS X, you have Apache and PHP all set to go. You'll have to find instructions on activating them but it shouldn't be bad. Once enabled, your X-Mac can do it all.

You should be able to sell your IT folks on PHP, but they may want to use mySQL instead of FMP. I haven't looked deep yet, but I'm gonna look at a product that lets you keep all your CDML intact and lets you add PHP code to your existing solutions. I need to handle active state cookie/token communication between my FMP database and remote authentication servers so don't think CDML/FMP calcs will do it. Lasso is definitely another possibility but I'm looking at the free/cheap route right now.

Oh, yeah... I (you) should look at Web Server Connector, too.

That's my "quick" response, anyway. I am interested in seeing what others end up saying, too.

Oh, BTW... see the PHP code in the URL of this FMForum page? Notice what a striking resemblence it has to CDML URL's?

And here's a sampling of some PHP:

---- snippet from http://www.php.net -------------------------

Example 2-1. Our first PHP script: hello.php

<html>

<head>

<title>PHP Test</title>

</head>

<body>

<?php echo "Hello World<p>"; ?>

</body>

</html>

The output of this script will be:

<html>

<head>

<title>PHP Test</title>

</head>

<body>

Hello World<p>

</body>

</html>

  • Author

sktajiri ..thanks for the response...good to know that OSX comes packaged with Apache/PHP...just another reason to upgrade...so if I understand you, PHP replaces CDML entirely? When using PHP to access the FMP db, do you stil need to activate web companion?

Garry, thanks for the links...I'd actually read both before and they piqued my interest in using PHP...what's the relationship between XML and PHP?

cheers

The WebCompanion plug-in is still required for whichever method is used.

PHP can parse the XML output of FM if required.

All the best.

Garry

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.