[PHP] Register Globals Off in .htacces

2002-10-25 Thread Tjoumaidis
Hi to Everyone,
I just want to know if there is a way that i can have register_globals 
On in my php.ini file but for some application i can turn that Off 
perhaps with a .htacces file.

Thx for any help.


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



RE: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Jon Haworth
Hi,

 I just want to know if there is a way that i 
 can have register_globals On in my php.ini file 
 but for some application i can turn that Off 
 perhaps with a .htacces file.

In your .htaccess:

  php_flag register_globals on

or

  php_flag register_globals off

Manual pages at 
http://www.php.net/manual/en/configuration.changes.php

Cheers
Jon


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




Re: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Tjoumaidis
Thx for your reply It is working.

I also found from php.net that it's possible to set register_globals to 
off on a site-by-site basis via Apache, thus overriding the global 
setting of register_globals in php.ini:

In httpd.conf:

VirtualHost 127.0.0.1
ServerName localhost
DocumentRoot /var/www/html/mysite
php_value register_globals 0 (or 1 for on)
/VirtualHost

That way, sites with old code can have register globals turned on, but 
for all new developments it will be disabled.

Jon Haworth wrote:
Hi,



I just want to know if there is a way that i 
can have register_globals On in my php.ini file 
but for some application i can turn that Off 
perhaps with a .htacces file.


In your .htaccess:

  php_flag register_globals on

or

  php_flag register_globals off

Manual pages at 
http://www.php.net/manual/en/configuration.changes.php

Cheers
Jon




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




RE: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Jon Haworth
Hi,

 Thx for your reply It is working.

No probs, glad to help.

 I also found from php.net that it's possible 
 to set register_globals to off on a site-by-
 site basis via Apache, thus overriding the global 
 setting of register_globals in php.ini:
 
 VirtualHost 127.0.0.1
 ServerName localhost
 DocumentRoot /var/www/html/mysite
 php_value register_globals 0 (or 1 for on)
 /VirtualHost

Yup, or even in directories:

Directory /var/www/html/mysite/foo
  php_value register_globals 0
/Directory

Which might be handy if you're updating scripts on a live site.

Cheers
Jon

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




Re: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Alister
On Fri, 25 Oct 2002 13:16:27 +0300
Tjoumaidis [EMAIL PROTECTED] wrote:

 Hi to Everyone,
 I just want to know if there is a way that i can have register_globals 
 On in my php.ini file but for some application i can turn that Off 
 perhaps with a .htacces file.

I prefer it Off in php.ini and On in the .htaccess file. 

php_flag register_globals On

Yes, you can do it.

Alister

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




Re: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Frank W.
it works only if i put it in my httpd.conf - yes allowoveride is set to
all :/

i'm using apache 1.3.27 on win2k.

Jon Haworth wrote:

 Hi,


 Thx for your reply It is working.


 No probs, glad to help.


 I also found from php.net that it's possible
 to set register_globals to off on a site-by-
 site basis via Apache, thus overriding the global
 setting of register_globals in php.ini:
 
 
 ServerName localhost
 DocumentRoot /var/www/html/mysite
 php_value register_globals 0 (or 1 for on)
 


 Yup, or even in directories:


   php_value register_globals 0


 Which might be handy if you're updating scripts on a live site.

 Cheers
 Jon





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




RE: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Jon Haworth
Hi Frank,

  ServerName localhost
  DocumentRoot /var/www/html/mysite
  php_value register_globals 0 (or 1 for on)
 
 it works only if i put it in my httpd.conf - yes 
 allowoveride is set to all :/
 
 i'm using apache 1.3.27 on win2k.

Well, you're doing *something* wrong, 'cos it works fine here :-)

You have got an AccessFileName .htaccess directive, right?

You might like to try asking in
news:comp.infosystems.www.servers.ms-windows, or hanging around here until
an Apache guru turns up...

Cheers
Jon


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




Re: [PHP] Register Globals Off in .htacces

2002-10-25 Thread Frank W.
well, i found my mistake ;)

on windows i forgot to change the name of the .htaccess-files because on 
win they couldnt have a extentsion without a name.

So i've named them now only htaccess without the dot and it works fine

Frank W. wrote:

it works only if i put it in my httpd.conf - yes allowoveride is set to
all :/

i'm using apache 1.3.27 on win2k.

Jon Haworth wrote:

  Hi,
 
 
  Thx for your reply It is working.
 
 
  No probs, glad to help.
 
 
  I also found from php.net that it's possible
  to set register_globals to off on a site-by-
  site basis via Apache, thus overriding the global
  setting of register_globals in php.ini:
  
  
  ServerName localhost
  DocumentRoot /var/www/html/mysite
  php_value register_globals 0 (or 1 for on)
  
 
 
  Yup, or even in directories:
 
 
php_value register_globals 0
 
 
  Which might be handy if you're updating scripts on a live site.
 
  Cheers
  Jon
 








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