当向PHP脚本发送请求时,如果内容是中等大小,我将收到net :: ERR_CONNECTION_RESET。这个脚本适用于我所有较小的文件,但是在我的较大文件上出现错误。
<?php
include('Parsedown.php');
function update($url){
set_time_limit(0);
$prefix="/doc/";
$Parsedown = new Parsedown();
$body = file_get_contents(str_replace($prefix, "", $url, $count));
$content = $Parsedown->text($body);
echo $content;
}
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'update':
$path = $_REQUEST['path'];
update($path);
break;
}
}
?>
我在本地计算机上使用WAMP,而且我的PHP错误日志中没有错误。
D:/DevelopmentPrograms/wamp/bin/apache/apache2.4.9'
[Mon Jul 27 22:04:44.492523 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00418: Parent: Created child process 1100
[Mon Jul 27 22:04:45.098933 2015] [mpm_winnt:notice] [pid 1100:tid 312] AH00354: Child: Starting 64 worker threads.
[Mon Jul 27 22:04:49.007005 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00428: Parent: child process 1100 exited with status 255 -- Restarting.
[Mon Jul 27 22:04:49.162014 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Mon Jul 27 22:04:49.162014 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Mon Jul 27 22:04:49.162014 2015] [core:notice] [pid 8060:tid 388] AH00094: Command line: 'D:\\DevelopmentPrograms\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d D:/DevelopmentPrograms/wamp/bin/apache/apache2.4.9'
[Mon Jul 27 22:04:49.164014 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00418: Parent: Created child process 7256
[Mon Jul 27 22:04:49.755828 2015] [mpm_winnt:notice] [pid 7256:tid 312] AH00354: Child: Starting 64 worker threads.
[Mon Jul 27 22:04:50.937481 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00428: Parent: child process 7256 exited with status 255 -- Restarting.
[Mon Jul 27 22:04:51.107491 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Mon Jul 27 22:04:51.108491 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Mon Jul 27 22:04:51.108491 2015] [core:notice] [pid 8060:tid 388] AH00094: Command line: 'D:\\DevelopmentPrograms\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d D:/DevelopmentPrograms/wamp/bin/apache/apache2.4.9'
[Mon Jul 27 22:04:51.110491 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00418: Parent: Created child process 6848
[Mon Jul 27 22:04:51.705702 2015] [mpm_winnt:notice] [pid 6848:tid 312] AH00354: Child: Starting 64 worker threads.
[Mon Jul 27 22:06:44.944044 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00428: Parent: child process 6848 exited with status 255 -- Restarting.
[Mon Jul 27 22:06:45.187653 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Mon Jul 27 22:06:45.187653 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Mon Jul 27 22:06:45.187653 2015] [core:notice] [pid 8060:tid 388] AH00094: Command line: 'D:\\DevelopmentPrograms\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d D:/DevelopmentPrograms/wamp/bin/apache/apache2.4.9'
[Mon Jul 27 22:06:45.187653 2015] [mpm_winnt:notice] [pid 8060:tid 388] AH00418: Parent: Created child process 8908
[Mon Jul 27 22:06:45.841664 2015] [mpm_winnt:notice] [pid 8908:tid 312] AH00354: Child: Starting 64 worker threads.
非常感谢任何帮助。
编辑:我进入Windows事件查看器,这是我发现的。 Faulting application name: httpd.exe, version: 2.4.9.0, time stamp: 0x53258cd5
Faulting module name: php5ts.dll, version: 5.5.12.0, time stamp: 0x53614545
Exception code: 0xc00000fd
Fault offset: 0x0000000000139344
Faulting process id: 0x1720
Faulting application start time: 0x01d0c8e57ed9d544
Faulting application path: D:\DevelopmentPrograms\wamp\bin\apache\apache2.4.9\bin\httpd.exe
Faulting module path: D:\DevelopmentPrograms\wamp\bin\apache\apache2.4.9\bin\php5ts.dll
Report Id: bceb2687-34d8-11e5-bae9-00248c605386
答案 0 :(得分:0)
我通过运行32位版本的WAMP而不是64位解决了这个问题。