Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
howto:php [2010/02/24 23:53] – created digitalmanhowto:php [2010/03/16 22:16] digitalman
Line 1: Line 1:
 ====== Use PHP with the Synchronet Web Server ====== ====== Use PHP with the Synchronet Web Server ======
-FIXME+Dynamic [[http://php.net/|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 ''[[config: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 ''[[dir:ctrl]]/[[config:sbbs.ini]]'' file, making sure that the ''CGIExtensions'' key value includes ''.php''
 + 
 +Example: 
 +<file> 
 +CGIExtensions=.cgi,.pl,.php 
 +</file> 
 + 
 +Edit your ''[[dir:ctrl]]/[[config:web_handler.ini]]'' file. 
 + 
 +If you're running Synchronet for Windows, edit the ''[CGI.Win32]'' section, otherwise (e.g. *nix, or MacOSX), edit the ''[CGI]'' section: 
 + 
 +Make sure the ''php'' key value points to the correct location of your ''php-cgi'' (or ''PHP-CGI.EXE'') file.  
 + 
 +Example (*nix): 
 + 
 +<file> 
 +[CGI] 
 +php = /usr/local/bin/php-cgi 
 +</file> 
 + 
 +Example (Windows): 
 + 
 +<file> 
 +[CGI.Win32] 
 +php = /php/php-cgi.exe 
 +</file> 
 + 
 +Edit your ''[[dir:ctrl]]/[[config:cgi_env.ini]]'' file, making sure it contains the following lines: 
 +<file> 
 +[REDIRECT_STATUS] 
 +value=200 
 +</file> 
 ===== See Also ===== ===== See Also =====
-  * [[:howto:|HowTo index]]+  * [[http://php.net/]] 
 +  * [[:server:web|Synchronet Web Server]] 
 +  * [[:howto:|How-To Pages]]