Setting Up FMStudio with FMGateway

From FMWebschool Reference

Jump to: navigation, search

Setting up FMStudio with the FMGateway server involves mainly setting up the Dreamweaver site with the correct FTP and Testing Server URL prefix settings. The instructions on this page assume you are creating a new site and take you step by step through the process.


Preparing your FMGateway Site

This example will be using a subfolder to store the FMStudio site, which once complete can be moved into the root of your FMGateway account to act as the main site. The subfolder method is often used to separate multiple client projects on a single hosting account.

  1. Open up your FTP client and connect to FMGateway
  2. Once connected you should see a number of folders including "httpdocs"
  3. Enter the directory, this is the root of your web site that is served to the user
  4. In this directory create a sub folder for this project, name it "HelloWorld"

Creating a New Site

  1. Select Site -> New Site...

Local Settings

Local Site Settings
  1. Select a site name, we will use "Hello World" as the name
  2. Select a local folder for the files, this can be anywhere on your hard drive, in this example I use "J:\FM\HelloWorld"
  3. Default images folder can be left blank
  4. Important Step: Set the "HTTP address" to your subdomain at FMGateway and the subfolder that the files will go into, I use ""

Remote Settings

Remote Info Site Settings
  1. Select "FTP" as the Access
  2. Set the FTP host to your subdomain at FMGateway without the "http://", I used ""
  3. Important Step: For the host directory enter the path relative to where FTP logs in that gets you to the project directory. Since I created the HelloWorld directory inside of the httpdocs folder I entered "/httpdocs/HelloWorld/". If you just use the root of your site then you would need to enter just "/httpdocs/".
  4. Click Test to make sure the settings are correct

Testing Server Settings

Testing Server Settings
  1. Select PHP FileMaker as your server model (or PHP FileMakerFX if using FX.php)
  2. Select FTP as the Access, your FTP settings should already be there
  3. Important Step: for the Testing Server URL Prefix enter the URL to your sub folder on the site. It will likely suggest a URL for you that includes "/httpdocs/" in it, that must be removed. the URL I use here is the same as the one on the local site: ""
  4. Confirm all your settings and click "Ok"

Preparing the Site and Installing an API

Files are of Dreamweaver after Installing an API
  1. Make sure your new site is selected in the Files area of Dreamweaver
  2. Right click in that area on the site folder and choose New File, name it "index.php"
  3. Double click on index.php to open it
  4. Now using the Commands menu, choose "Install PHP API" (or "Install FX.PHP")
  5. In the dialog that comes up, choose Server 9 as your server version (no dialog will come up for FX.php)
  6. Your Files area should now include a new FileMaker folder and a FileMaker.php file (or just the FX folder for FX.php users)
  7. Select the FileMaker folder, right click, and choose "put" (wait for the files to be uploaded to FMGateway)
  8. Select the FileMaker.php file, right click, and choose "put" (wait for the file to be uploaded to FMGateway)

You now have the API installed within your site and are ready to start making database connections.

Testing the URL Prefix

To test if your URL Prefix was set correctly, which is the most common configuration mistake - it is best to try and preview one of your pages in a browser.

  1. Make sure index.php is still open
  2. In Design view type in "Hello World"
  3. Save the page
  4. Use the Preview in Browser (F12 on most systems) dreamweaver option to let Dreamweaver upload that page and open it in a browser
  5. The page with "Hello World" should come up, and the URL should be pointing to
  6. If you get a 404 File Not Found, then try changing the URL in the browser until the page comes up
    1. Now take the changed URL and place it back in the Testing Server settings and your Local Settings (removing index.php from it)
    2. Make sure it is now correct by using Preview in Browser again and making sure the page comes up with no URL changes

Creating the Database Connection

Files are of Dreamweaver after Installing an API
  1. Find the Databases tab under the Application area of Dreamweaver
  2. Click the "+" button and select "FileMaker Connection"
  3. In the connection name enter "MyDatabase" or any other more descriptive name for your database that should already be uploaded and opened on the FMGateway server.
  4. In the FileMaker Server field enter your subdomain at FMGateway, I used ""
  5. Enter your user name and password
  6. Click "Select..." next to the Database field
  7. A list of databases should come up, if you have an error then please take a look at the FMStudio Troubleshooting article for hints on how to solve it.
  8. Important Step If your database(s) don't show up on the list you may not have set them for network sharing. If you get an error message that says "Connected to server but login failed", check you database(s) for network sharing. Open Filemaker and open the database(s) that will go on the server. Select FILE - SHARING - FILEMAKER NETWORK and set network sharing to ON. Close your database(s) and reload them through the site administration page: Once this is completed you can return to this section "Creating the Database Connection" and continue with the setup process.
  9. Once you select your database, confirm the database selection dialog by clicking "Ok"

Uploading the Connections Folder

Now that you have your database added, you need to upload the new Connections folder to FMGateway and then your work with FMStudio can begin!

  1. Right click on the newly created Connections folder in Dreamweaver and choose "put"
  2. Any database setting changes that you make such as a new user name and password, you must repeat this step
Personal tools