|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35500 auto_prepend_file seems to fail randomly
Submitted: 2005-12-01 12:30 UTC Modified: 2005-12-10 01:00 UTC
From: bugnet at gartenfreunde dot eu dot org Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.1.1 OS: Linux 2.6.13-gentoo-r5 SMP AMD64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
38 - 30 = ?
Subscribe to this entry?

 [2005-12-01 12:30 UTC] bugnet at gartenfreunde dot eu dot org
I'm using PHP Version 5.0.5-pl3-gentoo (no way to upgrade to 5.1.1) and Apache 2.0.54 with mpm_worker.
Approx. 10 times a day I get an errormessage like the following, the rest of the time (50000+ requests) everything works fine:

[Thu Dec 01 11:17:18 2005] [error] [client x.x.x.x] PHP Warning:  main() [<a href='function.include'>function.include</a>]: Failed opening 'lib_tools.php' for inclusion (include_path='/var/www/includes') in /var/www/htdocs/index.php on line 22, referer: http://xxx

[Thu Dec 01 11:17:18 2005] [error] [client x.x.x.x] PHP 
Warning:  main() [<a href='function.include'>function.include</a>]: Failed opening 'lib_session.php' for inclusion (include_path='/var/www/includes') in /var/www/htdocs/index.php on line 25, referer: http://xxx

index.php looks like this:
include_once ($lib_dir.'lib_tools.php');
include_once ($lib_dir.'lib_session.php');

$lib_dir is set in prepend.php, httpd.conf reads:
php_value auto_prepend_file /var/www/prepend.php

When the error occurs $lib_dir is empty, so it looks like the prepend file doesn't get prepended under some conditions. I'm not sure if this is an PHP or an Apache issue, on our old system running PHP4 and Apache 1.x the problem didn't occur.

Reproduce code:
occurs randomly approx 10 times a day, regardsless of systemload etc.

Expected result:
a file listed in auto_prepend_file should always be prepended


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-01 12:35 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-12-01 14:20 UTC] bugnet at gartenfreunde dot eu dot org
I can't use source tarballs. I installed PHP 5.1.1 from
I'll report back if the problem still occurs.
 [2005-12-02 10:15 UTC] bugnet at gartenfreunde dot eu dot org
problem is still there with 5.1.1
 [2005-12-02 14:25 UTC]
Can your reproduce this problem when using the prefork MPM ?
(threaded MPMs are not really supported by PHP)

 [2005-12-10 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-12-13 23:53 UTC] master at bettertuning dot com
I'm experiencing similar problems and reaching the end of my wits.
I'm using debian sarge, apache 1.3.3 with php as module in version 5.1.1 (selfcompiled), 5.1.1 (debian package) or 5.0.4 (built by confixx).

I had problems with confused open_basedir-Restrictions which were set correctly but permuted as if there was a leackage between several virtual-host-containers.

So when I turned safemode and open_basedir-Restrictions off for all domains I got errors where although correctly configured in (confixx_)vhost.conf I got errors with the include-path from the very first virtual-host-container on the other domains, like

Fatal error: require() [function.require]: Failed opening required '' (include_path='.:/var/www/confixx/html/include:/var/www/confixx/html') in /var/www/web1/setenv.conf on line 16

setenv.conf is autoprepended through .htaccess - error does also occur if configured in httpd.conf.

The error never occurs just after apachectl restart but later randomely, but quite often.

Grateful for suggestions / fixing.
 [2005-12-14 01:25 UTC] master at bettertuning dot com
I replace php 5.1.1 with php 5.0.0 and the error didn't occur again yet. A clear indicator that it is about an error on php's rather than on apache's side.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 08 13:05:46 2022 UTC