Unexpected Connection Reset: A PHP or an Apache issue?

后端 未结 8 584
时光说笑
时光说笑 2020-12-10 15:05

I have a PHP script that keeps stopping at the same place every time and my browser reports:

The connection to the server was reset while the page w

8条回答
  •  悲哀的现实
    2020-12-10 16:11

    I had an issue where in certain cases PHP 5.4 + eAccelerator = connection reset. There was no error output in any log files, and it only happened on certain URLs, which made it difficult to diagnose. Turns out it only happened for certain PHP code / certain PHP files, and was due to some incompatibilities with specific PHP code and eAccelerator. Easiest solution was to disable eAccelerator for that specific site, by adding the following to .htaccess file

    php_flag eaccelerator.enable 0

    php_flag eaccelerator.optimizer 0

    (or equivalent lines in php.ini):

    eaccelerator.enable="0"

    eaccelerator.optimizer="0"

提交回复
热议问题