本文目錄一覽:
- 1、php版本選擇問題.VC6和VC9的區別,TS和NTS如何選擇
- 2、PHP中V6,V9和V11是什麼意思
- 3、windows中怎樣安裝apache
- 4、PHP版本VC6和VC9,Non Thread Safe和Thread Safe的區別
- 5、php vc9 vc11 有什麼區別
- 6、怎樣選擇PHP的版本
php版本選擇問題.VC6和VC9的區別,TS和NTS如何選擇
TS是Thread Safety,代表線程安全,而NTS是None Thread Safe代表非線程安全。
Windows系統下才分線程安全與非線程安全,
windows + Apache + PHP(模塊) :使用線程安全版本。
windows + Apache + PHP(FastCGI) :使用非線程安全版本。
如果你的電腦是32位的, 那裝x86的版本,如果是64位的, 裝x64的版本!
一般來說不區分32位和64位,或者64位操作系統兼容32位的PHP,但是在某些操作系統上還是區分32位和64位的,例如windows 2008。
vc6和vc9是指vc運行庫的版本,你PHP版本標誌的是VC9,那麼運行的時候,需要安裝vc9
VC9 -是安裝運行使用 Visual Studio 2008 生成的 C++ 應用程序所必需的運行時組件。
這篇教程文章里提供700多個PHP版本下載。(700個PHP版本一鍵切換)
百度搜索這個文章標題:
PHP集成環境如何自定義PHP版本,同時運行多個php版本一鍵開啟模塊。
搜到的文章中,在文章的附件里有提供PHP歷史版本下載,差不多700多個PHP版本,最老和最新版本都包含了。如果你找不到,就找原文吧,因為你搜到的文章可能是被其他網站轉載的。
建議使用PHPWAMP綠色集成環境,700個PHP版本隨意切換,多版本同時運行。
(百度搜PHPWAMP有詳細的使用教程,能同時運行多個PHP版本,一鍵去端口等)
PHP中V6,V9和V11是什麼意思
vc運行庫的版本。vc9運行php就需要vc9運行庫。vc11就需要vc11運行庫
windows中怎樣安裝apache
方法/步驟
1
Apache下載:
在百度搜索 Apache下載,進入官網下載地址
多圖
2
打開ApacheHaus之後你會發現這裡有許多的windows版的Apache版本
這裡簡單的介紹一下:x86代表32位,x64代表64位。根據自己安裝的系統選擇
關於vc9與vc11,這裡的選擇要跟PHP對應才能穩定的運行。(按照PHP官方提供的資源來看,PHP 5.5以後的版本官方只提供了VC11版本的產品程序,PHP5.3/5.4版還有VC9版本的產品程序)
3
注意建立好自己的文件存放方式,方便以後管理
下載完畢後解壓,將解壓的 Apache24文件夾複製到自己的項目目錄裏面。你的項目根目錄為E:/wamp/Apache24/htdocs即DocumentRoot的定義。如果想放到其他目錄下,需要修改httpd.conf,包括ServerRoot、DocumentRoot、Directories,ScriptAlias。需要改為你的Apache目錄的地址。
4
因為這裡我們下載的是官方源碼包,所以需要把Apache服務安裝到我們的計算機上面
開啟控制台:win+R 輸入cmd
命令行下進入到apache下面的bin目錄,輸入
httpd -k install 把apache安裝成windows後台服務。
5
所有基本的命令都可以在Apache官網上找到,下面是一些常用的命令
6
最後使用ApacheMonitor來管理apache服務器
訪問測試是否成功
PHP版本VC6和VC9,Non Thread Safe和Thread Safe的區別
vc就是常說的microsoft visual c++ redistributable package,vc6和9代表的不同版本,6應該是vc++6.0,9是vc++2008,10是vc++2010,11是vc++2012,如果用相應的版本的visual studio編譯的,同時還需要運行庫的支持,不然就會報常見的缺少vcr***.dll錯誤,也就是說vc6版本需要安裝visual c++ 6.0 運行庫,vc9需要安裝microsoft visual c++ 2008 redistributable package,現在主流是vc9以上了。至於線程安全,官網是這樣說的
Which version do I choose?
IIS
If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.
Apache
Please use the Apache builds provided byApache Lounge. They also provide VC11 builds of Apache for x86 and x64. We use their binaries to build the Apache SAPIs.
If you are using PHP with Apache 1 or Apache2 from apache.org (not recommended) you need to use the older VC6 versions of PHP compiled with the legacy Visual Studio 6 compiler. Do NOTuse VC9+ versions of PHP with the apache.org binaries.
With Apache you have to use the Thread Safe (TS) versions of PHP.
VC9 and VC11
More recent versions of PHP are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) and include improvements in performance and stability.
The VC9 builds require you to have theVisual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012×86 or x64 installed.
TS and NTS
TS refers to multithread capable builds.NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTSbinaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).
php vc9 vc11 有什麼區別
VC6是什麼?
VC6就是legacy Visual Studio 6 compiler,就是使用這個編譯器編譯的。
VC9是什麼?
VC9就是the Visual Studio 2008 compiler,就是用微軟的VS編輯器編譯的。
那我們如何選擇下載哪個版本的PHP呢?
如果你是在windows下使用Apache+PHP的,請選擇VC6版本;
如果你是在windows下使用IIS+PHP的,請選擇VC9版本。
怎樣選擇PHP的版本
IIS
如果想使用IIS配置PHP的話,那麼需要選擇Non-Thread Safe(NTS)版本的PHP
Apache
如果你是用的Apache的版本來自Apache Lounge可以使用PHP VC11 x86或者x64版本。
如果你使用的是從apache.org下載的Apache1或者Apache2來搭建PHP環境的話,只能使用VC6版本,無法使用VC9+以上版本。
VC9 和VC11
VC9和VC11是PHP的最新版本(這兩個版本分別通過Visual Studio 2008和Visual Studio 2012編譯),其中包含了對於性能和穩定性的改進。
VC9版本要求用戶安裝Microsoft Visual C++ 2008 SP1 Redistributable Package(x86 |x64)
VC11版本要求用戶安裝Visual C++ Redistributable for Visual Studio 2012(x86 | x64)
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-hk/n/301896.html