dth54864 2014-06-11 15:10 采纳率: 0%
浏览 87
已采纳

Apache连接重置与preg_split

I'm facing a very weird behavior with Apache/2.2.25 (Win32) and PHP/5.4.10,

I have this code

$content = <<<EOF
<UNICODE-WIN>
<Version:7><FeatureSet:InDesign-R2L><ColorTable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
<DefineCharStyle:Character Style 1=<Nextstyle:Character Style 1><cTypeface:Bold Italic><cSize:19.000000><cCase:All Caps><cPosition:Normal><cKashida:Default>>
<DefineParaStyle:Paragraph Style 1=<Nextstyle:Paragraph Style 1><cTypeface:Bold Italic><cCase:All Caps>>
<DefineParaStyle:NormalParagraphStyle=<Nextstyle:NormalParagraphStyle>>
<ParaStyle:Paragraph Style 1><CharStyle:Character Style 1>Text Sample Text Sample Text Sample
<CharStyle:><ParaStyle:Paragraph Style 1>
<ParaStyle:NormalParagraphStyle><CharStyle:Character Style 1>
<CharStyle:><ParaStyle:NormalParagraphStyle>Text Sample Text Sample Text Sample Text Sample .
<CharStyle:><ParaStyle:NormalParagraphStyle>aa aaaaa aaaa  \\\<bbbbbbb\\\\\>cccccc
<ParaStyle:NormalParagraphStyle>
Text Sample Text Sample Text Sample Text Sample Text Sample Text Sample
<ParaStyle:NormalParagraphStyle><CharStyle:Character Style 1>Text Sample
<CharStyle:><ParaStyle:NormalParagraphStyle>
Text Sample Text Sample Text Sample Text Sample Text Sample
<ParaStyle:NormalParagraphStyle>Text Sample Text Sample Text Sample Text Sample
<ParaStyle:NormalParagraphStyle><CharStyle:Character Style 1><cNextXChars:Column>
<CharStyle:><ParaStyle:NormalParagraphStyle><cNextXChars:Column>
<ParaStyle:NormalParagraphStyle>Text Sample Text Sample
<ParaStyle:NormalParagraphStyle>
EOF;
$regex         = '/((<(([^<>]|<[^<>]*>)*)>\s*)+)/s';
$parts         = preg_split( $regex, $content, null, PREG_SPLIT_OFFSET_CAPTURE | PREG_SPLIT_NO_EMPTY );

And for some reason when I execute this code it results in connection reset page in the browser, no error log in Apache or PHP

Did some research online but could not find good solution for it,

Here's a link of the results of phpinfo page on the Windows server

Also please ntoe that I run the same code on other servers Windows and CentOS and it works just fine

Appreciate your help

  • 写回答

1条回答 默认 最新

  • duananyu9231 2014-06-15 09:03
    关注

    I was able to fix this issue by increasing ThreadStackSize to 8 MB instead of its default Windows value of 1 MB, you just need to add these lines into Apache conf file

    <IfModule mpm_winnt_module>
       ThreadStackSize 8388608
    </IfModule>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器