当在eclipse中运行php项目时&;无法';t连接到服务器”;


when run php project in eclipse "Couldn't connect to Server"

我想在eclipse中运行我的第一个php项目(借助pet包)。当我运行我的项目(index.php)时,eclipse显示一个错误,并显示以下消息:

Page Login failed with error. Could not connect to the server.

更多信息:

  • 当我在浏览器中输入"http://localhost"时,它找不到服务器
  • 我正在使用eclipse的kepler版本
  • 我在MAC OSX中运行eclipse

我想我的本地服务器没有启动,或者我没有本地服务器。如何解决此错误?如何在mac中运行本地php服务器?

向致以最诚挚的问候

您需要安装一个服务器包,类似于MAMP。然后,您需要使用Xdebug对其进行配置,以便由Eclipse驱动,Xdebug是Apache的一个模块。为了使用Xdebug设置您的配置,请查看此处:http://wiki.eclipse.org/Debugging_using_XDebug