[FX.php List] “lost network connection” problem when using PHP 5 with FX.php and FileMaker 6

jason f. boldt jason_fb at beezwax.net
Mon Nov 20 16:16:17 MST 2006


Dear FX PHP List:

I am only at the very first steps of configuring PHP to work via  
FX.PHP class to a FileMaker database published by a FM Pro 6 client  
copy running Web Companion. If I could get past this step I'm sure  
I'd love the class (I've worked with it successfully before).

The web publishing computer (FM Pro 6 client running Web Companion)  
works OK-- I can load the Instant Web Publishing content in my  
browser and see the served databases via the IWP interface.

I have created a very simple PHP script as follows (see below). When  
I execute the script, I get a server time-out issue. In Safari, it says:

The error was: “lost network connection” (NSURLErrorDomain:-1005)

In other browsers (Firefox), it actually does not give an error  
message but instead tries to save the page locally as if it were a  
downloaded file.

IMPORTANT: When I comment-out the single line that makes the FX call  
{ $data = $directqry->FMFind(); } using a # symbol:

# $data = $directqry->FMFind();

... the page loads FINE. When this line is omitted (commented-out)  
PHP produces the content you'd expect (in my case, it produces a Hard- 
Rule line followed by the word "done").

So basically I've isolated the problem to some kind of server timeout  
or PHP crash that happens when the FX call is being made. PHP is  
*supposed* to be safe and produce a fatal or non-fatal error message,  
but I'm guessing that something in FX.php is causing the process to  
crash and that this causes the page load not to finish, which is what  
causes the "lost network connection". (This is a hypothesis based on  
observation).

Maybe I haven't configured FX.php correctly? I copied all the files  
to my libs/FX/ folder and then made them all readable by the web  
server user (www). Anything I'm missing?

Maybe FX.php isn't compatible with the version of PHP I'm using? (I  
have PHP 5.0.4 installed on this machine).

What else should I check or try?

here's my VERY SIMPLE PHP script-- this is just a "dummy" script for  
testing.....



<?php
require_once("libs/FX/FX.php");
require_once("fm_server_data.php"); // note that this file sets the  
config variables used here

$directqry = new FX($serverIP, $webCompanionPort, $dataSourceType);
$directqry->SetDBPassword($fm_dbpass);
$directqry->SetDBData($fm_dbname,$fm_dblayname, 1);
$directqry->AddDBParam("AccNo","95001",'eq');

$data = $directqry->FMFind();

print "<HTML><BODY>";
print_r($data);
print "";
print "<HR>done<BR><BR></BODY></HTML>";
?>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20061120/314ff455/attachment.html


More information about the FX.php_List mailing list