phpstorm常见问题

来源:互联网 发布:jquery json转url参数 编辑:程序博客网 时间:2024/05/17 07:06

红色字体为译文

1.报错:php interpreter is not configured, please configure php interpre

原因与解决:PHP解释器没有配置,点击configure PHP Interpreter 弹出一个选择php程序路径的窗口 在Interpreter目录按钮,定位到PHP程序解压的目录(php.exe的目录)!

2.PHP Remote Interpreters Support in PhpStorm 8 EAP(PHP在PhpStorm 8 EAP远程翻译支持)

Support for php_remote_int_introPHP remote interpreters has beenintroduced in PhpStorm 8 EAP. It lets us use a PHP interpreter over SSH installed on any remote environment, to run/debug application and run testing tools remotely.

(支持远程口译员在PhpStorm beenintroduced 8 EAP php_remote_int_introPHP。它让我们使用一个PHP解释器在SSH上安装任何远程环境,运行/调试应用程序并运行远程测试工具)

Using a remote interpreter instead of a local one gives us an opportunity to get advantages of a PHP interpreter installed in a production-like environment (be it a physical server, a virtualized environment such as Vagrant, or any other). That way we can make sure there will be no inconsistencies when the application is finally deployed to production.

(使用远程翻译而不是当地的给了我们一个机会一个PHP解释器的优点在类似生产的环境中的安装(可以是一个物理服务器、虚拟环境等。这样我们可以确保应用程序时被部署到生产环境时不会有矛盾。)

In this blog post we will look into configuring and using PHP remote interpreters for PHPUnit.

(在这篇文章我们将考虑使用PHP配置和远程翻译PHPUnit)

PHP Remote Interpreters Configuration(PHP远程口译员配置)

A remote interpreter can be configured in the same way as a local one in Settings | PHP | Interpreter | …

(远程翻译可以以同样的方式作为本地配置中设置PHP解释器| | |…)

php_remote_int_config1

All the current PHP interpreters will be listed. Click the + button to add a new one, then selectRemote to add a new remote interpreter.

(所有当前的PHP解释器将上市。单击+按钮添加一个新的,然后selectRemote添加一个新的远程翻译.)

php_remote_int_config2

The PHP remote interpreter dialog displays:

(PHP远程翻译对话框显示:)

php_remote_int_config3

A PHP remote interpreter can be configured:(一个PHP远程翻译可以配置:)

  • Manually – all the SSH connection details should be provided in the dialog (Host, Port, User name, Auth type, Password, etc);
  • (应提供手动——所有SSH连接细节在对话框中(主机、端口、用户名、身份验证类型,密码,等)
  • From the deployment server configuration – after selecting a deployment server, all the connection details will be filled in by PhpStorm from deployment server settings. Please note that SFTP deployment with valid mappings should be configured first in Settings | Deployment to have the button Fill from deployment server settings available.
  • (从部署服务器配置,选择部署服务器之后,所有的连接细节将由PhpStorm填写从部署服务器设置。请注意,SFTP部署与有效的映射应该首先配置设置|部署从部署服务器设置按钮填补可用)
  • From the Vagrant configuration – after selecting Vagrant Configuration Folder, all the connection details will be filled in by PhpStorm from the current Vagrant configuration.
  • (从流浪的配置——在选择流浪的配置文件夹,所有的连接细节将由PhpStorm填写从当前流浪的配置)

php_remote_int_config4

After you click OK, the connection will be tested and (in case of success) the remote interpreter will be added to the list of PHP interpreters in PhpStorm.(单击OK后,连接将被测试和远程翻译(成功)的情况下将被添加到PHP解释器在PhpStorm列表)

php_remote_int_config5

Please note that a valid deployment server with correct mappings should be configured in any case so that PhpStorm knows what file should be executed on the remote environment.(请注意,一个有效的部署服务器正确映射应该配置在任何情况下,PhpStorm知道文件应该在远程执行环境)

PHPUnit via SSH(PHPUnit通过SSH)

One of the most important use cases for PHP remote interpreters is running PHPUnit tests remotely, and now it’s already possible.

(最重要的一个用例远程PHP运行PHPUnit)测试远程口译员,现在它已经成为可能)

In order to configure a running PHPUnit remotely, just add a new PHPUnit Setting by Remote Interpreter in Settings | PHP | PHPUnit.

(为了配置远程运行PHPUnit),只添加一个新的PHPUnit设置通过远程PHP解释器在设置| | PHPUnit)

php_remote_int_pu1

Select the appropriate remote interpreter in the dialog to proceed:(选择适当的远程翻译在对话框中进行)

php_remote_int_pu2

The PHPUnit configuration will be added, and the usual PHPUnit testing workflow will be valid (with PHPUnit configuration through run/debug configurations dialog).(PHPUnit)配置将被添加,通常PHPUnit)测试工作流程将是有效的(通过运行/调试与PHPUnit)配置配置对话框)

Please note that PHPUnit configuration will be used according to the default PHP interpreter setting for the project. The same PHPUnit configuration can be used for working with local and remote interpreter, it will rely on the default PHP interpreter setting in the project.(请注意,PHPUnit)配置将根据默认的PHP解释器设置用于该项目。同一PHPUnit)配置可用于处理本地和远程翻译,它将依靠默认PHP解释器在项目设置)

Support for PHP remote interpreters is still a work in progress, so please have a look at known and planned issues and take a minute to report any bugs or feature requests to our issue tracker.(支持PHP远程翻译仍然是一个正在进行的工作,所以请看看已知和计划问题,花一分钟报告任何错误或特性请求我们的问题跟踪器)




0 0
原创粉丝点击