PHPstorm 10.0.3 错误 502 错误网关(由于 JavaVM?)
PHPstorm 10.0.3 Error 502 Bad Gateway (Due to JavaVM?)
我已经在 Windows 机器上的 Apache 文件夹中安装了 PHPstorm 10.0.3 试用版和 PHP,但是当我使用 PHP 解释器时,我大约 50-90% 的时间收到错误 502 Bad Gateway。
当这只有 HTML 个页面时,100% 的时间都有效。
编辑:
我所做的是 'run' 我的 template.php(或任何其他)文件,然后在浏览器中显示 url:http://localhost:63342/htdocs/template.php
我测试过:
PHP 7.0.2,PHP 5.3(ISS),第一个线程安全,第二个线程安全禁用,结果相同。在 Webstorm 中,我的路径指向 PHP-CGI.exe,这是不同主题的问题。
只有通过单击才能找到有关正在发生的事情的提示:PHPstorm/Help/Show 登录资源管理器。所以每当我收到错误 502 时,就会出现以下内容:
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.run(AbstractOioChannel.java:38)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52)
at io.netty.util.concurrent.SingleThreadEventExecutor.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.run(PooledThreadExecutor.java:55)
minimumReadableBytes 正在从一条记录更改到另一条记录。
您正在使用 PhpStorm 自己的 built-in 网络服务器,它现在有 一些 问题(尤其是 POST 请求,例如 WEB-17317 ).
解决方案是使用您自己的适当网络服务器 (Apache/IIS/nginx/whatever)。
- 定义部署条目。
In place
类型应该没问题,只要您的 Apache/IIS 可以从该位置提供文件;否则要么配置 Web 服务器以能够执行此操作 .. 要么使用其他类型的部署(例如 Local or Mounted Folders
for IDE 为您将文件复制到另一个位置)
- 配置它(提供所需的 URL 等)
- 将其标记为该项目的默认值
现在 IDE 将在您使用 Open in Browser
或 Run/Debug 操作时使用该基础 URL(注意:它不会影响任何现有的 Run/Debug配置 -- 只有未来的配置;您必须手动更新当前的 Run/Debug 配置)。
这对我有用。
我打开了XAMPP控制面板v3.2.2,我进入了Apache->Config->httpd.conf
并更改了以下代码
收听 12.34.56.78:80
听80
到
收听 12.34.56.78:8080
收听 8080
此外,
服务器名称 localhost:80
到
服务器名称 localhost:8080
保存文件 httpd.conf 然后从 XAMPP 控制面板 v3.2.2 的主屏幕启动 apache 下面的操作并启动 apache。
之后我打开浏览器并手动输入地址
例如:
如果之前的地址是:http://
localhost:63342/htdocs/template.php(中间没有space)
新的 be:http://
localhost:8080/template.php(中间没有 space)
应该运行就好了。刷新页面,你应该不会收到 502 Bad Gateway 错误。
记住:如果您 运行 您的应用程序稍后可能会返回到以前的位置,您需要做的就是使用地址栏上的新位置(在这种情况下)
http://
localhost:8080/template.php。 (中间没有 space)
在你的情况下:
http://
localhost:8080/yourfilename.php(中间没有 space)
我已经在 Windows 机器上的 Apache 文件夹中安装了 PHPstorm 10.0.3 试用版和 PHP,但是当我使用 PHP 解释器时,我大约 50-90% 的时间收到错误 502 Bad Gateway。
当这只有 HTML 个页面时,100% 的时间都有效。
编辑: 我所做的是 'run' 我的 template.php(或任何其他)文件,然后在浏览器中显示 url:http://localhost:63342/htdocs/template.php
我测试过: PHP 7.0.2,PHP 5.3(ISS),第一个线程安全,第二个线程安全禁用,结果相同。在 Webstorm 中,我的路径指向 PHP-CGI.exe,这是不同主题的问题。
只有通过单击才能找到有关正在发生的事情的提示:PHPstorm/Help/Show 登录资源管理器。所以每当我收到错误 502 时,就会出现以下内容:
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.run(AbstractOioChannel.java:38)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52)
at io.netty.util.concurrent.SingleThreadEventExecutor.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.run(PooledThreadExecutor.java:55)
minimumReadableBytes 正在从一条记录更改到另一条记录。
您正在使用 PhpStorm 自己的 built-in 网络服务器,它现在有 一些 问题(尤其是 POST 请求,例如 WEB-17317 ).
解决方案是使用您自己的适当网络服务器 (Apache/IIS/nginx/whatever)。
- 定义部署条目。
In place
类型应该没问题,只要您的 Apache/IIS 可以从该位置提供文件;否则要么配置 Web 服务器以能够执行此操作 .. 要么使用其他类型的部署(例如Local or Mounted Folders
for IDE 为您将文件复制到另一个位置) - 配置它(提供所需的 URL 等)
- 将其标记为该项目的默认值
现在 IDE 将在您使用 Open in Browser
或 Run/Debug 操作时使用该基础 URL(注意:它不会影响任何现有的 Run/Debug配置 -- 只有未来的配置;您必须手动更新当前的 Run/Debug 配置)。
这对我有用。
我打开了XAMPP控制面板v3.2.2,我进入了Apache->Config->httpd.conf 并更改了以下代码
收听 12.34.56.78:80
听80
到
收听 12.34.56.78:8080
收听 8080
此外, 服务器名称 localhost:80
到 服务器名称 localhost:8080
保存文件 httpd.conf 然后从 XAMPP 控制面板 v3.2.2 的主屏幕启动 apache 下面的操作并启动 apache。
之后我打开浏览器并手动输入地址 例如:
如果之前的地址是:http:// localhost:63342/htdocs/template.php(中间没有space)
新的 be:http:// localhost:8080/template.php(中间没有 space)
应该运行就好了。刷新页面,你应该不会收到 502 Bad Gateway 错误。
记住:如果您 运行 您的应用程序稍后可能会返回到以前的位置,您需要做的就是使用地址栏上的新位置(在这种情况下) http:// localhost:8080/template.php。 (中间没有 space) 在你的情况下: http:// localhost:8080/yourfilename.php(中间没有 space)