問題描述
我在 Windows 上啟動 PHP 7 時出錯.當我在命令行上運行 php
時,它返回一個帶有系統錯誤的消息框:
I have an error when I start PHP 7 on Windows. When I run php
on the command line, it returns a message box with system error:
程序無法啟動,因為您的計算機缺少 VCRUNTIME140.dll.嘗試重新安裝程序以解決此問題.
The program can't start because VCRUNTIME140.dll is missing from your computer. Try reinstalling the program to fix this problem.
在那之后,CLI
崩潰了.
因為我不想從外部網站安裝 DLL 文件,所以我不知道如何解決這個問題!
As I don't want to install a DLL file from an external website, I don't know how to fix this!
PHP 版本: 7.0.0alpha1 VC14 x64 線程安全
推薦答案
在側欄上"noreferrer">PHP 7 alpha 下載頁面,它確實是這樣說的:
On the side bar of the PHP 7 alpha download page, it does say this:
VC9、VC11 &VC14較新版本的 PHP 是用 VC9、VC11 構建的或 VC14(分別為 Visual Studio 2008、2012 或 2015 編譯器)和包括性能和穩定性方面的改進.
VC9, VC11 & VC14 More recent versions of PHP are built with VC9, VC11 or VC14 (Visual Studio 2008, 2012 or 2015 compiler respectively) and include improvements in performance and stability.
VC9 版本要求您擁有適用于 Visual Studio 2008 SP1 的 Visual C++ Redistributable x86 或 x64 已安裝
VC11 版本需要具有適用于 Visual Studio 2012 的 Visual C++ Redistributable x86 或 x64 已安裝
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
VC14 版本需要具有適用于 Visual Studio 2015 的 Visual C++ Redistributable x86 或 x64 已安裝
The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
其中一些鏈接存在問題,因此這些文件也可從 Softpedia.
對于 PHP 7 alpha,這是最后一個必需的選項.
In the case of the PHP 7 alpha, it's the last option that's required.
我認為這些信息的位置很差,因為它有點邊緣化(即:它基本上就在邊緣!)而它實際上對軟件的運行至關重要.
I think that the placement of this information is poor, as it's kind of marginalized (i.e.: it's basically literally in the margin!) whereas it's actually critical for the software to run.
我在 PHP:讓 PHP7 alpha 在 Windows 8.1 上運行,它涵蓋了更多可能出現的癥狀.他們超出了這個問題的范圍,但可能會幫助其他人.
I documented my experiences of getting PHP 7 alpha up and running on Windows 8.1 in PHP: getting PHP7 alpha running on Windows 8.1, and it covers some more symptoms that might crop up. They're out of scope for this question but might help other people.
此問題的其他癥狀:
- Apache 未啟動,聲稱
php7apache2_4.dll
丟失,盡管它確實存在,并且在任何日志中沒有提供任何其他內容. php-cgi.exe - FastCGI 進程意外退出
(根據@ftexperts 下面的評論)
- Apache not starting, claiming
php7apache2_4.dll
is missing despite it definitely being in place, and offering nothing else in any log. php-cgi.exe - The FastCGI process exited unexpectedly
(as per @ftexperts's comment below)
嘗試的解決方案:
- 使用早期 PHP 7 開發版本中的
php7apache2_4.dll
文件.這不起作用.
(我包括那些用于 googleability 的.)
(I include those for googleability.)
這篇關于PHP 7:缺少 VCRUNTIME140.dll的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!