Adding PHP 7 Support On Windows

Upgrading from a previous version

  • If you have already installed a previous version of the preconfigured PHP 7 package and want to upgrade it, all you have to do is to download the new version of the package and install it. No additional configuration has to be done in Abyss Web Server console.
  • If you have already installed a previous version of the preconfigured PHP 5 package and want to upgrade to PHP 7, we strongly recommend that you install it in its own directory. PHP 5 and PHP 7 are different and installing version 7 over 5 may result in a lot of errors.

Please keep in mind that PHP 7 may break compatibility with some old scripts and Web applications. If you experience problems with particular scripts, it is recommended to revert to PHP 5 until they are fixed by their authors.

PHP 7 Setup

Download and install PHP 7

  • If you are using Windows Vista, 7, 8, 8.1, 10, 2008 and 2012 or later on a 64-bit OS, download the preconfigured PHP 7.1.7 package (64-bit) for Windows.
  • If you are using Windows Vista, 7, 8, 8.1, 10, 2008 and 2012 or later on a 32-bit OS, download the preconfigured PHP 7.1.7 package (32-bit) for Windows.
  • If you have an older operating system or if your scripts require an old version of PHP, pick the most suitable preconfigured package from our downloads page and follow the related instructions to declare it.
  • The preconfigured package you have just downloaded contains the core PHP binaries and all its official extensions. It was preconfigured by Aprelium to support most popular scripts.
    It also includes following built-in extensions: bcmath, calendar, cgi-fcgi, com_dotnet, ctype, date, dba, dom, filter, ftp, hash, iconv, json, libxml, pcre, Reflection, session, SimpleXML, SPL, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, and zlib. Support for mbstring, cURL, GD2, IMAP, GetText, LDAP, OpenSSL, PDO, ODBC, SQLite, and MySQLi is also turned on by default.
    Several other extensions are also available but are not enabled by default. You can activate them by editing the php.ini file as explained below.
  • Install the package contents in a directory of your choice (for example in C:\Program Files\PHP7).

Declare the interpreter

  • Open Abyss Web Server's console. In the Hosts table, press Configure in the row corresponding to the host to which you want to add PHP 7 support.

    If there is no Hosts table in the main screen of your console, this means that you are using an old version of Abyss Web Server. Please upgrade to the latest version before proceeding. Upgrading is free, straightforward, and preserves your current server configuration. Click here to download the latest version.

  • Select Scripting Parameters.
  • Check Enable Scripts Execution.
  • Press Add in the Interpreters table.
  • Set Interface to FastCGI (Local - Pipes).
  • In the Interpreter field, press Browse..., go to the directory where you have installed PHP 7, locate php-cgi.exe, and click on it.
  • Set Type to Standard. Note that you should no more use PHP Style as it was only meant to activate special internal workarounds to support PHP versions < 5.2.4.
  • Check Use the associated extensions to automatically update the Script Paths.
  • Press Add in the Associated Extensions table.
  • Enter php in the Extension field and press OK.
  • Press OK
  • Press OK in the Scripting Parameters dialog.

Declare new index files

  • Select Index Files.
  • Press Add in the Index Files table.
  • Enter index.php in the File Name field and press OK.

Apply the modifications

  • Press Restart to restart the server.

Notes about php.ini

  • The preconfigured PHP 7 package will use the php.ini file that is located inside its installation directory (which is the directory where php-cgi.exe is located).
  • If you need to have php.ini in another location, please change the value of the custom environment variable PHPRC. For example, if your php.ini file is located inside C:\mysettings, declare a new Custom Environment Variable which name is PHPRC and value is set to:

    C:\mysettings

  • The default php.ini file that ships with the preconfigured PHP 7 package for Windows has ImageMagick, mbstring, cURL, GD2, IMAP, GetText, LDAP, OpenSSL, PDO, ODBC, SQLite, and MySQLi extensions enabled by default.

  • To enable other extensions, open php.ini with your favorite text editor (for example Windows Notepad), locate the line that contains the extension name, uncomment it by removing the leading colon character, and save the file.

    For example, if you want to enable the PHP FTP extension (to connect to FTP servers and download/upload files from PHP scripts):

    • Open php.ini with Windows Notepad. You may need to use Administrator privileges to allow updates to that file.
    • Search for php_ftp.dll
    • The line that contains the php_ftp.dll occurrence should look like:

      ;extension=php_ftp.dll

    • Delete the comma in the beginning of the line so that it becomes:

      extension=php_ftp.dll

    • Save the file and close Windows Notepad.
    • Stop and restart Abyss Web Server to ensure that all PHP will take into account the modification of php.ini.