[FX.php List] Connectivity of PHP 5.0.x/4.3.9 with fx.php 3.0
Dale Bengston
dbengston at preservationstudio.com
Mon Nov 22 10:44:48 MST 2004
Try inserting above your foreach loop:
echo $ReturnedData['errorCode'];
...and see what error FileMaker is reporting back.
Does your database have a password? If so, you'll need to pass that to
FX.
Dale
--
Dale Bengston | Streamline Studio, LLC | dbengston at streamline-studio.com
Associate Member, FileMaker Solutions Alliance
On Nov 22, 2004, at 7:36 AM, Anchal Jain wrote:
> Hi All,
> I am not able to get connectivity of filemaker7 with PHP
> 5.0/4.3.9.I am using the following simple code:-
> <?php
> if( !isset($_SERVER['PATH_TRANSLATED']) )
> {
> if(isset($_SERVER['SCRIPT_FILENAME']))
>
> $_SERVER['PATH_TRANSLATED'] =$_SERVER['SCRIPT_FILENAME'];
>
> else
> $_SERVER['PATH_TRANSLATED'] =realpath('install.php');
> }
>
> if (! isset($_SERVER['DOCUMENT_ROOT'])) {
> global $DOCUMENT_ROOT;
> global $HTTP_SERVER_VARS;
>
> $_SERVER['DOCUMENT_ROOT'] = str_replace(str_replace('\\\\', '/',
> $_SERVER['PHP_SELF']), '', str_replace('\\\\', '/',
> $_SERVER['PATH_TRANSLATED'])) . '/';
> $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
> }
>
>
>
> include_once("/inetpub/wwwroot/FX7/FX.php");
> include_once("/inetpub/wwwroot/FX7/server_data.php");
>
> $serverIPAddress = '127.0.0.1';
> $currentDatabase = 'Tester.fp7';
> $InstanceName = new FX($serverIPAddress,'80','FMPro7');
> $InstanceName->SetDBData($currentDatabase);
> $ReturnedData = $InstanceName->FMLayoutNames();
> echo "<b>Layouts in $currentDatabase </b><br />\n";
> foreach ($ReturnedData['data'] as $value) {
> echo $value['LAYOUT_NAME'][0];
> }
> ?>
>
> With this code the get the following error message:-
> Warning: Cannot use a scalar value as an array in
> C:\Inetpub\wwwroot\Buddysys\test\test5.php on line 33
>
> Warning: Invalid argument supplied for foreach() in
> C:\Inetpub\wwwroot\Buddysys\test\test5.php on line 33
> Any help would be appreciated.
> Regards,
> Anchal Jain
> _______________________________________________
> 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