Synchronet v3.18b-Win32 (install) has been released (Sept-2020).

Synchronet v3.19a, now under development, requires libarchive-dev to build successfully.

You can donate to the Synchronet project using PayPal.

This is an old revision of the document!

Use PHP with the Synchronet Web Server

Dynamic PHP content may be served by the Synchronet Web Server using PHP-CGI.

PHP applications will not magically have access to your Synchronet content (e.g. users, messages, files).

Install PHP

Make sure you get PHP-CGI support. On *nix platforms, this is achieved by excluding the –with-apxs2 option from the configure command-line during the installation process.

Install PHP Content

Install your PHP application(s) into your [Web] Root directory, as specified in your sbbs.ini file.

:!: Note: many PHP web applications require 3rd party database support (e.g. MySQL), which may need to be installed as well.

Configure Web Server

Edit your ctrl/sbbs.ini file, ensuring:

  1. The Web Server is enabled (AutoStart=true)
  2. If your application has an index.php file, that that file is included in the IndexFileNames value (comma separated list)
  3. The MaxCgiInactivity value is set to something sane (default: 120 seconds)
  4. The CGIExtensions key value includes .php (comma separated list)
  5. The Options key value does not include the NO_CGI option (bit 5)



Edit your ctrl/web_handler.ini file.

If you're using Synchronet for Windows, edit the [CGI.Win32] section, otherwise, edit the [CGI] section:

Ensure the php key value points to the correct path (location) of your php-cgi (or php-cgi.exe) file.

Example (*nix):

php = /usr/local/bin/php-cgi

Example (Windows):

php = /php/php-cgi.exe

Edit your ctrl/cgi_env.ini file, ensuring it contains the following lines:


:!: If you see the PHP error This PHP CGI binary was compiled with force-redirect enabled., that indicates that your ctrl/cgi_env.ini file is missing this key.

See Also

In Other Languages
Translations of this page: