PHPStorm 7 在 Windows 上找不到 PHP 解释器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19704412/
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
PHPStorm 7 don't find PHP Interpreter on Windows
提问by Emac
I have installed trial version of PhpStorm 7on my Windows 7 64 bit.
Php Storm is installed in "C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\PhpStorm.exe"
and my Xampp server in in E:\xampp.
I go to set php interpreter but PhpStorm don't find it.
I opened phpinterpreter windows and choose directory E:\xampp\php
but I receive more error like this
我已经在我的Windows 7 64 位上安装了PhpStorm 7 的试用版。Php Storm 安装在我的 Xampp 服务器中,
我去设置 php 解释器,但 PhpStorm 没有找到它。我打开了 phpinterpreter 窗口并选择了目录,但我收到了更多这样的错误"C:\Program Files (x86)\JetBrains\PhpStorm 7.0\bin\PhpStorm.exe"
E:\xampp.
E:\xampp\php
Php Startup: Unable to load dynamic lybrary "\xampp\php\ext\php_xxxxxx.dll"......
Php启动:无法加载动态库“\xampp\php\ext\php_xxxxxx.dll”......
It seems that PhpStorm 7 trunks the path excluding the disc and cannot find the installation of php over xampp directory.
PhpStorm 7 好像是trunk了不包括光盘的路径,在xampp目录下找不到php的安装。
I forced write correct value in C:\Users\currentuser\.WebIde70\config\options\php.xml
, but I have same result
P
我强制在 中写入正确的值C:\Users\currentuser\.WebIde70\config\options\php.xml
,但结果相同 P
hp version: Not installed
Debugger: Not installed
but I have both installed and running.
但我已经安装并运行。
What should I do to correct the problem?
我应该怎么做才能解决问题?
Thanks very much
非常感谢
回答by DanielM
This worked for me, however I'm in PhpStorm 8 and the layout is entirely different. I'll still pop this here in case someone else needs these instructions.
这对我有用,但是我在 PhpStorm 8 中,布局完全不同。如果其他人需要这些说明,我仍然会在这里弹出它。
- Install your prefered PHP from here: http://windows.php.net/(It doesn't need to be in your PATH, just pop it anywhere)
- In PhpStorm, go to File -> Settings
- In settings go to Languages & Frameworks -> PHP
- Click the ellipsis next to Interpretter (this opens a new window)
- Click the plus button in the top left and choose "Other Local"
- Set the PHP exectuable to wherever you put your download above. It just needs to see php.exe
- 从这里安装你喜欢的 PHP:http: //windows.php.net/ (它不需要在你的 PATH 中,只需在任何地方弹出它)
- 在 PhpStorm 中,转到文件 -> 设置
- 在设置中转到语言和框架-> PHP
- 单击解释器旁边的省略号(这会打开一个新窗口)
- 单击左上角的加号按钮并选择“其他本地”
- 将 PHP 可执行文件设置为上面下载的任何位置。它只需要看到 php.exe
That's it. I've been using that to run Composer from PhpStorm... though I'm not convinced by the results.
就是这样。我一直在使用它从 PhpStorm 运行 Composer ......尽管我不相信结果。
As an alternative I would highlyrecommend using Vagrant for your PHP needs. You don't need PHP in Windows at all, and I've been developing this way for about 2 years. PhpStorm's remote support (including Vagrant, SSH and Remote Interpreter) is now excellent. I think the only thing I've been irritated by is PHPUnit Code Coverage is still broken.
作为替代方案,我强烈建议您使用 Vagrant 来满足您的 PHP 需求。在 Windows 中根本不需要 PHP,我已经用这种方式开发了大约 2 年。PhpStorm 的远程支持(包括 Vagrant、SSH 和远程解释器)现在非常出色。我认为唯一让我感到恼火的是 PHPUnit 代码覆盖率仍然被破坏。