php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #25207 multiple auto_prepend_file, auto_append_file
Submitted: 2003-08-22 05:29 UTC Modified: 2010-11-18 23:35 UTC
Votes:9
Avg. Score:4.0 ± 1.2
Reproduced:8 of 8 (100.0%)
Same Version:3 (37.5%)
Same OS:3 (37.5%)
From: zeug at delirium dot ch Assigned:
Status: Wont fix Package: PHP options/info functions
PHP Version: Irrelevant OS: Irrelevant
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: zeug at delirium dot ch
New email:
PHP Version: OS:

 

 [2003-08-22 05:29 UTC] zeug at delirium dot ch
Description:
------------
Hi Devs

I'm referring to bug #3293.

Yes, allowing multiple auto_prepend_file/auto_append/file does make sense. Picture this:

You have your global configs in a file that's auto prepended. And you want to use a package using auto_prepend_file as well (like my db_auth, see https://www.bitcetera.com/en/project/pear/). You can't include() dbauth to your global config as you don't want to protect all pages. And you don't want to include() your global config in dbauth as this means you have to alter the code of dbauth and trouble arises when new dbauth versions are released.

I suggest allowing the following:
auto_prepend_file /path/to/inc1.php:/path/to/inc2.php

Allowing several auto_prepend_file directires is not a good idea as things would get very messy when using it with .htaccess.

Love PHP!   -sven


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-11 19:45 UTC] csaba at alum dot mit dot edu
I would also find this quite useful as I have some files that I would like to selectively include depending on which virtual host is being accessed.

However, I would suggest a semicolon separated list of entries as with the ini setting: include_path

Allowing this directive multiple times is not desirable because then it is not overrideable.  For example, if your php.ini has a standard set of libraries (.php files) that you use locally, it might make sense to override these in the web server's configuration files (e.g. httpd.conf)

Csaba Gabor from Vienna
 [2010-11-18 23:35 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: PHP options/info functions
 [2010-11-18 23:35 UTC] jani@php.net
You can still selectively include in that one prepend/append file. And you do have access to what host is in question.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Aug 23 11:01:26 2019 UTC