|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10555 .htaccess config setting cause sudden loss of PHP-include path or apache crash
Submitted: 2001-04-29 13:55 UTC Modified: 2001-05-02 06:48 UTC
From: bs_php at infeer dot com Assigned:
Status: Closed Package: *Configuration Issues
PHP Version: 4.0.4pl1 OS: Windows NT 4.0 and 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: bs_php at infeer dot com
New email:
PHP Version: OS:


 [2001-04-29 13:55 UTC] bs_php at infeer dot com
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:\var\www\php

Setup as described above and refresh the sample below quickly few times and you'll see the effect:
- Either the apache server will crash  
- 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. 

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.

Don't use .htaccess for PHP config settings under windows.

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:\var\www\php). 

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.

$thisFile = $PHP_SELF;
if (!isSet($input)) $input=0;
if ($input<2) {
  <!-- 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; ?>">
} else {
  echo "OK";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-02 06:48 UTC] bs_php at infeer dot com
Problem has disappeared with the new version of php 4.0.5
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 00:01:28 2024 UTC