Safe and non-streaming safe for Windows

I download PHP for Windows. I have 2 options on a website.

  • PHP Thread Safe
  • PHP without streaming security

Please answer the following questions:

  • What is the difference between the two? What are the advantages and disadvantages of each other?
  • I am developing an e-commerce site that will have intense traffic, which is more recommended and why?
+61
multithreading php
Aug 26 '11 at 12:40
source share
3 answers

From the PHP documentation:

Thread Safety means that a binary can work in the context of a multi-threaded web server, such as Apache 2 on Windows. Thread Safety works by creating a local copy of the repository in each thread so that data does not collide with another thread.

So what should I choose? If you decide to run PHP as a CGI binary, you will not need thread safety because the binary is called on every request. For multithreaded web servers such as IIS5 and IIS6, you must use a threaded version of PHP.

So, it really depends on how you want to use PHP:

  • Apache + LoadModule : Thread Safe
  • Apache + FastCGI: no streaming
  • IIS: Thread Safe
  • IIS + FastCGI: no streaming

There are good installation instructions in the PHP manual .

AFAIR, working with PHP with FastCGI, is the preferred way, it works faster and allows a smaller-scale security configuration.

+68
Aug 26 '11 at 12:44
source share

In addition to Crack, starting with version 5.4, you can use the built-in web server (it works well!).

+1
Jul 15 '12 at 13:25
source share

Quick and easy: if you are using Apache, edit the Apache24 \ conf \ httpd.conf file and search for "loadmodule". If you see that your loadmodule is referencing .dll, something like:

LoadModule php7_module "e: /x64Stack/PHP/php7.1.9/php7apache2_4.dll"
AddHandler / x-httpd-php.php application
PHPIniDir "e: /x64Stack/PHP/php7.1.9"

Then you want to enable stream protection or TS - the version for streaming .

Otherwise, if you use IIS or Apache with CGI, then NTS tastes.

I use several stacks inside these several servers and versions of PHP, so don't let start / php or server versions throw you.

0
Oct 21 '17 at 12:12
source share



All Articles