[FX.php List] Newbie Question

Dale Bengston dbengston at preservationstudio.com
Sun Sep 25 12:10:30 MDT 2005


Hi Ahmad,

You must be retrieving a large amount of data with FX.php. Your  
browser is timing out before it can process all the stuff coming into  
it. In this case, the FX error is a red herring. If you're retrieving  
lots of data, make sure the layout specified in SetDBData is limited  
to just the fields necessary. If you're still having trouble with the  
timeout, you can also use PHP's built-in function...

set_time_limit(integer)

...where integer = an amount of time in seconds. Details may be found  
at this site: <http://us2.php.net/manual/en/function.set-time-limit.php>

Before you just extend the patience of the web browser to accommodate  
the large data retrieval, you might want to consider the patience of  
your users. Perhaps it would be better to retrieve the data in  
sections or by category rather than everything in the world using  
FMFindall. For example, retrieving names (as in your sample) in  
groups: A-F, G-L, M-R ....

Hope this helps,
Dale


On Sep 25, 2005, at 12:51 PM, Ahmad Kaifi wrote:

> Hello everyone,
>
> I can't come up with a solution to this at all..
>
> I typed up the very first example in the "FX.php in 8 Hours"  
> offered by FMWebSchools and tried to run it but I keep getting this  
> mistake:
>
> Fatal error: Maximum execution time of 30 seconds exceeded in c: 
> \Inetpub\wwwroot\php8\FX\FX.php on line 610
>
> No matter what I try to do, I get this.
>
> Its happening right when the FX class is building the 'data' array.
>
> Line 609:                while (!feof($fp)) {
> Line 610:                    $data .= fgets($fp, 128);
> Line 611:                }
>
> I'm running both FMSA and my webserver (IIS) on my local WinXP  
> machine. They are both using port 80.
>
> When I create a regular XML url like this it works fine:
>
> http://127.0.0.1/fmi/xml/fmresultset.xml?-db=Contacts.fp7&- 
> lay=Contacts&hotel=testout&-new
>
> Here is the code:
>
> <?php
>     include ('FX/FX.php');
>     include ('FX/server_data.php');
>
>     $instanceName = new FX($serverIP, $webCompanionPort);
>     $instanceName-> SetDBData('Contacts.fp7','Contacts');
>     $instanceName-> SetDBPassword('','Admin');
>     $instanceResult = $instanceName->FMFindAll();
>
>     foreach($instanceResult['data'] as $key=>$instanceData)
> ?>
>
> <html>
> <head>
> <title>The Developer Connection</title>
> </head>
> <body>
> <?
>     include('includes/header.php');
> ?>
>
> Error Code: <?php echo $instanceResult['errorCode']; ?> <br>
> Found Count: <?php echo $instanceResult['foundCount']; ?> <br>
>
> <?php
>     foreach($instanceResult['data'] as $key=>$instanceData){
>         echo $instanceData['name_first'][0];
>     }
> ?>
>
> </body>
> </html>
>
>
> Thanks in advance!!!
>
> Ahmad Kaifi
> _______________________________________________
> FX.php_List mailing list
> 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://www.iviking.org/pipermail/fx.php_list/attachments/20050925/b82d2b94/attachment.html


More information about the FX.php_List mailing list