|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-03-17 13:57 UTC] vrana@php.net
Description: ------------ Apache 2.2.11 crashes with PHP 5.2.9-1 on the following code. The same script run from CLI executes without crash. Reproduce code: --------------- <?php $contents = '/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */'; // shortest possible example, omitting last line causes no crash $contents = preg_replace('@/\\*(?:.|[\\n\\r])*?\\*/@', '', $contents); ?> Expected result: ---------------- Empty string in $contents. Actual result: -------------- Apache crash. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 00:00:01 2025 UTC |
I'm experiencing similar crash on PHP 5.2.9-2, Apache 2.2.11, Vista SP2 if I run simple code like: <?php $content = ' <!-- Book Navigation Start --> <div> <ul class="menu"><li class="collapsed first">Web Services</li> <li class="collapsed">Integration Tools</li> <li class="leaf">Developer Group</li> <li class="leaf last">Developer Forum</li> </ul> <div class="page-links clear-block"> <a href="test/wws" class="page-next" title="Go to next page"> Web Services </a> </div> </div> <!-- Book Navigation End --> '; $pattern = '/<!-- Book Navigation Start -->((.|\s)+)<!-- Book Navigation End -->/i'; preg_match($pattern, $content, $book_nav); ?> However this works fine in PHP 5.2.8 and in CLI for 5.2.9-2.