brainonastick Posted April 29, 2013 Posted April 29, 2013 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?
webko Posted April 29, 2013 Posted April 29, 2013 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');
brainonastick Posted April 29, 2013 Author Posted April 29, 2013 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.
brainonastick Posted February 4, 2014 Author Posted February 4, 2014 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.
Lee Smith Posted February 5, 2014 Posted February 5, 2014 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.
brainonastick Posted February 5, 2014 Author Posted February 5, 2014 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.
webko Posted February 6, 2014 Posted February 6, 2014 That should work, so long as $dataSourceType = "FMPro7" (which AFAIK works with 12 as well...)
brainonastick Posted February 7, 2014 Author Posted February 7, 2014 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. )
Recommended Posts
This topic is 4277 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