Re: [PHP] auto_prepend_file in Apache Directory container

2005-05-13 Thread John Nichel
Richard Lynch wrote:
On Thu, May 12, 2005 12:48 pm, dan said:
I'm trying to override the value of php.ini's 'auto_prepend_file'
function, inside of an Apache Directory container.  I'm not having much
luck.  In fact, no luck at all.  This never happens.
So I'm wondering now, are functions set by 'php_value' inside of an
Apache config file only good for the entire VirtualHost in question, or
can they be applied on a per-directory basis using Apache's Directory
directive?

Certainly some php_value directives can be over-ridden in .htaccess,
regardless of whether they were set globally in httpd.conf or in a
VirtualHost or Directory block.
Equally certainly, some cannot be over-ridden.
I am almost 100% certain that php_value makes no distinction between
*where* in httpd.conf the setting comes from.  I daresay php_value in
.htaccess can't even tell the difference from one part of httpd.conf to
the other.
http://php.net/ has a page devoted to describing exactly which php_value
settings can be over-ridden where.  Check that.
It's also possible that once auto_prepend_file is set, it's set, and
that's it -- Regardless of where it is set, you're stuck with it at that
value.
snip
It's also possible that the webserver itself is not configured to allow 
.htaccess files to overwrite values.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto_prepend_file in Apache Directory container

2005-05-13 Thread dan
Richard Lynch wrote:
On Thu, May 12, 2005 12:48 pm, dan said:
I'm trying to override the value of php.ini's 'auto_prepend_file'
function, inside of an Apache Directory container.  I'm not having much
luck.  In fact, no luck at all.  This never happens.
So I'm wondering now, are functions set by 'php_value' inside of an
Apache config file only good for the entire VirtualHost in question, or
can they be applied on a per-directory basis using Apache's Directory
directive?

Certainly some php_value directives can be over-ridden in .htaccess,
regardless of whether they were set globally in httpd.conf or in a
VirtualHost or Directory block.
Equally certainly, some cannot be over-ridden.
I am almost 100% certain that php_value makes no distinction between
*where* in httpd.conf the setting comes from.  I daresay php_value in
.htaccess can't even tell the difference from one part of httpd.conf to
the other.
http://php.net/ has a page devoted to describing exactly which php_value
settings can be over-ridden where.  Check that.
It's also possible that once auto_prepend_file is set, it's set, and
that's it -- Regardless of where it is set, you're stuck with it at that
value.
So it's more of a 'define' for a constant that some kind of variable you
can change on a whim.  Part of that could easily be to provide web host
administrators with a way to guarantee that some PHP code of theirs gets
run no matter what their clients may try to do...  Which I could see might
be handy for some hosts, and they'd not want it over-ridden.  These last
two paragraphs are pure speculation on my part.  But it could be true, and
it wouldn't really fit into that nifty chart in the manual.
Richard -
Yes, I agree with you.  I think it's an all-on or all-off sort of 
thing, and you cannot be terribly specific with it's usage.  THe only 
way I've found to combat this issue is to make a different virtualhost 
or some such, which is what I'm ging to end up doing.

I did take a look at php.net's page devoted to describing exactly which 
php_value settings can be over-ridden, and it does claim that this 
option can be set in a per-directory context.

Thanks for your time
-dant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] auto_prepend_file in Apache Directory container

2005-05-12 Thread dan
Hello, all -
I'm trying to override the value of php.ini's 'auto_prepend_file' 
function, inside of an Apache Directory container.  I'm not having much 
luck.  In fact, no luck at all.  This never happens.

So I'm wondering now, are functions set by 'php_value' inside of an 
Apache config file only good for the entire VirtualHost in question, or 
can they be applied on a per-directory basis using Apache's Directory 
directive?  Or am I justflat-out doing something wrong? I have something 
similar to this:

VirtualHost 1.2.3.4
...apache config...
php_value auto_prepend_file \
 /var/www/virtual/pornpromoter.net/dev1/auto_prepend_file_02.php
...more apache config...
/VirtualHost
Threw in the '\' there for the sake of some mail clients that would wrap 
the line.  The '\' is not present in the configuration file.

I've been doing some research and have come up dry.  I was hoping 
someone would be kind enough to provide some answers here.

Thanks!
-dant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto_prepend_file in Apache Directory container

2005-05-12 Thread dan
dan wrote:
Hello, all -
I'm trying to override the value of php.ini's 'auto_prepend_file' 
function, inside of an Apache Directory container.  I'm not having much 
luck.  In fact, no luck at all.  This never happens.

So I'm wondering now, are functions set by 'php_value' inside of an 
Apache config file only good for the entire VirtualHost in question, or 
can they be applied on a per-directory basis using Apache's Directory 
directive?  Or am I justflat-out doing something wrong? I have something 
similar to this:

VirtualHost 1.2.3.4
...apache config...
php_value auto_prepend_file \
 /var/www/virtual/pornpromoter.net/dev1/auto_prepend_file_02.php
...more apache config...
/VirtualHost
Threw in the '\' there for the sake of some mail clients that would wrap 
the line.  The '\' is not present in the configuration file.

I've been doing some research and have come up dry.  I was hoping 
someone would be kind enough to provide some answers here.

Thanks!
-dant
Hello -
Doing some more research, even on the following page:
http://us3.php.net/manual/en/ini.php#ini.list
...shows that php_prepend_file should still work inside an Apache 
directory container (as indicated by changeable PHP_INI_PERDIR), but 
it is not.

Has anyone had this kind of problem before?
Thanks!
-dant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto_prepend_file in Apache Directory container

2005-05-12 Thread Chris
dan wrote:
dan wrote:
Hello, all -
I'm trying to override the value of php.ini's 'auto_prepend_file' 
function, inside of an Apache Directory container.  I'm not having 
much luck.  In fact, no luck at all.  This never happens.

So I'm wondering now, are functions set by 'php_value' inside of an 
Apache config file only good for the entire VirtualHost in question, 
or can they be applied on a per-directory basis using Apache's 
Directory directive?  Or am I justflat-out doing something wrong? I 
have something similar to this:

VirtualHost 1.2.3.4
...apache config...
php_value auto_prepend_file \
 /var/www/virtual/pornpromoter.net/dev1/auto_prepend_file_02.php
...more apache config...
/VirtualHost
Threw in the '\' there for the sake of some mail clients that would 
wrap the line.  The '\' is not present in the configuration file.

I've been doing some research and have come up dry.  I was hoping 
someone would be kind enough to provide some answers here.

Thanks!
-dant
Hello -
Doing some more research, even on the following page:
http://us3.php.net/manual/en/ini.php#ini.list
...shows that php_prepend_file should still work inside an Apache 
directory container (as indicated by changeable PHP_INI_PERDIR), but 
it is not.

Has anyone had this kind of problem before?
Thanks!
-dant
I don't know what to tell you, it works for me.. Could you be overriding 
it somewhere? Are you sure that portion of the config file is being 
applied correctly? It seems much more likely to me that Apache, for some 
reason,.isn't reading the directive.or is reading another after it that 
is overwriting it.

Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto_prepend_file in Apache Directory container

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 12:48 pm, dan said:
 I'm trying to override the value of php.ini's 'auto_prepend_file'
 function, inside of an Apache Directory container.  I'm not having much
 luck.  In fact, no luck at all.  This never happens.

 So I'm wondering now, are functions set by 'php_value' inside of an
 Apache config file only good for the entire VirtualHost in question, or
 can they be applied on a per-directory basis using Apache's Directory
 directive?

Certainly some php_value directives can be over-ridden in .htaccess,
regardless of whether they were set globally in httpd.conf or in a
VirtualHost or Directory block.

Equally certainly, some cannot be over-ridden.

I am almost 100% certain that php_value makes no distinction between
*where* in httpd.conf the setting comes from.  I daresay php_value in
.htaccess can't even tell the difference from one part of httpd.conf to
the other.

http://php.net/ has a page devoted to describing exactly which php_value
settings can be over-ridden where.  Check that.

It's also possible that once auto_prepend_file is set, it's set, and
that's it -- Regardless of where it is set, you're stuck with it at that
value.

So it's more of a 'define' for a constant that some kind of variable you
can change on a whim.  Part of that could easily be to provide web host
administrators with a way to guarantee that some PHP code of theirs gets
run no matter what their clients may try to do...  Which I could see might
be handy for some hosts, and they'd not want it over-ridden.  These last
two paragraphs are pure speculation on my part.  But it could be true, and
it wouldn't really fit into that nifty chart in the manual.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] auto_prepend_file

2003-08-23 Thread Peter James
Check out php_admin_value, highlighted in the link below

http://216.239.33.104/search?q=cache:mpDXuwrDs_gJ:www.php.net/configuration.changes+php_admin_value+site:www.php.nethl=enie=UTF-8

--
Peter James
Editor-in-Chief, php|architect Magazine
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


- Original Message - 
From: Dennis Gearon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 22, 2003 8:39 PM
Subject: [PHP] auto_prepend_file


 Is there any settings that will silently disable the ability  for a
 .htaccess file to use the

 php_value auto_prepend_value some file name

 directive? Some safe mode thing, or an ini setting or something?

 The people at the host I'm at just CAN'T seem to get it working on my
 site. It's an ensim site.

 I have errors turned on, and it doesn't even give an error. It's like
 the line doesn't exist.

 If I had a browning light with some sabotted tungsten carbide slugs, I'd
 fix the G*^(*^N server,

 after three days of messing with this. :-)



 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] auto_prepend_file

2003-08-22 Thread Dennis Gearon
Is there any settings that will silently disable the ability  for a  
.htaccess file to use the

   php_value auto_prepend_value some file name

directive? Some safe mode thing, or an ini setting or something?

The people at the host I'm at just CAN'T seem to get it working on my 
site. It's an ensim site.

I have errors turned on, and it doesn't even give an error. It's like 
the line doesn't exist.

If I had a browning light with some sabotted tungsten carbide slugs, I'd 
fix the G*^(*^N server,

after three days of messing with this. :-)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] auto_prepend_file

2003-03-26 Thread Kevin Heflin
Trying to use
php_value auto_prepend_file /path/to/file/checkauth.php
in an .htaccess file.
I've used this before without problems, however with this instance, I 
keep getting a message in my browser which says:
Redirection limit for this URL exceeded.  Unable to load the requested 
page.

my checkauth.php page looks like this

?
session_start();
if (!session_is_registered(SESSION)){
header(Location: /error.php?e=2);
exit;
}
?
Any suggestions would be appreciated.

Kevin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto_prepend_file

2003-03-26 Thread Kevin Heflin
On Wednesday, March 26, 2003, at 07:15  PM, Kevin Heflin wrote:

Trying to use
php_value auto_prepend_file /path/to/file/checkauth.php
in an .htaccess file.
I've used this before without problems, however with this instance, I 
keep getting a message in my browser which says:
Redirection limit for this URL exceeded.  Unable to load the requested 
page.

Sorry to answer my own question here.. but it looks like I had a little 
loop going on. :-)
that's what caused the problem. Should have looked in the mailing list 
archive before I posted.
Apologies.

Kevin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] auto_prepend_file

2003-03-26 Thread Jennifer Goodie
You're looping endlessly because SESSION is not getting registered anywhere.

-Original Message-
From: Kevin Heflin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 5:16 PM
To: php-general
Subject: [PHP] auto_prepend_file


Trying to use
php_value auto_prepend_file /path/to/file/checkauth.php
in an .htaccess file.

I've used this before without problems, however with this instance, I 
keep getting a message in my browser which says:
Redirection limit for this URL exceeded.  Unable to load the requested 
page.

my checkauth.php page looks like this

?
session_start();
if (!session_is_registered(SESSION)){
header(Location: /error.php?e=2);
exit;
}
?

Any suggestions would be appreciated.

Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] auto_prepend_file

2003-03-26 Thread John W. Holmes
 Trying to use
 php_value auto_prepend_file /path/to/file/checkauth.php
 in an .htaccess file.
 
 I've used this before without problems, however with this instance, I
 keep getting a message in my browser which says:
 Redirection limit for this URL exceeded.  Unable to load the requested
 page.
 
 my checkauth.php page looks like this
 
 ?
   session_start();
   if (!session_is_registered(SESSION)){
   header(Location: /error.php?e=2);
   exit;
   }
 ?
 
 Any suggestions would be appreciated.

error.php is probably being prepended with this file, which will fail
your check and try to redirect to error.php, which will fail your check
and try to redirect to error.php, which will fail your check and try to
redirect to error.php, which will fail your check and try to redirect to
error.php, which will fail your check and try to redirect to error.php,
which will fail your check and try to redirect to error.php, which will
fail your check and try to redirect to error.php, which will fail your
check and try to redirect to error.php, which will fail your check and
try to redirect to error.php, which will fail your check and try to
redirect to error.php, which will fail your check and try to redirect to
error.php, which will fail your check and try to redirect to error.php,
which will fail your check and try to redirect to error.php, which will
fail your check and try to redirect to error.php, which will fail your
check and try to redirect to error.php and you'll eventually hit a
limit where your web server or browser will stop. :)

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Auto_Prepend_File for non-PHP files?

2002-11-14 Thread Sara Keesler
Hi,

I couldn't find this in the documentation, or in the archives of the mailing list, so 
I apologize if it's been answered many times before :)

I'm trying to use auto_prepend_file to prepend a php file to every file in a folder, 
not just .php files.  

I have:
Files ~ .*
  php_value auto_prepend_file /path/to/php_file.php
/Files
in my Apache httpd.conf.

What am I doing wrong?

Sara Keesler


Re: [PHP] Auto_Prepend_File for non-PHP files?

2002-11-14 Thread Marco Tabini
The problem is that non-php files are not (normally) parsed through the
PHP interpreter, and therefore the clause you're specifying has no
effect.

There are two solutions (at least that come to mind now):

1) Change your Apache configuration so that all files are parsed through
PHP (inefficient and potentially dangerous)

2) You can use server-side includes (but you still have to modify your
files)

Otherwise, take a look at the Apache manual:

How can I attach a footer to my documents without using SSI?

You can make arbitrary changes to static documents by configuring an
Action which launches a CGI script. The CGI is then responsible for
setting a content-type and delivering the requested document (the
location of which is passed in the PATH_TRANSLATED environment
variable), along with whatever footer is needed.

Busy sites may not want to run a CGI script on every request, and should
consider using an Apache module to add the footer. There are several
third party modules available through the Apache Module Registry which
will add footers to documents. These include mod_trailer, PHP
(php3_auto_append_file), mod_layout, and mod_perl (Apache::Sandwich).


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at http://www.phparch.com!

---BeginMessage---
Hi,

I couldn't find this in the documentation, or in the archives of the mailing list, so 
I apologize if it's been answered many times before :)

I'm trying to use auto_prepend_file to prepend a php file to every file in a folder, 
not just .php files.  

I have:
Files ~ .*
  php_value auto_prepend_file /path/to/php_file.php
/Files
in my Apache httpd.conf.

What am I doing wrong?

Sara Keesler
---End Message---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Auto_prepend_file

2002-02-28 Thread Richard Baskett

What I want to do is have a function available to all my php files without
having to use an include in every page.  So what I did was put this line in
my .htaccess file:

php auto_prepend_file pathtoscript/uniemail.php

It didn¹t work, I also tried php_auto with the underscore in the above.. And
that didn¹t work either.  I have modified my httpd.conf file so that it will
process .htaccess files..

Any ideas?

Rick

I haven't failed, I've found 10,000 ways that don't work. - Ben Franklin


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] auto_prepend_file

2001-08-13 Thread lolodev

recetly i ask about running automatically a page after each request page.

response is auto_prepend_file, auto_append_file,

but how can i prepend file is the same for all php.ini

but how can i do this with my provider , and how can i have a
auto_prepend_file different to another web site?

(my english is no correct !)






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] auto_prepend_file

2001-08-13 Thread David Robley

On Tue, 14 Aug 2001 05:05, lolodev wrote:
 recetly i ask about running automatically a page after each request
 page.

 response is auto_prepend_file, auto_append_file,

 but how can i prepend file is the same for all php.ini

 but how can i do this with my provider , and how can i have a
 auto_prepend_file different to another web site?

 (my english is no correct !)

If you don't have access to php.ini or httpd.conf, you can use, in 
.htaccess file the entry

php_value auto_prepend_file filename

or, to have no auto_prepend

php_value auto_prepend_file none


-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Self-made man: A horrible example of unskilled labor.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] auto_prepend_file

2001-07-21 Thread rip


I'm trying to get auto_prepend to work on Mandrake 8.0, apache is
configured with mod_php4 and mod_vhosts. Where do I add the command for
prepending?
I've tried in the vhosts.conf and http.conf, could be my syntax..
I've tried the following in both .confs:
auto_prepend_file /usr/local/htdocs/oi2kplus1/phplib/prepend.php
auto_prepend_file=.:/usr/local/htdocs/oi2kplus1/phplib/prepend.php
auto_prepend_file .:/usr/local/htdocs/oi2kplus1/phplib/prepend.php
auto_prepend_file=.:/usr/local/htdocs/oi2kplus1/phplib/prepend.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] auto_prepend_file

2001-07-21 Thread Rasmus Lerdorf

Please read http://www.php.net/manual/en/configuration.php

You need to use:

php_value auto_prepend_file /usr/local/htdocs/oi2kplus1/phplib/prepend.php

-Rasmus

 I'm trying to get auto_prepend to work on Mandrake 8.0, apache is
 configured with mod_php4 and mod_vhosts. Where do I add the command for
 prepending?
 I've tried in the vhosts.conf and http.conf, could be my syntax..
 I've tried the following in both .confs:
 auto_prepend_file /usr/local/htdocs/oi2kplus1/phplib/prepend.php
 auto_prepend_file=.:/usr/local/htdocs/oi2kplus1/phplib/prepend.php
 auto_prepend_file .:/usr/local/htdocs/oi2kplus1/phplib/prepend.php
 auto_prepend_file=.:/usr/local/htdocs/oi2kplus1/phplib/prepend.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]