Comprehensive Interpretation php- development environment and configuration

First, version control software

1, the centralized (CVS and SVN)

The middle of a central server, all clients will upload the information to a central server version, the version information is only stored in a central server where , when we go to upload or download, all from a central server to connect to, once linked to a central server out, the contents of the client there is no way to download and upload relevant version, customers need to be online to upload and download.

2, distributed (Git)

Centralized more convenient compared to no central server, a version of the controller, under every version control client has a complete set of version control information , so the stars better distributed disaster recovery, but also do not have to connect to the network.

Two, PHP's operating principle

Nginx + PHP-FPM operating principle

1、CGI

CGI:  a bridge of communication between language parser and WEB Server.

The need to deal with PHP PHP parser to process, after the completion of treatment and PHP WebServer communicate, in order to solve the communication between different languages ​​and WEB Server, just follow the protocol to write CGI programs, you can achieve language parser and WEB communication between Server

CGI's shortcomings: But CGI inefficient, because CGI requests will each receive a fork a CGI process, when a request to end off in the process Kill , so it is a waste of resources, so efficiency is very low

2、FAST-CGI

CGI-the FAST: CGI improved version, FAST-CGI each finished with the request not Kill off the process, but to leave this process, so that the process can handle multiple requests , thus greatly enhance efficiency.

3、PHP-FPM

FPM-PHP: PHP-FASTCGI Process Manager : PHP's FASTCGI process manager . The process comprising the master process (main process) and the worker processes (working processes), only one master process, responsible for monitoring port, receiving a request from the web server , and a plurality of worker processes generally have, on the specific need to configure the number of FPM in the definition, every internal process will be embedded into a PHP parser (real place php code execution), worker processes to handle our PHP code , master is the default listening port 9000 to port through proxy Nginx reverse proxy, thus completing the process related to the FPM.

Three, PHP common configuration items

1, register_globals: Register Globals, recommendations have been closed.

2, allow_url_open: whether to allow open a remote file.

3, allow_url_include: whether to allow remote file contains.

4, date_timezone: set the time zone.

5, display_errors: whether or not an error, need to open development environment.

6, error_reporting: display error level snake.

7, safe_mode: whether to open the safe mode.

8, upload_max_filesize: limit the size of uploaded files.

9, max_file_uploads: maximum number of files to upload.

10, post_max_size: the maximum size of post data submitted.

This article summarizes the kangaroo learning, if reproduced please indicate the source: https://www.cnblogs.com/chrdai/p/11198171.html

 

Guess you like

Origin www.cnblogs.com/chrdai/p/11198171.html