php 程序无法启动,因为缺少 php5.dll
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5592739/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
program cant start because php5.dll is missing
提问by edelwater
- I installed XAMPP , phpinfo: PHP Version 5.3.5
- Downloaded PHPPDT, installed
- downloaded webserver debug extension, copied dummy.php
- added zend_extension="c:\edward\xampp\php\ext\5_3_x_nts_comp\ZendDebugger.dll"
- 我安装了 XAMPP , phpinfo: PHP Version 5.3.5
- 下载PHPPDT,安装
- 下载网络服务器调试扩展,复制 dummy.php
- 添加了 zend_extension="c:\edward\xampp\php\ext\5_3_x_nts_comp\ZendDebugger.dll"
stop, restart apache, get:
停止,重启apache,得到:
"the program cant start because php5.dll is missing from your computer"
“程序无法启动,因为您的计算机缺少 php5.dll”
(while php5nts.dll is included)
(同时包含 php5nts.dll)
is installing zend studio ce the alternative or can i make it work with XAMPP? (using Zend Studio CE works)
安装 zend studio ce 是替代方案还是我可以让它与 XAMPP 一起使用?(使用 Zend Studio CE 作品)
回答by ppoo
if your php version is Non-Thread-Safe (nts) you must use php extension with format example: extension=php_cl_dbg_5_2_nts.dll else if your php version is Thread-Safe (ts) you must use php extension with format example: extension=php_cl_dbg_5_2_ts.dll (notice bolded words)
如果您的 php 版本是非线程安全 (nts),您必须使用格式示例的 php 扩展名:extension=php_cl_dbg_5_2_ nts.dll 否则,如果您的 php 版本是线程安全 (ts),您必须使用格式示例的 php 扩展名:extension =php_cl_dbg_5_2_ ts.dll(注意粗体字)
So if get error like above. Firstly, check your PHP version is nts or ts, if is nts.
Then check in php.ini whether has any line like zend_extension_ts="C:\xammp\php\ext\php_dbg.dll-5.2.x" choose right version of php_dbg.dll-5.2.x from it homepage (google for it).
Change from zend_extension_tsto zend_extension_nts.
因此,如果出现上述错误。首先,检查您的 PHP 版本是 nts 还是 ts,如果是nts。
然后检查 php.ini 是否有像 zend_extension_ ts="C:\xammp\php\ext\php_dbg.dll-5.2.x" 这样的行,从它的主页中选择正确版本的 php_dbg.dll-5.2.x (google for it )。从 zend_extension_ ts更改为 zend_extension_ nts。
Hope this help.
希望这有帮助。
回答by mAsT3RpEE
Download php5.dll (http://windows.php.net/download/) and copy it to apache/bin folder. That solved it for me (Win 7 64 bit apache 32 bit)
下载 php5.dll ( http://windows.php.net/download/) 并将其复制到 apache/bin 文件夹。那为我解决了(Win 7 64 位 apache 32 位)
EDIT:Start with the non-thread safe version.
编辑:从非线程安全版本开始。
回答by mAsT3RpEE
For Wamp x86+Phalcon users (with same error):
对于 Wamp x86+Phalcon 用户(具有相同的错误):
Take care of download the right version of Phalcon:
注意下载正确版本的 Phalcon:
Phalcon 1.3.2 - Windows x86for PHP 5.5.0 (VC11)
Phalcon 1.3.2 - 适用于 PHP 5.5.0 ( VC11) 的Windows x86
回答by rohitpaniker
I just now faced this issue while trying to restart XAMPP Apache.
我刚刚在尝试重新启动 XAMPP Apache 时遇到了这个问题。
What you can do to solve this is:
你可以做的来解决这个问题:
- download PHP5.dll from http://originaldll.com/file/php5.dll/30704.html
- Copy the downloaded php5.dll to C:\xampp\php
- Start APACHE and MySql from XAMPP control panel
- 从http://originaldll.com/file/php5.dll/30704.html下载 PHP5.dll
- 将下载的php5.dll复制到C:\xampp\php
- 从 XAMPP 控制面板启动 APACHE 和 MySql
Hope my solution solves your problem.
希望我的解决方案能解决您的问题。
Thank You!
谢谢你!
回答by Pierre
I had the same problem I switched from wamp to xampp and yes PHP was working because my path was still pointing to my old installation. I had forgotten to change it to point to my new php installation which version of php didn't match the rest at all.
我遇到了同样的问题,我从 wamp 切换到 xampp,是的,PHP 正在运行,因为我的路径仍然指向我的旧安装。我忘记将其更改为指向我的新 php 安装,哪个 php 版本与其余版本完全不匹配。
回答by bsauls
In case this might help someone, after installing the thread safe version of PHP 5.5.1, everything was working under apache for my dev sites, but I ran into the same "php5.dll is missing" problem installing Composer using the Composer-Setup.exe - or, as I soon discovered, just running something as simple as php -v from the command line. I made a copy of php5ts.dll and named it php5.dll and everything worked. I assume the Composer installer was specifically looking for "php5.dll" and I knew that the thread safe code would be run by the renamed .dll. I also assume something is wrong with my setup to screw up the command line functionality, but with everything working, I have more important issues to deal with than to try and find the problem.
万一这可能对某人有所帮助,在安装 PHP 5.5.1 的线程安全版本后,我的开发站点的一切都在 apache 下运行,但我遇到了相同的“缺少 php5.dll”问题,使用 Composer-Setup 安装 Composer .exe - 或者,正如我很快发现的,只是从命令行运行像 php -v 这样简单的东西。我复制了 php5ts.dll 并将其命名为 php5.dll 并且一切正常。我假设 Composer 安装程序专门寻找“php5.dll”,并且我知道线程安全代码将由重命名的 .dll 运行。我还假设我的设置有问题以搞砸命令行功能,但是在一切正常的情况下,我有比尝试查找问题更重要的问题要处理。
回答by PiTheNumber
I needed to change environment variable PATH
and PHPRC
. Also open new cmd
.
我需要更改环境变量PATH
和PHPRC
. 也开新的cmd
。
I already had PHP installed and added EasyPHP when the problem came up. After I changed both variables to C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\binaries\php\php_runningversion
it worked fine.
当问题出现时,我已经安装了 PHP 并添加了 EasyPHP。在我将两个变量都更改为C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\binaries\php\php_runningversion
它之后工作正常。
回答by eriktecse
What you can do to solve this is:
你可以做的来解决这个问题:
- Download PHP5.dllor PHP7.dllfrom: http://windows.php.net/download/.
- Copy the downloaded php5.dllor php7.dllto
C:\xampp\php
. - Start Apache and MySQL from XAMPP Control Panel.
- 从http://windows.php.net/download/下载PHP5.dll或PHP7.dll。
- 将下载的php5.dll或php7.dll复制到
C:\xampp\php
. - 从 XAMPP 控制面板启动 Apache 和 MySQL。
回答by abje
When you open phpinfo() see if the thread safety is enable or not enable also see the version of php and see MSVC-- what is the number in place of -- and see the architecture these all things help u to get the suitable php driver
当您打开 phpinfo() 时,查看线程安全是否启用,还可以查看 php 的版本并查看 MSVC-- 代替的数字是多少-- 并查看架构,这些都可以帮助您获得合适的 php司机
here a url help u to get a php driver https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
这里有一个 url 可以帮助您获取 php 驱动程序 https://s3.amazonaws.com/drivers.mongodb.org/php/index.html