The Windows version of PHP from version 5.2.1 started with the thread safe (thread safe) and none thread safe (NTS, non-thread-safe) of the points, the difference is where? Which one should I use? Here is a simple introduction.The first Windows
Today caught the 123System OPenVZ VPS Full-price opportunity, purchased a 512MB memory, dual-core 3.49Ghz Xeon e3-1270 V3 CPU package, this is the first time to use 123system products, the overall impression is very good, At present speed is also
What PHP can do
PHP Official document Don't face PHP能做任何事 it, this and the industry widely circulated to kill other programmers do not life is PHP是最好的语言 really remote call corresponding.
PHP is mainly used in the following three areas
(1)
To agree on several directories
/usr/local/php/sbin/php-fpm
/usr/local/php/etc/php-fpm.conf
/usr/local/php/etc/php.ini
First, the PHP-FPM start parameter
#测试php-FPM Configuration
/usr/local/php/sbin/php-fpm-t
/usr/local/php/sbin/php-fpm-c/usr/
PHP-FPM start parameters and important configuration of the detailed, this needless to say, do PHP development students need to use.Contract several directories/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniOne,
To agree on several directories
/usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.iniFirst, the PHP-FPM start parameter
Copy Code code as follows:
#测试php-FPM Configuration
The full name of the file lock is advisoryfilelock, which is mentioned in the book. Such locks are common. For example, after mysql and php-fpm are started, a pid file records the process id, which is the file lock. This lock prevents repeated
Detailed configuration based on php-fpm. Php5.3 comes with php-fpmusrlocalphpetcphp-fpm.confpidrunphp-fpm.pidpid settings, the default varrunphp-fpm.pid in the installation directory, it is recommended to enable error_loglogphp-fpm.log error
Php5.3
The first Windows version of PHP3.0.17, released on October 20, 2000, started with a thread-safe version, because unlike the Linux/unix system, which works in a multi-process manner, Windows systems work in a multi-threaded way. It is very slow to
php5.3 comes with PHP-FPM/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pid
PID settings, default in the installation directory of Var/run/php-fpm.pid, it is recommended to open
Error_log = Log/php-fpm.logError log, default in the installation
php5.3 comes with PHP-FPM
Copy CodeThe code is as follows:
/usr/local/php/etc/php-fpm.conf
PID = Run/php-fpm.pidPID settings, default in the installation directory of Var/run/php-fpm.pid, it is recommended to open
Error_log = Log/php-fpm.logError
Parsing of file locks, mutex locks, and read/write locks in PHP programs ,. The use of file locks, mutex locks, and read/write locks in PHP programs is skillful in parsing. all file locks are called advisoryfilelock, which is mentioned in the book.
This article mainly introduced the PHP program in the file lock, mutual exclusion lock, read-write lock using skills analysis, which focuses on the Sync module and pthreads module use examples, the need for friends can refer to. We hope to help you.
PHP-FPM Restart, abort Operation command in PHP 5.4:
View php Run Directory command: which PHP/usr/bin/php
To view the number of PHP-FPM processes:PS aux | Grep-c PHP-FPM
View running Memory/usr/bin/php-i|grep Mem
Restart PHP-FPM/ETC/INIT.D/PHP-FPM
The future of PHP is second. 3.2 quickly install ApacheWeb server on Windows 9598nt2000 (10 seconds) and run PHP on Windows. you need a Web server. you can use Microsoft's IIS, you can also use free 3.2 to quickly install Apache Web server on
PHP program in the file lock, mutex, read and write the use of skills analysis,
File lockFull name advisory file lock, which is mentioned in the book. This type of lock is more common, such as MySQL, after php-fpm boot, there will be a PID file
In the past, many people used to run php in tomcat. many things need to be configured to run php in tomcat, such as apache server and phpmyadmin. Sometimes I think this is really annoying. I didn't really want to learn php, but sometimes I want to
Many articles say that mod_php cannot be shared with the Apache MPM worker or event, which may have been handed down in the Apache version 2.2 era. Since I compiled Apache 2.4 last year, I have been using the MPM event, and according to the
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.