Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unable to connect to FMS7A via FX.php

Featured Replies

Dear Folks,

I'd like to publish an FM7 file to the web using FMS7A and FX.php v3.0. I'm serving from Windows 2003 running IIS 6.0 and PHP 5.0.2.

Following the FX.php in 8 Hours tutorial from FMWebSchool.com, I've set up FMS7A and the web publishing console. I can see the database is available and awaiting publication via IWP and XML. I've confirmed connectivity via IWP.

I'm running into several problems with FX.php. Here is the code:


<html>

<head>



<?php // Initialize Vars

include_once("FX/FX.php");

include_once("FX/server_data.php");

include_once("FX/FMErrors.php");



// create instance per tutorial

$instanceName = new FX($serverIP,$webCompanionPort);

$instanceName -> setDBData('BugTracker.fp7','BugTracker');

$instanceResult = $instanceName->FMFindall();



?>



<title>The Developer Connection</title>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="web_style.css" rel="stylesheet" type="text/css">



</head>



<body>



<?php

include_once("includes/header.php");



foreach ($instanceResult['data'] as $key => $instanceData)



?>



Found Count: <?php echo $instanceResult['foundCount']; ?> <br />

Error Code: <?php echo $instanceResult['errorCode']; ?> <br />



</body>

</html>



Problem 1)

I get this error:

Fatal error: Cannot use object of type FX_Error as array in d:Inetpubwwwrootphp8show_all.php on line 27

(line 27 is the foreach statement)

Problem 2)

If I change FX.php line 50 to read anything but 'FMPro5/6' or 'FMPro7', the same page will load and return the following values below the header image:

Found Count: -1

Error Code: No Action Taken

It seems like the request is not reaching the database.

What am I missing? What is preventing me from accessing the database via FX.php?

Thanks in advance,

Shannon

-=-=-

  • Author

I fixed these issues. They appear to be caused by my version of PHP. I abandoned PHP 5.0.x due to access violation and other strange errors. I'm now running 4.3.9 and all is well. Hope this helps.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.