[FX.php List] FM6 & FM8 on same page?

Steve Winter steve at bluecrocodile.co.nz
Tue Jun 27 05:03:28 MDT 2006


Hi Kevin,

I've just hacked together a test of this situation, all I did was copied
code blocks from two different solutions, one which runs on FM7SA, the other
on FMU6;

  include_once("assets/fx/fx.php");                         
   
  $groupQuery = new FX('192.168.0.13', '80', 'FMPro7');
  $groupQuery->SetDBData("emGroups", "web");
  $groupQuery->SetDBUserPass($userName, $password);
  $groupQuery->AddDBParam('groupID', $_COOKIE['groupID']);
  $groupData = $groupQuery->FMFind();
  $groupKey = key($groupData['data']);

  echo '<pre>';
  print_r($groupData);
  echo '</pre>';
  
  $locationQuery = new FX('192.168.0.2', '591', 'FMPro5/6');
  $locationQuery->SetDBData("pgItinerary.fp5", "web");
  $locationQuery->AddDBParam('date', date("d/m/Y"));
  $locationData = $locationQuery->FMFind();
  $locationKey = key($locationData['data']);

  echo '<pre>';
  print_r($locationData);
  echo '</pre>';

And it all works fine...as you can see I've got FM8SA running on one box,
and FM6U running on another, both on my lan and the above works fine,
returning the data that I would have expected for both requests...I did
nothing to FX.php itself... 

What are you specifically having issues with...??

Cheers
Steve

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Kevin Futter
Sent: Tuesday, 27 June 2006 4:30 p.m.
To: FX.php Discussion List
Subject: [FX.php List] FM6 & FM8 on same page?

Hi everyone,

Thanks to those who tried to help out with my previous issue - I've got it
mostly sorted now. However, I do have another one, if you'll all bear with
me.

For practical reasons we've decided to migrate from FM6 to FM8
incrementally. I have a page that actually talks to two different FM
databases, one of which is the first cab of the rank for the conversion to 8
(due to its relative simplicity), and the other will be one of the last (due
to its relative complexity). I've been struggling all day to get one page to
talk to both DBs on separate v6 and v8 servers, but no luck. I've created a
second copy of FX on the server and tweaked it to work with FMSA8, and I've
called its folder "FX48". The twin-FX scenario works fine for
single-DB-per-page solutions, but they seem to override each other if I try
to talk to both on the same page. I tried wrapping the code that talks to
each db in separate functions, include files and all, in the hopes that that
would isolate them, but it seems there's something in FX (constants
perhaps?) that is permeating the function scope. Whichever function is
called first seems to instantiate values that override those of the FX
include files in the second function - if that makes sense.

Anyway, has anybody done this? Is there a way of doing it? I've thought of
maybe running getting PHP to write the results of one of the db calls to a
static file and then including that, but that seems pretty kludgy and a lot
of work.

Could I possibly just have multiple copies of the relevant FX files in one
folder (meaning only one include path), but name them differently? For
example, FX46.php & FX48.php, each tweaked for the appropriate server. Any
help or ideas here would be greatly appreciated!

--
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/



------------------------------------------
This e-mail and any attachments may be confidential.  You must not disclose
or use the information in this e-mail if you are not the intended recipient.
If you have received this e-mail in error, please notify us immediately and
delete the e-mail and all copies.  The College does not guarantee that this
e-mail is virus or error free.  The attached files are provided and may only
be used on the basis that the user assumes all responsibility for any loss,
damage or consequence resulting directly or indirectly from the use of the
attached files, whether caused by the negligence of the sender or not.  The
content and opinions in this e-mail are not necessarily those of the
College.


_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list






More information about the FX.php_List mailing list