Adding PHP Support

Overview

Abyss Web Server supports all PHP releases including all the PHP 4.x.x and PHP 5.x.x versions.

On Windows

Important note

If you plan to install PHP 5 on Windows, we highly recommend using our preconfigured PHP 5 package instead of following the generic PHP setup instructions below. It is easier, faster, and less error prone.

Download and install PHP

  • Download PHP for Windows from http://www.php.net/downloads.php and install it. We recommend using the Windows installer version of PHP if you are new to web serving and PHP.
  • If you are asked during the installation of PHP about the type of your web server, choose None (or other web server), I will configure the web server manually and proceed.

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 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.
  • If you are using Windows NT, 2000, XP, 2003, or later, set Interface to FastCGI (Local - Pipes). If you are using Windows 95, 98, or ME, set Interface to CGI/ISAPI as PHP does not support the FastCGI interface on these old operating systems.

    Note that if you do not find an Interface field, you can ignore this step and continue with the following instructions.

    The absence of the Interface field means that your Abyss Web Server X1 and X2 version number is less than 2.3. If this is the case, we strongly recommend to upgrade to the latest version to benefit from the FastCGI performance boost.

    If after adding PHP support, your PHP scripts refuse to run and report Error 503, this is probably because your PHP interpreter does not support the FastCGI mode. In such a case, set its Interface field to CGI/ISAPI to solve the problem.

  • In the Interpreter field, press Browse..., go to the directory where you have installed PHP and click on php.exe if you have installed PHP 4 or php-cgi.exe if you have installed PHP 5.
  • Set Type to Standard if you are using PHP 5.2.4 or newer. Note that you should only use PHP Style with PHP versions < 5.2.4 (to activate special internal workarounds to enable full support for these old releases.)
  • 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 Add in the Custom Environment Variables table.
  • Enter REDIRECT_STATUS (with no leading or trailing spaces) in the Name field and 200 in the Value field and 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.

On MacOS X

Download and install PHP

  • Download the PHP 5.4.16 package for Mac OS X (13.3 MB). It is a universal binary package containing the FastCGI/CGI Interpreter version of PHP 5.4.2 with the following built-in extensions: bcmath, calendar, ctype, date, dom, filter, hash, json, libxml, odbc, pcre, Reflection, session, SimpleXML, SPL, SQLite, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, and zlib. Support for ftp, iconv, mbstring, GD2, PDO, SQLite, MySQL, and MySQLi is also turned on by default.
    The package runs on both PowerPC and Intel-based Macintosh computers powered by Mac OS X 10.4 and later. It was built for your convenience by Aprelium and uses by default /Applications/PHP5/lib/php.ini as its configuration file.
    If you have an old version of Mac OS X, you can still use the legacy PHP 5.2.2 package for Mac OS X (13.6 MB) which runs on both PowerPC and Intel-based Macintosh computers powered by Mac OS X 10.2.8 and later.
    If you do not have MySQL or do not intend to use PHP 5 with MySQL, edit /Applications/PHP5/lib/php.ini and comment the extension= lines referencing the MySQL extensions.
  • Open the downloaded file by double-clicking on it and copy the PHP5 folder inside the /Applications folder on your main hard disk.

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 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).

    Note that if you do not find an Interface field, you can ignore this step and continue with the following instructions.

    The absence of the Interface field means that your Abyss Web Server X1 and X2 version number is less than 2.3. If this is the case, we strongly recommend to upgrade to the latest version to benefit from the FastCGI performance boost.

    If after adding PHP support, your PHP scripts refuse to run and report Error 503, this is probably because your PHP interpreter does not support the FastCGI mode. In such a case, set its Interface field to CGI/ISAPI to solve the problem.

  • Enter /Applications/PHP5/bin/php-cgi in the Interpreter field. If you are using an old version of PHP, you may need to use /Applications/PHP5/bin/php instead.
  • Set Type to Standard if you are using PHP 5.2.4 or newer. Note that you should only use PHP Style with PHP versions < 5.2.4 (to activate special internal workarounds to enable full support for these old releases.)
  • 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 a new index file

  • 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.

On Linux

Download and install PHP

  • Most Linux distributions come with PHP. To check if it is installed, execute which php-cgi or which php. If not available, download it from http://www.php.net/downloads.php and install it.
  • To determine which PHP version is installed, execute php-cgi -v or php -v.

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 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).

    Note that if you do not find an Interface field, you can ignore this step and continue with the following instructions.

    The absence of the Interface field means that your Abyss Web Server X1 and X2 version number is less than 2.3. If this is the case, we strongly recommend to upgrade to the latest version to benefit from the FastCGI performance boost.

    If after adding PHP support, your PHP scripts refuse to run and report Error 503, this is probably because your PHP interpreter does not support the FastCGI mode. In such a case, set its Interface field to CGI/ISAPI to solve the problem.

  • In the Interpreter field, press Browse..., go to the directory where you have installed PHP and click on the file called php-cgi. If no such file exists, click on the file which name is php.
  • Set Type to PHP Style.
  • 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 Add in the Custom Environment Variables table.
  • Enter REDIRECT_STATUS (with no leading or trailing spaces) in the Name field and 200 in the Value field and press OK.
  • Press OK in the Scripting Parameters dialog.

Declare a new index file

  • 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.