pcourterelle Posted December 21, 2002 Posted December 21, 2002 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]
Steve T. Posted December 21, 2002 Posted December 21, 2002 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.
Steve T. Posted December 21, 2002 Posted December 21, 2002 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>
Garry Claridge Posted December 21, 2002 Posted December 21, 2002 Here are a couple of threads with some information of interest: PHP & CDML PHP and File Uploads All the best. Garry
pcourterelle Posted December 23, 2002 Author Posted December 23, 2002 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
Garry Claridge Posted December 23, 2002 Posted December 23, 2002 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
Recommended Posts
This topic is 8075 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 accountSign in
Already have an account? Sign in here.
Sign In Now