[FX.php List] Trouble migrating from FMP6UL to FMPSA8

Jonathan Schwartz jonathan at eschwartz.com
Mon Apr 17 14:48:26 MDT 2006


I've moved from FMP6UL to a Developer's copy of FMPSA8...and I just 
can't get a my first previously working script to work.  It's just a 
simple login.

In short, it doesn't find the intended record.  And in trying 
different queries, it won't find *any* records.  I just get the msg: 
"Unsucessful login attempt.  Please try again."

Yet, a query using native FM XML does work.: 
<ip-of-server>/fmi/xml/fmresultset.xml?-db=families&-lay=web&username=MyName&password=11111&-find........so 
I can conclude that WPE and database are set up properly.

Here is the code.  Resulting array is listed below that. I've worked 
this thing to death, without luck. Any help would be appreciated.

OS X Server 10.4.5
Php 4.3.11
Lastest fx.php
FMPSA 8v1


Thanks

Jonathan


<?php
include ("FX/FX.php");
include ("FX/server_data.php");

#include ("session_handler.php");

$searchData = array_keys($_REQUEST);

  echo "<pre>";
  print_r($_REQUEST);
  print_r($searchData);
  echo "</pre>";

$query = new FX($ServerIP, $dataPort, $dataSourceType, $scheme);
$query->SetDBData ('families.fp7','web');
$query->SetDBPassword ($webUN, $webPW); 

$query->AddDBParam ('username', $_POST['username'], 'eq');
$query->AddDBParam ('password', $_POST['password'], 'eq');
$findResult = $query->FMFind();

if ($_POST['username'] == "" || $_POST['password'] == "") {
     $msg= 'Please fill in both fields.';
     include_once ("logon.php");
	exit;
}  else { $msg =" ";

}

if ($findResult['foundCount'] == 1) {

	$recID=current($findResult['data']);
	$internal=explode('.',key($findResult['data']));
	$internalRecID=$internal[0];

	include_once ("includes/header.php");
	include_once("detail.php");       

	exit;

} else {
	$msg = "Unsucessful login attempt.  Please try again.";
	include ("logon.php");

}

?>


--------------

Array
(
     [username] => schwartz
     [password] => 1
     [submit_x] => 0
     [submit_y] => 0
     [PHPSESSID] => 2e6e994bf15b311a9d88ec60091de493
     [fmi-cookie] => fmi-cookie
)
Array
(
     [0] => username
     [1] => password
     [2] => submit_x
     [3] => submit_y
     [4] => PHPSESSID
     [5] => fmi-cookie
)
-- 

Jonathan Schwartz
Schwartz & Company
817 Marin Drive
Mill Valley, CA 94941
Phone: 415-381-1852
jonathan at eschwartz.com - http://www.eschwartz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060417/2c284c08/attachment.html


More information about the FX.php_List mailing list