Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:php [2010/03/16 22:32] – digitalman | howto:php [2023/02/05 19:33] (current) – [Configure Web Server For PHP-FPM] Forgot the "unix:" prefix in the UDS example digital man | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Use PHP with the Synchronet Web Server ====== | ====== Use PHP with the Synchronet Web Server ====== | ||
- | Dynamic [[http:// | + | Dynamic [[http:// |
PHP applications //will not// magically have access to your Synchronet content (e.g. users, messages, files). | PHP applications //will not// magically have access to your Synchronet content (e.g. users, messages, files). | ||
Line 6: | Line 6: | ||
===== Install PHP ===== | ===== Install PHP ===== | ||
- | Make sure you get PHP-CGI support. On *nix platforms, this is achieved by excluding the '' | + | Make sure you get PHP-CGI |
===== Install PHP Content ===== | ===== Install PHP Content ===== | ||
Line 14: | Line 14: | ||
:!: Note: many PHP web applications require 3rd party database support (e.g. MySQL), which may need to be installed as well. | :!: Note: many PHP web applications require 3rd party database support (e.g. MySQL), which may need to be installed as well. | ||
- | ===== Configure Web Server ===== | + | ===== Configure Web Server |
Edit your '' | Edit your '' | ||
Line 35: | Line 35: | ||
Edit your '' | Edit your '' | ||
- | If you're using Synchronet for Windows, edit the '' | + | If you're using Synchronet for Windows |
Ensure the '' | Ensure the '' | ||
Line 58: | Line 58: | ||
value=200 | value=200 | ||
</ | </ | ||
+ | |||
+ | :!: If you see the PHP error '' | ||
+ | |||
+ | ===== Configure Web Server For PHP-FPM ===== | ||
+ | |||
+ | Edit your '' | ||
+ | - The Web Server is enabled ('' | ||
+ | - If your application has an '' | ||
+ | - The '' | ||
+ | - The '' | ||
+ | |||
+ | Example: | ||
+ | < | ||
+ | [Web] | ||
+ | AutoStart=true | ||
+ | IndexFileNames=index.html, | ||
+ | MaxCgiInactivity=120 | ||
+ | Options=NO_HOST_LOOKUP | ||
+ | </ | ||
+ | |||
+ | Edit the [[server: | ||
+ | |||
+ | Example (using a TCP socket): | ||
+ | < | ||
+ | [*.php] | ||
+ | FastCGISocket=127.0.0.1: | ||
+ | </ | ||
+ | |||
+ | Example (using a UNIX Domain socket): | ||
+ | < | ||
+ | [*.php] | ||
+ | FastCGISocket=unix:/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Make sure that php-fpm is running and that the listener socket is the same as in the FastCGISocket line. | ||
+ | |||
+ | :!: If you see the PHP error '' | ||
===== See Also ===== | ===== See Also ===== |