Friday, March 13, 2015

Install php-yaml on Windows 8.1

Install php-yaml on Win 10 (or 8.1)

Related to my previous post Install PHP 5.6 on Win 8.1 x64, I needed to work with YAML from PHP.  The instructions for how to do this are confusing, at best.

Simplified instructions:


  1. Go to http://pecl.php.net/package/yaml
  2. Download the zip file for the latest version (as of the time of writing this, 1.2,0).  There is a little Windows Icon and the word DLL is linked to the zip.
  3. Download the 5.6 Thread Safe (TS) x86 version
    1. Thread Safe
    2. x86 (32-bit), NOT the x64 (64-bit), since we're running 32-bit PHP
  4. Copy yaml.dll to C:/dev/php (or wherever you installed PHP)
  5. Copy php_yaml.dll to C:/dev/php/ext (or the ext directory under your PHP install location)
  6. Edit C:/dev/php/php.ini
    1. Add this line:
      extension=C:/dev/php/ext/php_yaml.dll
  7. Confirm that it works:
    1. php --re yaml