在 Eclipse IDE 中开始使用 PHP
我是一名 Java 程序员,但最近找到了一份使用 PHP 和 mySQL 的工作。我为此查找了一些好的 IDE(我以前使用过 Netbeans),并推荐了 Eclipse。
当我尝试开始工作时,我收到以下错误消息:
Error launching 'firstfile'
The debug session could not be started.
Please make sure that the debugger is properly configured as a php.ini directive."
我在 Google 上查找了此内容并尝试了一系列建议的解决方案。我什至重新安装了 Eclipse。
我有以下内容:
- eclipse-php-helios-win32 (full)
- WampServer2.1
我的配置位于 Window->Settings->PHP->PHP Executables 下:
Name: exec-wamp
Executable Path: C:\wamp\bin\php\php5.3.5\php.exe
PHP ini file: C:\wamp\bin\php\php5.3.5\php.ini
SATI Type: CLI
PHP debugger: XDebug
注意:我尝试将调试器切换到 Zend Debugger ,这没有帮助。
I am a Java programmer, but recently got a job working with PHP and mySQL. I looked up good IDEs for this (I previously used Netbeans) and Eclipse was recommended.
When I tried to start working, I got the following error message:
Error launching 'firstfile'
The debug session could not be started.
Please make sure that the debugger is properly configured as a php.ini directive."
I looked this up on Google and tried a bunch of the solutions proposed. I even re-installed Eclipse.
I have the following:
- eclipse-php-helios-win32 (full)
- WampServer2.1
My configuration is under Window->Settings->PHP->PHP Executables is:
Name: exec-wamp
Executable Path: C:\wamp\bin\php\php5.3.5\php.exe
PHP ini file: C:\wamp\bin\php\php5.3.5\php.ini
SATI Type: CLI
PHP debugger: XDebug
NOTE: I tried to switch debuggers to Zend Debugger and this did not help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
查看资源 http://www.xdebug.org/docs/install#configure- php 并确保您已按照描述配置了所有内容。
具体来说:
php.ini
中设置正确 取消php.ini
中的字符串modphp< /code>)
xdebug
Check out the resource at http://www.xdebug.org/docs/install#configure-php and make sure you have everything configured as-described.
Specifically:
php.ini
php.ini
modphp
)xdebug
只需访问 http://www.zend.com/products/studio/downloads 并下载“Studio Web 调试器”。按照安装指南 (http://static.zend.com/topics/Zend-Debugger-Toolbar-Installation-Guide.pdf) 中给出的说明进行操作。
技巧是选择与您的 PHP 版本相对应的正确 ZendDebugger.dll(或 .so)。
通过这些步骤,您可以将 PHP 程序作为脚本运行,并且输出将显示在控制台中。
希望这有帮助。
Just go to http://www.zend.com/products/studio/downloads and download the "Studio Web Debugger". Follow the instructions given in the Installation guide (http://static.zend.com/topics/Zend-Debugger-Toolbar-Installation-Guide.pdf).
Trick is to choose the right ZendDebugger.dll (or .so) corresponding to your PHP version.
With these steps, you can run your PHP program as a script and the output appears in the console.
Hope this helps.
Aptana Studio 非常适合 PHP,并且基于 Eclipse 构建。它可以用作独立的 IDE 或 Eclipse 插件。它为您提供了 Eclipse 的所有优点以及许多额外的功能,使使用 PHP、JS 和 HTML/CSS 进行 Web 开发成为一种乐趣。请参阅 http://www.aptana.com/
Aptana Studio works great for PHP and is built on Eclipse. It can be used as a standalone IDE or as an Eclipse plugin. It gives you all the benefits of Eclipse plus a lot of extra stuff that makes doing web development in PHP, JS, and HTML/CSS a joy. See http://www.aptana.com/
您是否有用于调试器的正确 zend_extension 变量?
使用phpinfo来检查。
http://www.eclipse.org /pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf
向下滚动到 pdf 中的故障排除。
Do you have correct zend_extension variable for debugger?
Use phpinfo, to check.
http://www.eclipse.org/pdt/articles/debugger/os-php-eclipse-pdt-debug-pdf.pdf
Scroll-down to Troubleshooting in the pdf.
使用 Eclipse 多年后,我开始使用 NetBeans。 Eclipse 相当不错。但缺点是许多插件捆绑在一起并且不与核心通信,正如您在错误日志中看到的那样。 :\
您可以查看 Eclipse 上的 Aptana 构建,它对于 JavaScript 非常有用。 PDT(PHP 开发工具)对于 PHP 来说也非常有用。但是,如果您在 Eclipse 上同时使用这两者,则会产生很多冲突。
我会尝试使用 NetBeans for PHP。默认情况下,它会安装 PHP、MySQL、CSS 和 JavaScript 所需的所有内容。
I started with NetBeans after using Eclipse for many years. Eclipse is pretty good. Downsides, though, are that many plugins come bundled and don't communicate with the core, as you can see in the error log. :\
You might check out the Aptana build on Eclipse, which is good with JavaScript. PDT (PHP Developer Tools) is also really good for PHP. If you use the two together on Eclipse, though, you'll have a lot of conflicts.
I'd try NetBeans for PHP. By default, it installs all you need for PHP, MySQL, CSS and JavaScript.