PHP 4.0 Bug #10555 Updated: .htaccess config setting cause sudden loss of PHP-include path or apache crash
| From: | bs_php at infeer dot com | Date: | Wed, 02 May 2001 10:48:54 +0000 |
| Subject: | PHP 4.0 Bug #10555 Updated: .htaccess config setting cause sudden loss of PHP-include path or apache crash | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-53304@lists.php.net to get a copy of this message | ||
ID: 10555
User Update by: bs_php@infeer.com
Old-Status: Open
Status: Closed
Bug Type: *Configuration Issues
Description: .htaccess config setting cause sudden loss of PHP-include path or apache crash
Problem has disappeared with the new version of php 4.0.5
Previous Comments:
---------------------------------------------------------------------------
[2001-04-29 13:55:16] bs_php@infeer.com
ERROR:
======
A *VERY* tricky error only showning up under load.
A simple reproduceable sample is below and a guess of reason.
Error will show up if you use Apache (V3.1.19) and try to set the PHP include_path as config setting
in the .htaccess file (instead of using the php-ini file) as described in chapter 3 of the PHP
documentation.
E.g. content of the .htaccess:
php_value include_path c:varwwwphp
Setup as described above and refresh the sample below quickly few times and you'll see the
effect:
- Either the apache server will crash
OR
- A PHP Fatal error: Failed opening required 'empty.php' (include_path=' KÞ')
in ... on line 2
will display suddenly in one of the frames instead of "OK". The content of include_path is
then random or an empty string.
REASON GUESS:
============
Either a PHP or Apache problem. When reading the .htaccess file it seams to cause a pointer error.
As this effect comes up under load, I guess it's a file pointer- or cashing- problem.
WORK AROUND:
============
Don't use .htaccess for PHP config settings under windows.
SAMPLE:
=======
2 Files empty.php and bug.php
A) empty.php: An empty PHP file that must be lying in the include_path (e.g. c:varwwwphp).
B) bug.php: The code is at the end of this repport. Put it somewhere accessable by the server and
browse it. On success you should see 4x4 frames displaying "OK". The error case is
described above.
<?
require_once('empty.php');
$thisFile = $PHP_SELF;
if (!isSet($input)) $input=0;
if ($input<2) {
$input++;
?>
<!-- frames -->
<frameset rows="50%,*" cols="50%,*">
<frame src="<? echo $thisFile; ?>?input=<? echo $input; ?>">
<frame src="<? echo $thisFile; ?>?input=<? echo $input; ?>">
<frame src="<? echo $thisFile; ?>?input=<? echo $input; ?>">
<frame src="<? echo $thisFile; ?>?input=<? echo $input; ?>">
</frameset>
<?
} else {
echo "OK";
}
?>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=10555