If you’re reading this post it’s probably because you’re preparing for FileMaker DevCon 2019, are signed up to attend the FileMaker Data API Training Day session, and are looking to ensure you have everything you need set up on your laptop. If so, you’re in the right place! If not, feel free to have a read anyway!

Absolute Minimum Requirements

Please ensure that at the very least you have the following things installed on your laptop. If not look further below for OS specific instructions and get yourself ready before we get started. You won’t need PHP or a development editor until after lunch, so worst-case you could get those set up over the lunch break, or hook up with someone who already has those installed and peer programme your way through the afternoon.

  • The absolute minimum requirement are the session resources – without those none of the rest of these tools are going to be very useful! Download them and save them to your local computer. If you are on Windows in some of the later activities things will be easier if the path they are at is relatively short, and has no spaces in it – something like C:\dapi\resources would work well!
  • FileMaker 18 Advanced – I’d be pretty sure you’ve got that ready to go, but if not remember that you get a copy included with your DevCon registration – details were given to you on a small card when you registered.
  • Postman – Postman is an API development and testing environment which you can download (both Windows and OS X versions can be found there).
  • A recent version of a browser with the developer tools enabled. Personally I use Firefox for development so if you want your system to look exactly the same as mine when we’re working on activities then it would be good to go there too. If you need to know how to enable dev tools, check out these instructions for Firefox, Chrome or Safari. If you’re using a different browser them I’m going to guess you’re technically sophisticated enough to know how to enable the dev tools 🙂
  • Something to edit code in – as a minimum something like Notepad++ on Windows or BBEdit on OS X or a cross platform choice like Atom or Sublime Text.

Ideal Requirements

As well as everything above to get the most out of the workshop it would be great if you had the following things also installed.

  • A recent version of PHP (at least 7.2). There are instructions below for how to get PHP installed if you don’t have it.
  • An Integrated Development Environment (IDE) will make working with JavaScript and PHP easier than a straight text editor. Personally I’ll be using JetBrains PHPStorm which comes with a free 30-day trial license. Another very good choice is Microsoft Visual Studio which has a free ‘code’ version (if you decide to install Visual Studio see below for additional instructions).
  • Having nodejs and yarn installed might be helpful if you’re already pretty familiar with PHP development, or want to try some of the more ‘advanced’ activities towards the end where you may find yourself need to recompile JavaScript. Instructions by operating system are below.

Installing PHP

The following instructions assume you're using Windows 10, though should still work on earlier versions.

  1. Install the Visual C++ Redistributable for Visual Studio 2015—this is linked in the sidebar of the PHP for Windows Download page, but it's kind of hidden. If you don't do this, you'll run into a rather cryptic error message, VCRUNTIME140.DLL was not found, and php commands won't work. It may already be installed depending on what other applications you have on your computer - so don't be too concerned if you get an error telling you it's already there!
  2. Download PHP for Windows. The current version is 7.3.x and you'll want the non thread safe version. I downloaded the .zip file under the heading VC15 x64 Non Thread Safe.
  3. Extract the zip file into C:\php.
  4. Configure PHP
    1. In C:\php rename the file php.ini-development to php.ini.
    2. Edit php.ini file in your text editor (the one you made sure you'd installed above right)
    3. Change the following settings in the file:
      1. Change memory_limit from 128M to 1G.
      2. Change upload_max_filesize from 2M to 25M.
      3. Uncomment the line that reads ; extension_dir = "ext" (remove the ; so the line is just extension_dir = "ext").
      4. In the section where there are a bunch of extension= lines, uncomment the following lines:
        1. extension=curl.dll
        2. extension=gd2.dll
        3. extension=mbstring.dll
        4. extension=openssl.dll
    4. Save the file and you're done
  5. Add C:\php to your Windows system path:
    1. Open the Control Panel and switch 'View by' to Small Icons.
    2. Select 'System', 'Advanced System Settings' from the menu at the left.
    3. Click the 'Environment Variables...' button from the bottom of the 'Advanced' tab.
    4. Click on the Path row under 'System variables', and click 'Edit...'
    5. Click 'New' and add the row C:\php.
    6. Click OK, then OK, then OK, and close out of the System Control Panel.
  6. Open PowerShell (or another terminal emulator), and type in php -v to verify PHP is working. You should see something (very) like
    PHP 7.3.7 (cli) (built: Jul 3 2019 14:34:15) ( NTS MSVC15 (Visual C++ 2017) x64 )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies

Thanks to Jeff Geerling for his original blog post Installing PHP 7 and Composer on Windows 10, Natively which these instructions are based on.

Installing node

Compared to PHP this is a snap!

  1. Check to see if you've already got node installed. In PowerShell type node -v. If you get anything other than (something like) v10.16.0 then it's not installed.
  2. Head over to the node website downloads page and click on 'Windows Installer' from under the heading 'LTS'.
  3. Once it's downloaded click to launch, and basically 'smile and nod' your way through the installer, 'Next', accept those license terms, 'Next' three more times, 'Install', 'Yes', watch the pretty green line, 'Finish' and you're done.
  4. Back to PowerShell, but this bit's important, quit PowerShell and relaunch it because otherwise the shell won't have picked up the changes the installer just made. node -v and you should be greeted with v10.16.0.

Installing yarn

Yarn is a package manager which helps you to install and manage JavaScript dependencies in your project. node comes with a 'built-in' package manager called npm, however yarn has some nice advantages so we're going to install that. Again it has an installer so it's pretty simple.

  1. Grab the installer by heading to the yarn installation page and selecting 'Download Installer'
  2. Once it's downloaded click to launch, and make your way through the installation process - fewer clicks than with node - and you're done
  3. Quit and relaunch PowerShell and type yarn -v and you should be greeted with 1.16.0.

The easiest way to manage development dependencies in OS X is to use Homebrew which bills itself as 'The missing package manager for macOS', so the first thing we need to do is get that installed. There are other ways to install PHP, node, etc but trust me they are way harder!

Installing Homebrew

  1. Head over to the Homebrew website and follow the (very) simple instructions there, or to make it even easier, copy and paste the line below into a terminal (Applications > Utilities > Terminal) and hit enter. Make sure you do include the closing quote!
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. The installer will tell you what it's about to do, hit Enter, and you'll then need to enter your password to allow things to be set up.
  3. Now sit back and wait it out - this process can take a little while because one of the requirements are the Xcode command line tools, which if you don't have Xcode installed are a weighty download.

Installing PHP

  1. Now that brew's installed things are pretty easy. In your terminal type brew install php. This will download and compile everything you need for PHP
  2. Once it's done check that it worked with php -v, and you should see something (very) like
    PHP 7.3.6 (cli) (built: Jun 17 2019 08:40:34) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.6, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.6, Copyright (c) 1999-2018, by Zend Technologies
  3. There're two changes we need to make to the default PHP config. Open /usr/local/etc/php/7.3/php.ini in your text editor  (the one you made sure you'd installed above right?)
    1. Change memory_limit from 128M to 1G (it should be line 401).
    2. Change upload_max_filesize from 2M to 25M.
    3. Save and close.

Installing yarn

Because of the power of Homebrew we can skip the 'install node' step because installing yarn will install node for us if we don't already have it!

  1. In your terminal type brew install yarn and hit enter.
  2. Once it's done check that everything's worked using node -v which should return (something like, exact versions may not match) v12.5.0 and yarn -v which should give you 1.16.0.

Installing Visual Studio Code

If you don’t currently have an IDE which you like and use, then Visual Studio Code is an excellent choice, if for no other reason than it’s free! It’s also cross platform.

  1. Head to the Visual Studio download page  and select ‘Download’ from below ‘Visual Studio Code’ on the right hand side.
  2. Ok your way through the installer
  3. Once installed you’ll get the greatest benefit if you install two extensions to work with the demo materials which are written in PHP and use the Symfony framework. Launch Visual Studio Code and select File > Preferences > Extensions. In the extension search dialog enter:
    1. PHP and locate the extension PHP  IntelliSense by Felix Becker. Select ‘Install’.
    2.  Symfony and locate the extension Symfony for VSCode. Select ‘Install’
  4. Close any tabs which have opened about the two modules you’ve just installed then select the Explorer icon from the top of the icon bar on the right to return to the Visual Studio workspace.

On to Activity One >

Leave A Comment