[FX.php List] Warning: Cannot use a scalar value as an array in

Greg Lane glane at moyergroup.com
Tue Nov 1 23:05:19 MST 2005


Kim,

I believe version 4 uses FMPro7 as the default data source. Chances  
are your code is using the default. If your code includes the  
server_data.php file, you can change that file as follows:

     $webCompanionPort = 591;    // ...or whatever port FMP is using
     $dataSourceType = 'FMPro5/6';

Or, you could make the change in your PHP code wherever you create a  
new instance of FX. Look for lines containing "new FX" and set the  
second and third parameters to the values shown above:

     $MyQuery = new FX($serverIP, $webCompanionPort, $dataSourceType);


Greg


On Nov 1, 2005, at 11:21 PM, Kim Hawksworth wrote:

> I’m trying to upgrade FX.php from a version dated August 2004 to  
> version 4.0.  The new version is giving the following error message  
> when performing a find:
>
> Warning: Cannot use a scalar value as an array in /Library/ 
> WebServer/Documents/pagers/pager_browse_staff.php on line 82
>
>
> The code in question on line 82 is as follows:
>
> foreach ($stf_pager_results['data'] as $recordKey =>$recordData) {
>
> In addition to this error, pop-up menus in forms are not showing  
> any values from their respective valueLists in the database.   It’s  
> almost like FX.php is not able to find the database.
>
> The server is running Mac OS 10.4.3 server.  The database is  
> running FMPro 6.0 with v4 of the web companion.  Everything works  
> fine with the older version of FX.php.  Any ideas why it breaks  
> with version 4.0?  Does 4.0 only work with FMPro7?



More information about the FX.php_List mailing list