View php configuration and php in nginx

Source: Internet
Author: User
1. view the current php configuration information and create a findini. php file in the root directory of the php project. The content is as follows :? Phpphpinfo ();? Access the page and you will see the following page: Search for LoadedConfigurationFile to query the configuration files currently used by php. 2. php-fpm restart and other operations php5.3.3

1. view the current php configuration information and create a findini. php file in the root directory of the php project. The content is as follows :? Php phpinfo ();? Visit the page to see the following page: Search for Loaded Configuration File to find out What Configuration File php is currently using. 2. php-fpm restart and other operations: php 5.3.3

1. view the current php configuration information

Create the findini. php file in the root directory of the php project. The content is as follows:

 
Visit the page to see the following page:

Search for Loaded Configuration File to find out which Configuration File php is currently using.

2. php-fpm restart and other operations

Php-fpm has been embedded in the source code of php 5.3.3. You do not need to install patches like in the previous php version. You only need to add the compilation parameters when configuring configure.
The compiling parameters for php-fpm include-enable-fpm-with-fpm-user = www-with-fpm-group = www-with-libevent-dir = libevent.
However, php-fpm in php 5.3.3 does not support commands such as/usr/local/php/sbin/php-fpm (start | stop | reload) in php 5.3.3, signal control is required:

The master process can understand the following signals:

INT, TERM terminated immediately
QUIT smooth termination
USR1 re-open the log file
USR2 smoothly reloads all worker processes and reloads configuration and binary modules.

Example:
Disable php-fpm:

kill -INT `cat /usr/local/php/var/run/php-fpm.pid`
Php-fpm restart:
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`
View the number of php-fpm processes:
ps aux | grep -c php-fpm

If the corresponding pid file cannot be found, you can find it as follows:

ps -aux|grep php-fpm

The main process is shown as follows:

root     12030  0.0  0.0 129360  4076 ?        Ss   18:35   0:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.