Adding PHP 8 Support On Windows
Upgrading from a previous version of PHP
- If you have already installed a previous version of the preconfigured PHP 8 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 or 7 package and want to upgrade to PHP 8, we strongly recommend that you install it in its own directory. Both PHP 5 and 7 are different from PHP 8: installing version 8 over version 5 or 7 will cause many errors.
Please keep in mind that PHP 8 may break compatibility with some scripts and Web applications. If you experience problems with a particular script, it is recommended to revert to PHP 7 until its publisher fixes it.
PHP 8 Setup
Download and install PHP 8
- If you are using Windows 7, 8, 8.1, 10, 11, 2008, 2012, 2016, 2019, or later on a 64-bit OS, download the preconfigured PHP 8.1.7 package (64-bit) for Windows.
- If you are using Windows 7, 8, 8.1, 10, 2008 or later on a 32-bit OS, download the preconfigured PHP 8.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, GD, 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\PHP8).
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 8 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 8, locate php-cgi.exe, and click on it.
- Set Type to Standard. Note that you should not use PHP Style as it was only meant to activate special 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 8 package will use the php.ini found inside its installation directory (which is the directory where php-cgi.exe is located).
If you need to have php.ini in another location, 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 which value is set to:
The default php.ini file that ships with the preconfigured PHP 8 package for Windows has ImageMagick, mbstring, cURL, GD, 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:
Delete the comma in the beginning of the line so that it becomes:
- Save the file and close Windows Notepad.
- Stop and restart Abyss Web Server to ensure that all PHP processes will take into account the modification of php.ini.
Keep in touch with us
Sign up for our low volume newsletter to get product announcements, articles and power tips.