FMStudio Complete Guide Chapter 2
From FMWebschool Reference
Contents |
Chapter 2. Installing FMStudio – Local Set-up
To install FMStudio, you will need to use the Dreamweaver Extension Manager. Help > Manage Extensions.
Image 2 – 1: Manage Dreamweaver Extensions
Once the Extension Manager is open, make sure you have the correct version of Dreamweaver selected before you install FMStudio.
To install FMStudio, simply locate the FMStudio Extension and choose "Install Extension" from the File Menu, or select the install extension icon.
Image 2 – 2: Install the FMStudio Extension by selecting “Install Extension”
In the future, if you will be installing any additional FMStudio modules, do this by selecting File > Install Extension.
Note: Once FMStudio is installed, you must restart Dreamweaver in order to completely use FMStudio. Mac users, this means to exit from Dreamweaver completely using the Dreamweaver 'Quit' menu option.
Begin by creating a new site
Creating a new site is extremely easy. Select site > new site from the main menu.
Image 2 – 3: Select Site > New Site to create a New Site
Note: Never work with FMStudio without having an FMStudio site defined. FMStudio may appear to be working, but will fail within minutes.
- Once the Site Definition Window opens, select the 'Advanced' tab. The Advanced tab allows us to manually configure the settings required to connect Dreamweaver and FMStudio to FileMaker.
- Give the website an informative name. In this example we will name the site 'Local Tutorial'.
- Select the local root folder. This is very important, if you are using IIS, this should be a subfolder of your C:\Inetpub\wwwroot\. If you are on the Mac, it should be a subfolder of your Library\Webserver Documents\. Create a subfolder there. In this example, let’s name the subfolder 'Local'.
- The next item we will need to add is the HTTP address. This will be 127.0.0.1/local/. If you used a different subfolder name while setting up your site, you will use that name instead of 'local'. Do not include 'www' root or 'Webserver, Documents' in your path.
- Only use what follows 'www' or 'webserver documents'. Make sure your settings resemble the Image 2 – 4 below.
Image 2 – 4: Select the Advanced tab and enter the correct settings.
Setting up the Testing Server
- Under the category menu, select 'Testing Server' since this is a local set-up. Under the 'Server Model' drop down, select the PHP FileMaker server model, or for FX users, PHP FileMaker FX as shown below.
Image 2 – 5: Select the PHP server Model you will be using either PHP FileMaker or PHP FileMaker FX.
- Next, for the access, select 'Local/Network’
Image 2 – 6: Select Local / Network
- For the URL prefix, make sure it is the same as in the local info, which would be 'http://127.0.0.1/local/’. Press the "OK" button; you are now finished setting up the test server.
Image 2 – 7: Testing server with all of the appropriate settings
Creating a dynamic PHP page
Now that the local site has been defined, you will need to add a new PHP page. Creating a new PHP page with Dreamweaver is very simple.
- From the Dreamweaver main menu, select ‘File > New’.
Image 2 – 8: Select File > New from the Dreamweaver main menu to create a new page.
- The 'New Document' window will open. In the category view, select 'Dynamic Page' and under the Dynamic Page section, choose PHP for FileMaker. (Read Below for a Special Note for MX users)
Image 2 – 9: Select Dynamic page from the Category section, and ‘PHP for FileMaker’ from the Dynamic page section.
Note: Attention Dreamweaver MX / MX 2004 users. You will most likely not have PHP for FileMaker displaying in this list, just PHP. Just select 'PHP' from the list.
- Once the new page has been created, type some text such as "Hello World". Save this page as index.php in your local folder.
Image 2 – 10: Save this page as index.php in your local folder.
Installing the FileMaker API / FX.php
1. From the main menu, select Commands > Install FileMaker API or install FX.php.
Image 2 – 11: Select Install FileMaker PHP API or FX.php
Image 2 – 12: Click ‘OK’ to verify that you want to install the PHP API
Once installed, you should see a FileMaker folder as well as a number of other files in the 'File Section' on the right. See image below.
Image 2 – 13: FileMaker API files installed
If the File panel area is not displaying, open the 'Files' section by selecting Window > Files from the Dreamweaver main menu.
Image 2 – 14: Open the Files panel by selecting F8 or by selecting Window > Files
2. Now that the installation is complete, go to the databases tab – located under 'Applications'.
Image 2 – 15: The Database tab is found under the Application panel.
3. Click the plus button, and then choose 'FileMaker Connection' from the drop-down menu.
Image 2 – 16: Select FileMaker Connection
The other connection types displayed will be discussed in later chapters.
A 'FileMaker Connection' dialog box will appear. The connection name should be 'Alpha Numeric' only with no spaces, just underscores.
- In this example, we will use 'Photos' as my connection name.
- For the FileMaker server, use the IP address of where the web-publishing engine is deployed. On a single machine set-up, this is likely your local server. Otherwise, this might be a remote hosting service or another machine in your local network. In this case select FileMaker server on another machine.
- The username and password is a FileMaker user defined under 'Accounts and Privileges' in FileMaker Pro, and must have the 'fmphp' extended privilege or 'fmxml' extended privileges (for FX.php) users set-up.
Image 2 – 17: FileMaker Connection with the appropriate values added
Note: Read this section if you have not set up Privilege sets in FileMaker. If you do not have the proper Accounts and privileges set up, you will not be able to set up a database connection. Setting up the required ‘fmxml’ extended privilege set is very easy.
- Open FileMaker Pro, and under the main menu, select Manage > Accounts and Privileges.
Image 2 - 18. Select File > Manage > Accounts and Privileges
- The ‘Manage Accounts and Privileges’ dialogue box will appear. Select the ‘Extended Privileges’ tab and click the ‘New’ button.
- In the Edit Extended Privileges window, define a new extended privilege set. If you are using FX.php create a privilege set named ‘fmxml’. If you are using the API for PHP, create a privilege set named ‘fmphp’.
Image 2 – 19: Create a new FX.php privilege set by clicking the new button and adding an ‘fmxml privilege set.
Image 2 – 20: Create a new FileMaker API for PHP privilege set by clicking the new button and adding an ‘fmphp’ privilege set.
- Click OK. Your new privilege sets have been created.
- Return to Dreamweaver so you can continue setting your database connection.
- In Dreamweaver, select the 'select' button next to the 'Database' field. Do not click the 'test' button at this point. If everything is configured correctly, you will see a window named 'Select Database (FileMaker API)' appear. Your database should be displayed in the 'Select database' list as shown below. Select ‘fotoroma’ since this is the example database for this book.
Image 2 – 21: Select ‘fotoroma’, the sample database included with this book
- If the list of database names does not populate, see the link at the bottom of that dialog for a reference of how to fix common connection issues, or refer to the reference section at the end of this book.
- Choose a database file and click OK.
Image 2 – 22: Once the database has been selected, press OK, you have now completed your database connection.
Once everything has been configured correctly, in the Applications panel, under the database tab, you should be able to see your database with a plus sign beside it.
Image 2 – 23: Your database will show up under the Databases tab in the Application panel.
- In this example our database is named 'Photos'. Click on the plus sign, this will expand photos.
Image 2 – 24: Photos database showing Layouts, Scripts, Value Lists and Portals
- Next expand the layout objects to see all of your layouts.
Image 2 – 25: The list of layouts is expanded in this screenshot
- As a final test, expand one of your layouts to make sure you can see all of the fields.
Image 2 – 26: Click the ‘+” beside the layout to see all of the fields
Congratulations, you have now installed and configured FMStudio on a local setup!
Installing FMStudio – Remote Set-up
To install FMStudio, you will need to use the Dreamweaver Extension Manager, Help > Manage Extensions
Image 2 – 27: Manage Dreamweaver Extensions
Once the Extension Manager is open, make sure you have the correct version of Dreamweaver selected before you install FMStudio.
To install FMStudio, simply locate the FMStudio Extension and choose "Install Extension" from the File Menu, or select the install extension icon.
Image 2 – 28: Install the FMStudio Extension by selecting “Install Extension”
If you would like to install any additional FMStudio modules, do this using the File Menu.
Now that FMStudio is installed, you must restart Dreamweaver in order to completely use FMStudio. Mac users, this means to exit from Dreamweaver completely using the Dreamweaver 'Quit' menu option.
Creating a new site
With Dreamweaver open, from the main menu, select - site > new site.
Image 2 – 29: Create a new site by selecting – site > new site
Note: Never work with FMStudio without having an FMStudio site defined. It might look like it is working, but will fail within minutes.
- Once the Site Definition Window opens, select the 'Advanced' tab. First, give the website an informative name. In this example we will name the site 'Remote Tutorial'.
- Since this is a remote set-up, the location of the root folder does not matter. This should be somewhere on your computer where it is saved and often backed up. You do back-ups often don't you?
- For this example, we will save the file in 'My Documents' and name the folder 'remote'.
- Next, we need to populate the HTTP address field. This address depends on your hosting service, and where you plan on placing your files. The easiest way to set this up is to find the root folder of your hosting service by connecting to it through your FTP application with your username and password. Once you have that information, create a subfolder inside the root folder. On many services, the root folder will be 'publichtml', or 'httpdocs'. If you are going to be setting up your site in a subfolder your files will be going into 'publichtml/subfolder name' or 'httpdocs/subfolder name'. The HTTP address will be the address for your hosting account '/' the subfolder name.
- In this case, we will be calling the subfolder 'remote'. In this book, the files will be hosted at FMGateway hosting. The URL to the website will be - 'http://mysite.fmgateway.com/' this is the main URL and is followed by a forward slash '/' and the name of the subfolder, without 'publichtml' or 'httpdocs'. The full string looks like this. 'http://mysite.fmgateway.com/remote/’.
Image 2 – 30: Site definition for remote tutorial
- Next, navigate to the 'Remote Info' category. And choose the FTP access type from the drop-down menu.
Image 2 – 31: Select the Remote Info Category, and choose FTP from the dropdown list.
- Next, for the FTP host, provide the information that has been given to you by your hosting company or your local network administrator. In this example we will use – 'mysite.fmgateway.com'
Note: The FTP host will never have 'http://' this is just the IP address, or the Domain Name of your account.
- Next is the host directory. This is relative to where the FTP server places you when you log in. If you see the folder 'publichtml' or 'httpdocs' when you login, this is the root. In the example used in this book we will be placing the files in 'httpdocs/remote'. So in this case, the 'Host directory' has to be relative to where you are. So, it would look like – '/httpdocs/remote/'
Note: This folder MUST be created in advance by a third party FTP tool – there are numerous FTP tools available in the reference section of this book.
- Next, you will need to enter your username and password. This is not the database login; this is the FTP username and password provided by your hosting company or your network administrator. Click the 'test' button to make sure that the connection can be made successfully and the file can be placed into your folder.
Note: If you have connection problems, try selecting the 'Use passive FTP' option. The 'Use passive FTP' option is safe, even if it isn't required. It is safe to leave in place, if you are not sure about your connection settings.
Image 2 – 32: FTP settings for remote hosting
Setting up the Testing Server
- Under the Categories section, select 'Testing Server'.
Image 2 – 33: Set up the Testing Server under the Advanced Tab
- Then select 'PHP FileMaker' server model or the 'PHP FileMakerFX' server model (for FX.php users) from the 'Server model' drop down list.
- Next, choose 'FTP' from the Access drop down list.
This should automatically copy your FTP information from the previous page.
- Now the next very important step is the Testing Server URL Prefix. The Testing Server URL prefix will most likely be incorrect the first time around. It will most likely include a folder such as 'httpdocs' or 'publichtml'. This should be removed. It should simply be your domain name / your subfolder name. Just like it is listed on the 'local info'. Once this is finished, click OK.
Image 2 – 34: Testing Server with correct information entered
The new files will appear under the 'Files" panel to the right.
Image 2 – 35: FileMaker files will appear under the Files Panel
If you do not see the Files panel, simply choose Windows > Files from the main menu.
- Next, create a new page. From the main menu choose File > New. The 'New Document' window will open.
- In the category view, select 'Dynamic Page' and under the Dynamic Page section, choose PHP for FileMaker. (Special Note for MX users)
Note: Dreamweaver MX users, you will most likely not have PHP for FileMaker displaying in this list, just PHP. Select 'PHP'.
Image 2 – 36: Select PHP for FileMaker to create a new Dynamic Page. MX users, simply select ‘PHP’.
- Once the new page has been created, type some text such as "Hello World". Save this page as index.php; make sure you save this page in the local folder that you have selected.
Installing the FileMaker API / FX.php
- From the main menu, select Commands > Install FileMaker API or install FX.php. Once this is installed there is a very important step that you must do. This cannot be omitted.
- Right Click, selecting the whole site (under the files tab) and choose ‘Put’
Image 2 – 37: Make sure you select ALL of the files and then choose ‘Put’ to upload them.
Image 2 – 38: Choose Put to upload the files to the correct directory
Note: The 'Put' operation may take a few minutes, but it must be performed the first time after installing the PHP API or FX.php.
- Now that the upload has been completed, navigate to the databases tab under applications, choose 'plus' and choose a new 'FileMaker Connection'.
Image 2 – 39: Select FileMaker Connection under the Database Tab
The FileMaker Connection dialogue window will open.
Image 2 – 40: Populate the FileMaker Connection window with the correct information.
- Once the window opens a connection name needs to be created. The Connection name must be a valid name without any spaces or special characters. This means alphanumeric only, and it cannot begin with a number – underscores are allowed. In this example we will use 'Photos' as the connection name.
- For FileMaker Server, the same naming conventions apply. In this example enter the IP address of the FileMaker Publishing Engine.
- Next enter the username and password. The username and password is a FileMaker user defined under 'Accounts and Privileges' in FileMaker Pro, and must have the 'fmphp' extended privilege or 'fmxml' extended privileges (for FX.php) users set-up.
Image 2 – 41: FileMaker connection details
- Then click 'select' Database. If everything is configured correctly, you will see a window named 'Select Database (FileMaker API)' appear. Your database should be displayed in the 'Select database' list as shown below.
Image 2 – 42: Select the fotoroma database from the list
Image 2 – 43: Fotoroma now displaying as the database
If the list of database names does not populate, see the link at the bottom of that dialog for a reference of how to fix common connection issues, or refer to the reference section at the end of this book. The link is “Connection Errors Help”.
Note: Once the database connection has been defined, one very important step not to forget if you are using FTP, is that your connections folder must be synchronized on the server. This means that when you change 'any' connection settings, such as username or password, add new connections, change database names or define a new connection, you have to right click the whole 'Connections folder' and choose 'Put'.
Image 2 – 44: Choose Put to upload your files when changes are made.
In the Applications panel, under the database tab, you should be able to see your database with a plus sign beside it.
Image 2 – 45: Photos is now showing up under the Database tab in the Application panel.
- In this example our database is named 'Photos'. Click on the plus sign, this will expand photos. Next expand the layout objects to see all of your layouts.
Image 2 – 46: Database Layouts displayed.
Congratulations. You are ready to begin using FMStudio.

