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.

Upgrading to Filemaker Pro 12 and FX.php

Featured Replies

Currently our web pages call Filemaker using the following code:
 
$newregistration = new FX($serverIP,$webCompanionPort);
$newregistration -> SetDBData('Web Registration Information.fp7', 'Web Registration Information');
$newregistration -> SetDBPassword($webPW, $webUN);
 
If we migrate to Filemaker 12 which seems inevitable, do we have to change the database file extension to .fp12 on every php web page?
 
Or does FX.php have a work around that makes this unnecessary?

I use a connection file. Thus I only have to change this stuff in one place for a site.

 

newFX accepts more parameters than that too - new FX($dbHost,$port,$dbType,$conType);

 

Then the SetDBData only needs ('Filename','Layout') - no need for the .fp7 if you set $dbType in the first place...

 

So, my db_conn.php file looks like:

<?php

    $dbHost='server.address.com';        //Database IP
    $port='80';                        //Webserver Port
    $dbType='FMPro7';                    //For FMPro7
    $conType='HTTP';                    //Connection Type
    $dbUser='user';                    //Database User Name
    $dbPass='password';                    //Database Password
    $dbName='Database_Name';            //Database Name
    
?>
[/code]
 
And my initial connection information might look like:
 
[code]
    include_once('../include/db_conn.php');    // DataBase Configuration File.
    include_once('../include/FX/FX.php');    // FX.php file
    //Base connection information
    $findLOC = new FX($dbHost,$port,$dbType,$conType);
    $findLOC -> setDBPassword($dbPass,$dbUser);
    $findLOC -> setDBData($dbName,'layout');
  • Author

Thanks webko - I havent looked at this code in years as it didnt need any changes until Filemaker decided to change the file extension again. I really wish they'd stop adding a numerical version number in the file extension - it would save us all a lot of bother. Thanks again.

  • 9 months later...
  • Author
Further to the above a consultant looked at the FX.php code and figured out that all that needs to happen is for "FMPro7" to be replaced with $dataSourceType and then the file extension could be removed from the database filename as follows:
 
BEFORE
 
$Course_Search=new FX($serverIP,$webCompanionPort,'FMPro7');
$Course_Search->SetDBData('Course Information.fp7','Course Information',$groupSize);
$Course_Search->SetDBPassword('fmsadmin','fmsadmin');
 
AFTER
 
$Course_Search=new FX($serverIP,$webCompanionPort, $dataSourceType );
$Course_Search->SetDBData('Course Information','Course Information',$groupSize);
$Course_Search->SetDBPassword('fmsadmin','fmsadmin');
 
Can anyone see a problem with this? The edited web page is calling the .fp7 version of the database. I can't test if it calls the .fmp12 version just yet.

I deleted your other post to this topic area as a duplicate post.

 

Please do not multiple posts your questions and/or replies in the forum. 

  • Author

Hi Lee,

 

The last reply was from April 2013 and I was concerned that my reply to my own post would not be seen as I have a further request for advice. And as i feared no-one has responded in 24 hours.

That should work, so long as $dataSourceType = "FMPro7" (which AFAIK works with 12 as well...)

  • Author

Thanks webko.

 

Actually $dataSourceType = "FMPro 9" in FX.php. Hope that doesn't make a difference. Also what does AFAIK mean? 


sorry disregard question about what AFAIK means.  I found it on Google acronyms. Never come across it before. :o)

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.