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

Chris Hansen chris at iViking.org
Fri Dec 1 18:29:05 MST 2006


Jason,

Usually when I see this sort of problem, it means that there's some  
sort of connection problem.  (Not to discount any of what's been said  
here, but you haven't responded that anything here fixed your  
problem...)  Have you tried making your connection directly?  That  
is, turn on DEBUG, and attempt the XML query to FileMaker directly.   
Add a line like the following near the top of your file:

define("DEBUG", true);

Then, attempt to access that URL directly.  What is the result?

I've been using versions of PHP5 with FX.php without incident, so  
that may not be what you're encountering.  HTH

--Chris Hansen
   FileMaker 8 Certified Developer
   FileMaker 7 Certified Developer
   Creator of FX.php
   "The best way from FileMaker to the Web."
   www.iViking.org


On Nov 20, 2006, at 4:16 PM, jason f. boldt wrote:

> 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>";
> ?>
>
>
> _______________________________________________
> 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