php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22791 php_value auto_prepend in .htaccess ignored when loading a index.html
Submitted: 2003-03-19 15:02 UTC Modified: 2003-03-20 16:29 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: peter dot kling at veritas dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.3.1 OS: solaris 8
Private report: No CVE-ID: None
 [2003-03-19 15:02 UTC] peter dot kling at veritas dot com
This function worked with Apache/1.3.26 and PHP Version 4.2.2 running on SunOS goldeneyes 5.8 Generic sun4u sparc SUNW,Ultra-4

Since we upgrade to PHP Version 4.3.1 this does not work.

we have .htaccess files in directories that just have the following two lines:
----Start---
php_value auto_prepend_file "/vfr/htdocs/jscode/menuheader.html"
php_value auto_append_file "/vfr/htdocs/jscode/reg_footer.html"
----End---

So then if you access a file like index.html or somename.html in that directory  the page would load with the menuheader.html and the reg_footer.html force on that page.   We use this to keep a constant look and feel on this site.

Since we upgrade to PHP Version 4.3.1 this does not work.
I've noted bugs reported for Apache 2.x but not 1.3x  could you please look at the code and see if you can find this bug.

The short fix is for us to rename every .html file to a .php file and it works, but renaming 1000s of files is a bit much.

Thanks
peter
PS: note I have reproduced this bug on FreeBSD 4.x also.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-19 15:42 UTC] sniper@php.net
If your apache is not set to parse .html through PHP, of course it won't work. Not bug.

 [2003-03-20 16:29 UTC] peter dot kling at veritas dot com
I guess you missed the Point, I indicated that this was working correctly, with Apache. Apache was parsing the html

But After upgrading from PHP 4.2.2 to PHP 4.3.1 this function no longer works.  So how could this be a configuration problem since we did not change the Apache or it's config.  ONLY the PHP Version.

Thanks
Peter
 [2003-04-03 21:50 UTC] shaun at directresponse dot com
I've noticed a similar issue. Here is setup:

Apache/1.3.26 (Unix) PHP/4.3.0 mod_ssl/2.8.10 OpenSSL/0.9.6e
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies with the ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge

We also parse .html files through php. Whenever we have an .htaccess file in a subdirectory and one in the directory above, php directives in the local .htaccess are ignored about 5-10% of the time.

For Example:

/.htaccess(1)
/subdir/.htacess(2)
/subdir/index.html

When loading index.html, the settings from .htaccess(2) will be ignored occassionaly and cause errors. It certainly could be related to Apache, but in our php scripts is where it is most apparent.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Aug 16 17:01:28 2024 UTC