mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
Updated Home (markdown)
parent
88ae5d15bd
commit
3a64135a05
36
Home.md
36
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**
|
||||
><?php phpinfo(); ?>
|
||||
|
||||
***
|
||||
####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 ...
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user