[FX.php List] RE: Form not seeing database (XPOST)

VanBuskirk, Patricia pvanbuskirk at fsu.edu
Sat Jun 23 16:57:25 MDT 2012


Dale,
I created a simple form to try to test the connection, and still can’t figure out what is going on.

Here’s the form:
<?php
error_reporting (E_ALL);
define('DEBUG', true);

require_once('FX.php');
require_once('FMErrors.php');

define('FM_IP', '146.201.5.152');
define('FM_PORT', '80');
define('FM_VERSION', 'FMPro7');
define('FM_USERNAME', 'web');
define('FM_PASSWORD', 'web');

$returnCount=200;
$instanceName=new FX(FM_IP, FM_PORT, FM_VERSION);
$instanceName->SetDBData('Web_Forms', 'Orders_ListView', $returnCount);
$instanceName->SetDBUserPass(FM_USERNAME, FM_PASSWORD);
$instanceName->AddDBParam('Order_Number', "TSR179412");
$Result=$instanceName->FMFind();

echo $Result."<br>";
echo "Hello Trish";

The page I get has this:
Accessing FileMaker Server 7+ data.
Using FileMaker URL: http://web:web@146.201.5.152:80/fmi/xml/FMPXMLRESULT.xml?-db=Web_Forms&-lay=Orders_ListView&-max=200&Order_Number=TSR179412&-find

Catchable fatal error: Object of class FX_Error could not be converted to string in E:\Inetpub\wwwroot\Forms\Buildings.php on line 24
Clicking on the link takes me nowhere, so I’m not sure if it’s getting connected or not.

Can you tell by looking?

~ Trish

From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dale Bengston
Sent: Saturday, June 23, 2012 4:24 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] RE: Form not seeing database (XPOST)

Hi Trish,

Second error first - your code is expecting an array and it's getting a php error object: FX_Error. Do a print_r on the variable in line 106 that's supposed to be your fx data array. You should then get better feedback about what's happening.

First error second. If your popup menu is truncating in the middle and breaking the page, it may have an element that contains corrupt data or characters being interpreted as an HTML entity. Try viewing source on the page to see if thempage code continues past where it stops drawing on the screen. With luck, it'll show you exactly which value is causing the fail.

Hope that helped,
Dale


On Jun 23, 2012, at 7:36 PM, "VanBuskirk, Patricia" <pvanbuskirk at fsu.edu<mailto:pvanbuskirk at fsu.edu>> wrote:
I took out all the dropdown php info and tried to submit the form without it.  Got this error back:
Catchable fatal error: Object of class FX_Error could not be converted to string in E:\Inetpub\wwwroot\Forms\Repair\repairconfirm.php on line 106

~ Trish

From: fx.php_list-bounces at mail.iviking.org<mailto:fx.php_list-bounces at mail.iviking.org> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of VanBuskirk, Patricia
Sent: Saturday, June 23, 2012 1:10 PM
To: FX.php Discussion List
Subject: [FX.php List] Form not seeing database (XPOST)

I have had to re-setup our web server and FM server.   The databases are hosted and open, and have all the correct web settings and were previously working fine (just copied to a backup folder prior to the maintenance work and copied back when completed).

The forms contain dropdown lists that pull in from the database(s) that will not work now.  Does anyone have an idea for why this stopped working?

Here’s an example of the code in the form.  The form stops at that point … doesn’t show the dropdown info, and also doesn’t show any more of the form.  I tried replacing the line that requires the server_data.php file with the actual lines from that file, but that didn’t work either.

<?php

require_once('FX.php');
require_once('server_data.php');


// configure a connection to FileMaker Server Advanced
$ordersQuery = new FX(FM_IP, FM_PORT, FM_VERSION);
// set database and layout information
$ordersQuery->SetDBData('Dept_Directory', 'SG_SectionsLIST', 'all');
//$ordersQuery->SetDBData('WEB_Forms', 'SG_Sections', 'all');
// set database username and password
$ordersQuery->SetDBUserPass(FM_USERNAME, FM_PASSWORD);
// retrieve all records in this database available to the current user
$ordersQuery->AddSortParam('ListForWeb', 'ascend');
$orders = $ordersQuery->DoFXAction(FX_ACTION_FINDALL);
    echo "                <option>Student Request\n";
            foreach ($orders as $contact) {
    echo "                <option>{$contact['ListForWeb']}\n";

}
?>


Trish Van Buskirk
Technology Specialist
Information Technology Services
Florida State University
2035 E. Paul Dirac Dr / Tallahassee, FL 32310
Phone: (850) 645-8063
http://www.its.fsu.edu

_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org<mailto:FX.php_List at mail.iviking.org>
http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120623/a9d2891f/attachment-0001.html


More information about the FX.php_List mailing list