From 3a64135a0505137d1512d23011e3767015461ab3 Mon Sep 17 00:00:00 2001 From: stefano casazza Date: Tue, 4 Aug 2015 19:57:22 +0200 Subject: [PATCH] Updated Home (markdown) --- Home.md | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/Home.md b/Home.md index f53a25b..493e50f 100644 --- a/Home.md +++ b/Home.md @@ -5,18 +5,24 @@ I suggest for to have many info to configure ULib with debug (*./configure --ena From the downloaded source copy the shell script **php.sh**, that you can found in *ULib-1.4.2/tests/examples*, to some working directory, say */var/www/example*. *** -The first time we run **./php.sh** inside */var/www/example* we must have the following directory structure: +The first time we run **./php.sh** inside */var/www/example* we must have as result the following directory structure: -**./php.sh** -./userver.cfg -./err: *php?.err* -./log: *php?.log* -./out: *php?.out* -./www: **info.php** -./www/cgi-bin: **index.php** +**./php.sh** + +./userver.cfg + +./err: *php?.err* + +./log: *php?.log* + +./out: *php?.out* + +./www: **info.php** +./www/cgi-bin: **index.php** > + *** -####1) You can safely run PHP scripts using ULib’s CGI support. +####1) You can safely run PHP scripts using ULib’s CGI support. Run **./php.sh** with argument 1: (we have as output something like that) ~~~~ @@ -38,9 +44,9 @@ The downside of this approach is the latency caused by the spawn of a new PHP in [See the official PHP documentation for fpm for all possible configuration options.](http://www.php.net/manual/en/install.fpm.configuration.php) -a) **TCP socket (IP and port) approach** -Edit *php-fpm.conf* -**listen = 127.0.0.1:9000** +a) **TCP socket (IP and port) approach** + +Edit *php-fpm.conf* in order to have **listen = 127.0.0.1:9000** ~~~~ stefano: /var/www/example # /etc/init.d/php-fpm start Starting PHP FastCGI Process Manager ... @@ -59,9 +65,9 @@ Now the latency is much better as we can see in *./log/php2a.log*: ~~~~ 03/08/15 20:21:00 (pid 2183)> request "/info.php" run in 8 ms ~~~~ -b) **unix domain socket (UDS) approach** -Edit *php-fpm.conf* -**listen = /tmp/fcgi.socket** +b) **unix domain socket (UDS) approach** + +Edit *php-fpm.conf* in order to have **listen = /tmp/fcgi.socket** ~~~~ stefano: /var/www/example # /etc/init.d/php-fpm start Starting PHP FastCGI Process Manager ...