首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么一旦我添加了更多代码,PHPStorm和XAMPP就会在本地主机上获得“内部服务器错误”?

为什么一旦我添加了更多代码,PHPStorm和XAMPP就会在本地主机上获得“内部服务器错误”?
EN

Stack Overflow用户
提问于 2015-11-08 16:48:55
回答 1查看 1.2K关注 0票数 0

我正在使用PHPStorm和XAMPP开发Win7。这两种方法都很好,但是当我添加更多的代码(例如,一个新的PhpStorm )时,我就开始得到“500InternalServerError 9.0.2”。当我再次删除它时,它又起作用了。相同的代码在but主机上工作,但在本地主机上不起作用。

有什么问题吗?

这是没有意义的,为什么添加一个新的div会导致服务器错误?在error.logphp_error_log中没有关于这个问题的日志。如果发现有一个IDE错误日志,它会说:

2015年-11-08 17:49:28,975 6667034错误- ains.io.fastCgi.FastCgiService - readerIndex(5) +长度(1)超过writerIndex(5):CompositeByteBuf(脊: 5,宽: 5,上限: 8189,components=2) java.lang.IndexOutOfBoundsException: readerIndex(5) +长度(1)超过writerIndex(5):CompositeByteBuf(脊: 5,宽: 5,上限: 8189,在io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1138),io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:542),org.jetbrains.io.fastCgi.FastCgiService.a(FastCgiService.java:197),org.jetbrains.io.fastCgi.FastCgiService.responseReceived(FastCgiService.java:170),org.jetbrains.io.fastCgi.FastCgiDecoder.contentReceived(FastCgiDecoder.java:128),org.jetbrains.io.fastCgi。FastCgiDecoder.contentReceived(FastCgiDecoder.java:15) at org.jetbrains.io.Decoder.readContent(Decoder.java:68) at org.jetbrains.io.fastCgi.FastCgiDecoder.messageReceived(FastCgiDecoder.java:75) at org.jetbrains.io.Decoder.channelRead(Decoder.java:38) at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84) at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:187) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:947) at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:147) at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:44) at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:834)在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:56) 2015-11-08 17:49:28,975 6667034错误- ains.io.fastCgi.FastCgiService - PhpStorm 9.0.2构建#PS-141.2462 2015-11-08 17:49:28,975 6667034错误- ains.io.fastCgi.FastCgiService - JDK: 1.8.0_51 2015-11-08 17:49:28,976 6667035错误- ains.io.fastCgi.FastCgiService - VM: ains.io.fastCgi.FastCgiService HotSpot(TM)服务器VM 2015-11-08 17:49:28,976 6667035错误- ains.io.fastCgi.FastCgiService -供应商:甲骨文公司2015-11-08 17:49:28,976 6667035错误- ains.io.fastCgi.FastCgiService : Windows 7 2015-11-08 17:49:28,976 6667035错误-ains.io.fastCgi.FastCgiService-最后行动: ShowLog

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-08 19:37:22

您正在使用PhpStorm自己的简单内置web服务器。出于某种原因,它显示了这些错误。如果你有XAMPP ..。然后就是XAMPP。

为此,您需要创建一个部署条目,在其中您将指定基本URL,PhpStorm将使用该URL在浏览器中打开文件。为此:

  1. Settings | Build, Execution, Deployment | Deployment
  2. 创建和配置新的部署条目(“就位”应该可以)
  3. 不要忘记将其标记为此项目的默认值。

现在IDE将使用在那里指定的URL,而不是内置的web服务器。

至于实际错误:

  1. 请尝试最新发布的PhpStorm v10
  2. 尝试更改您的PHP版本(如果您最近升级了它)
  3. 如果您希望继续使用内置的web服务器供开发人员查看,请将bug报告票提交给JetBrains‘问题跟踪器
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33596405

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档