PHPStorm Please configure PHP Interpreter to use built-in web server

 

This tutorial describes how to make use of the built-in webserver in PhpStorm.

PhpStorm comes with a built-in webserver that serves up static content like HTML, JavaScript and CSS, as well as PHP.

1. Open a project in PhpStorm

To be able to work with the built-in webserver in PhpStorm, a project has to be open. Make sure that the project has a PHP Interpreter configured under Settings / Preferences | Languages & Frameworks | PHP:

2. Open a web browser

The easiest way to open the file from PhpStorm project is invoking Open in Browser | Browser ... action in the file context menu (in Project View toolbox) or in the View | Open in Browser | Browser ... menu:

Alternatively, you can just navigate to http://localhost:63342/<projectname>. For example when working in a project called HelloWorld, navigate to http://localhost:63342/HelloWorld/. This will serve our project files using the project root as the webserver's content root.


Debugging using built-in webserver

Built-in webserver behaves like a normal webserver, which means that it can be used for proper PHP debugging. Please make sure that either Xdebug or Zend Debugger debug extension is installed and configured for the PHP interpreter set for the project.

Debugging using the built-in webserver is the same as normal debugging described in Zero-configuration Web Application Debugging with Xdebug tutorial and other debugging tutorials.

(optional) Built-in webserver configuration

Built-in webserver port can be always configured in Settings/Preferences | Build, Execution, Deployment | Debugger. The default port is 63342. Built-in webserver can also accept external connections when explicitly configured to do so (disabled by default due to security reasons).

I'm getting an error: PHP Interpreter is not configured

When opening the browser and navigating to the project, an error may occur:

This error is displayed when you navigate to the built-in webserver and no PHP interpreter has been specified for the project. By clicking the link in the error message or by using Settings/Preferences | Languages & Frameworks | PHP, the PHP interpreter can be specified.

来自:http://confluence.jetbrains.com/display/PhpStorm/Using+the+Built-in+Webserver+in+PhpStorm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

VCHH

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值