PHPstorm 10.0.3错误502错误的网关(由于JavaVM?) [英] PHPstorm 10.0.3 Error 502 Bad Gateway (Due to JavaVM?)

查看:246
本文介绍了PHPstorm 10.0.3错误502错误的网关(由于JavaVM?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows机器上的Apache文件夹中安装了PHPstorm 10.0.3试用版和PHP,但是,当我使用PHP解释器时,大约50-90%的时间出现错误502 Bad Gateway.
当这只是HTML页面时,它可以100%地工作.

I have installed PHPstorm 10.0.3 Trial, and PHP in my Apache folder on Windows machine, however when I use PHP interpreter I'm getting error 502 Bad Gateway around 50-90% of time.
When this is only HTML page, it works 100%of time.

我要做的是运行"我的template.php(或任何其他)文件,该文件随后在浏览器中显示为url: http://localhost:63342/htdocs/template.php

What I do is 'run' my template.php(or any other)file which then appears in browser with url: http://localhost:63342/htdocs/template.php

我已经测试过: PHP 7.0.2,PHP 5.3(ISS),第一个线程安全,第二个线程安全被禁用,结果相同.在Webstorm中,我的路径指向PHP-CGI.exe,这是不同主题中的问题.

I have tested: PHP 7.0.2, PHP 5.3(ISS), first one thread safe, second one thread safe disabled, same results. In Webstorm my path is pointing to PHP-CGI.exe which was problem in different topics.

我只能通过以下方式找到正在发生的事情的提示:PHPstorm/Help/Show Explorer in Explorer.因此,每当出现错误502时,就会出现以下情况:

Only hint about what is going on I was able to find out by clicking: PHPstorm/Help/Show Log in Explorer. So anytime I get Error 502 something along these lines comes up:

2016-01-14 09:57:21,510 [1084784]  ERROR - ins.io.ChannelExceptionHandler - PhpStorm 10.0.3  Build #PS-143.1770 
2016-01-14 09:57:21,510 [1084784]  ERROR - ins.io.ChannelExceptionHandler - JDK: 1.8.0_51 
2016-01-14 09:57:21,510 [1084784]  ERROR - ins.io.ChannelExceptionHandler - VM: Java HotSpot(TM) Server VM 
2016-01-14 09:57:21,510 [1084784]  ERROR - ins.io.ChannelExceptionHandler - Vendor: Oracle Corporation 
2016-01-14 09:57:21,510 [1084784]  ERROR - ins.io.ChannelExceptionHandler - OS: Windows 7 
2016-01-14 09:57:21,511 [1084785]   INFO - ins.io.ChannelExceptionHandler - Channel will be closed due to error 
2016-01-14 09:57:24,273 [1087547]  ERROR - ins.io.ChannelExceptionHandler - minimumReadableBytes: -2815 (expected: >= 0) 
java.lang.IllegalArgumentException: minimumReadableBytes: -2815 (expected: >= 0)
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1143)
    at io.netty.buffer.AbstractByteBuf.skipBytes(AbstractByteBuf.java:731)
    at org.jetbrains.io.Decoder.getBufferIfSufficient(Decoder.java:131)
    at org.jetbrains.io.fastCgi.FastCgiDecoder.messageReceived(FastCgiDecoder.kt:56)
    at org.jetbrains.io.Decoder.channelRead(Decoder.java:38)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:163)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:155)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:950)
    at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:166)
    at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:38)
    at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)

minimumReadableBytes在记录之间变化.

minimumReadableBytes is changing from record to record.

推荐答案

您正在使用PhpStorm自己的内置Web服务器,该服务器目前存在 some 问题(尤其是POST请求,例如 WEB-17317 ).

You are using PhpStorm's own built-in web server, which has some issues right now (especially with POST requests, e.g. WEB-17317).

解决方案是使用您自己的适当Web服务器(Apache/IIS/nginx/任何).

The solution is to use your own proper web server (Apache/IIS/nginx/whatever).

  1. 定义部署条目.只要您的Apache/IIS可以从该位置提供文件,In place类型就可以.否则,请将Web服务器配置为能够执行此操作..或使用另一种类型的部署(例如Local or Mounted Folders for IDE将文件复制到您的其他位置)
  2. 配置它(提供所需的URL等)
  3. 将此项目标记为默认"
  1. Define Deployment entry. In place type should be fine, as long as your Apache/IIS can serve files from that location; otherwise either configure web server to be able to do that .. or use another type of deployment (e.g. Local or Mounted Folders for IDE to copy files to another location for you)
  2. Configure it (provide desired URL etc)
  3. Mark it as Default for this project

现在,当您使用Open in Browser或运行/调试操作时,IDE将使用该基本URL(注意:它不会影响任何现有的运行/调试配置-仅影响以后的配置;您将必须更新当前的运行/手动调试配置.)

Now IDE will use that base URL when you will use Open in Browser or Run/Debug actions (NOTE: it will not affect any existing Run/Debug Configurations -- only future ones; you will have to update your current Run/Debug Configurations manually).

这篇关于PHPstorm 10.0.3错误502错误的网关(由于JavaVM?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆