httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen van Meeuwen" <>
Subject RE: [users@httpd] Custom authorization of static content
Date Tue, 24 Aug 2004 19:32:07 GMT

> > You're so right... In my example, I used a virtual 
> > directory outside 
> > the documentroot. However, you're setup works on PHP5.
> I'm not sure what you mean by "virtual directory" in this 
> context. Do you mean that PHP5 wouldn't decline this request?

A virtual directory as I mean it, could be defined as a directory available
online but outside the webroot. (Typically you'ld define a virtual directory
with the directive 'Alias' or 'ScriptAlias')
> > As far as I know, only PHP5.0.0 and further on have those php_value 
> > configuration directives.
> The php_value directive has been support for as far as I can 
> remember. I don't know specifically for "prepend_file", but 
> the docs gives no indication it would require PHP 5+, and the 
> fact that it did work in my setup (when requesting a PHP 
> file) indicates that they are available in 4.x as well.

While reading, you seem to be
correct. Those directives have been available from php3, at least.

> > My suggestion would include an upgrade to PHP5 to solve this issue.
> I had hoped to not have that requirement for the solution, 
> but I will try on my home box (none suitable for testing 
> around here...). At least I might be able to understand what 
> causes the difference.

As on my test-server (php5), the "auto_prepend_file" is parsed at all times,
while on my webserver (php4), the "auto_prepend_file" is parsed only when
requesting a PHP file.

I tested your configuration settings on my php5 home box, and it appears to
be working, with the exact settings you defined.

Just to ensure:

- Made a VirtualHost with a DocumentRoot /webroot/
- Set the directory /webroot/.htaccess, containing the "php_value
auto_prepend_file /webroot/test-auth.php" setting
- Trying to reach a document from within the webroot and from within a
virtual directory

Then, I tried to run this on my webserver. It doesn't parse the
auto_prepend_file AT ALL. (This amazes me...).

Kind regards,


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message