Re: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread Sander Roobol

On Fri, Sep 20, 2002 at 12:55:26PM -0400, John Holmes wrote:
> Someone needs to update the manual page, then, and we would have never
> had this discussion. 
Done.

Sander

> 
> ---John Holmes...
> 
> > -Original Message-
> > From: Jason Vincent [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 20, 2002 12:43 PM
> > To: 'PHP Database List'
> > Subject: RE: [PHP-DB] Still can't turn magic_quotes off!
> > 
> > And so it ends...(here is what the PGP bug people had to say about
> it...)
> > 
> >  ID:   19526
> >  Updated by:   [EMAIL PROTECTED]
> >  Reported By:  [EMAIL PROTECTED]
> >  Status:   Bogus
> >  Bug Type: PHP options/info functions
> >  Operating System: Win2K
> >  PHP Version:  4.2.2
> >  New Comment:
> > 
> > Changing the value of magic_quotes_gpc is only effective if it's set
> > _before_ the script starts (e.g. via php.ini, httpd.conf or
> ..htaccess). In
> > the CVS version you should get a warning if you try to set it in a
> script
> > anyway.
> > 
> > 
> > 
> > -Original Message-----
> > From: John Holmes [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 20, 2002 10:56 AM
> > To: 'Paul Burney'; Vincent, Jason [BRAM:1334:EXCH]; 'PHP Database
> List'
> > Subject: RE: [PHP-DB] Still can't turn magic_quotes off!
> > 
> > 
> > > on 9/20/02 10:06 AM, John Holmes at [EMAIL PROTECTED]
> appended
> > the
> > > following bits to my mbox:
> > >
> > > > The manual says these settings can be changed at the user level,
> but
> > it
> > > > doesn't appear like they can, unless we're both doing something
> very
> > > > wrong.
> > >
> > > I believe that all variable processing is done (and slashes are
> added)
> > > before any of the page parsing is done.  That's why ini_set within
> the
> > > script won't work.
> > 
> > I understand that, and it makes sense that a command in a file
> wouldn't
> > affect the settings, but in the manual, it says magic_quotes_gpc is a
> user
> > level setting, meaning you can use ini_set to control it.
> > 
> > > If you are using apache, try a .htaccess file in the directory with:
> > >
> > > php_value magic_quotes_gpc 0
> > 
> > We're trying to get this to work on IIS or without an .htaccess file.
> The
> > OP
> > cannot change PHP.ini, either.
> > 
> > > Look through the comments at the page below for further information:
> > >
> > > http://www.php.net/manual/en/function.ini-set.php
> > 
> > Okay...what's the point of being able to set magic_quotes_gpc within a
> > script, but it will have _no_ effect. That's really stupid. They
> should
> > just
> > change the manual page to say PHP_INI_PERDIR...
> > 
> > ---John Holmes...
> 
> 
> 

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




RE: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread John Holmes

Someone needs to update the manual page, then, and we would have never
had this discussion. 

---John Holmes...

> -Original Message-
> From: Jason Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 12:43 PM
> To: 'PHP Database List'
> Subject: RE: [PHP-DB] Still can't turn magic_quotes off!
> 
> And so it ends...(here is what the PGP bug people had to say about
it...)
> 
>  ID:   19526
>  Updated by:   [EMAIL PROTECTED]
>  Reported By:  [EMAIL PROTECTED]
>  Status:   Bogus
>  Bug Type: PHP options/info functions
>  Operating System: Win2K
>  PHP Version:  4.2.2
>  New Comment:
> 
> Changing the value of magic_quotes_gpc is only effective if it's set
> _before_ the script starts (e.g. via php.ini, httpd.conf or
.htaccess). In
> the CVS version you should get a warning if you try to set it in a
script
> anyway.
> 
> 
> 
> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 10:56 AM
> To: 'Paul Burney'; Vincent, Jason [BRAM:1334:EXCH]; 'PHP Database
List'
> Subject: RE: [PHP-DB] Still can't turn magic_quotes off!
> 
> 
> > on 9/20/02 10:06 AM, John Holmes at [EMAIL PROTECTED]
appended
> the
> > following bits to my mbox:
> >
> > > The manual says these settings can be changed at the user level,
but
> it
> > > doesn't appear like they can, unless we're both doing something
very
> > > wrong.
> >
> > I believe that all variable processing is done (and slashes are
added)
> > before any of the page parsing is done.  That's why ini_set within
the
> > script won't work.
> 
> I understand that, and it makes sense that a command in a file
wouldn't
> affect the settings, but in the manual, it says magic_quotes_gpc is a
user
> level setting, meaning you can use ini_set to control it.
> 
> > If you are using apache, try a .htaccess file in the directory with:
> >
> > php_value magic_quotes_gpc 0
> 
> We're trying to get this to work on IIS or without an .htaccess file.
The
> OP
> cannot change PHP.ini, either.
> 
> > Look through the comments at the page below for further information:
> >
> > http://www.php.net/manual/en/function.ini-set.php
> 
> Okay...what's the point of being able to set magic_quotes_gpc within a
> script, but it will have _no_ effect. That's really stupid. They
should
> just
> change the manual page to say PHP_INI_PERDIR...
> 
> ---John Holmes...



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




RE: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread Jason Vincent

And so it ends...(here is what the PGP bug people had to say about it...)

 ID:   19526
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Win2K
 PHP Version:  4.2.2
 New Comment:

Changing the value of magic_quotes_gpc is only effective if it's set
_before_ the script starts (e.g. via php.ini, httpd.conf or .htaccess). In
the CVS version you should get a warning if you try to set it in a script
anyway.



-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 20, 2002 10:56 AM
To: 'Paul Burney'; Vincent, Jason [BRAM:1334:EXCH]; 'PHP Database List'
Subject: RE: [PHP-DB] Still can't turn magic_quotes off!


> on 9/20/02 10:06 AM, John Holmes at [EMAIL PROTECTED] appended
the
> following bits to my mbox:
> 
> > The manual says these settings can be changed at the user level, but
it
> > doesn't appear like they can, unless we're both doing something very 
> > wrong.
> 
> I believe that all variable processing is done (and slashes are added) 
> before any of the page parsing is done.  That's why ini_set within the 
> script won't work.

I understand that, and it makes sense that a command in a file wouldn't
affect the settings, but in the manual, it says magic_quotes_gpc is a user
level setting, meaning you can use ini_set to control it. 

> If you are using apache, try a .htaccess file in the directory with:
> 
> php_value magic_quotes_gpc 0

We're trying to get this to work on IIS or without an .htaccess file. The OP
cannot change PHP.ini, either. 

> Look through the comments at the page below for further information:
> 
> http://www.php.net/manual/en/function.ini-set.php

Okay...what's the point of being able to set magic_quotes_gpc within a
script, but it will have _no_ effect. That's really stupid. They should just
change the manual page to say PHP_INI_PERDIR...

---John Holmes...




RE: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread John Holmes

> on 9/20/02 10:06 AM, John Holmes at [EMAIL PROTECTED] appended
the
> following bits to my mbox:
> 
> > The manual says these settings can be changed at the user level, but
it
> > doesn't appear like they can, unless we're both doing something very
> > wrong.
> 
> I believe that all variable processing is done (and slashes are added)
> before any of the page parsing is done.  That's why ini_set within the
> script won't work.

I understand that, and it makes sense that a command in a file wouldn't
affect the settings, but in the manual, it says magic_quotes_gpc is a
user level setting, meaning you can use ini_set to control it. 

> If you are using apache, try a .htaccess file in the directory with:
> 
> php_value magic_quotes_gpc 0

We're trying to get this to work on IIS or without an .htaccess file.
The OP cannot change PHP.ini, either. 

> Look through the comments at the page below for further information:
> 
> http://www.php.net/manual/en/function.ini-set.php

Okay...what's the point of being able to set magic_quotes_gpc within a
script, but it will have _no_ effect. That's really stupid. They should
just change the manual page to say PHP_INI_PERDIR...

---John Holmes...


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




Re: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread Paul Burney

on 9/20/02 10:06 AM, John Holmes at [EMAIL PROTECTED] appended the
following bits to my mbox:

> The manual says these settings can be changed at the user level, but it
> doesn't appear like they can, unless we're both doing something very
> wrong.

I believe that all variable processing is done (and slashes are added)
before any of the page parsing is done.  That's why ini_set within the
script won't work.

If you are using apache, try a .htaccess file in the directory with:

php_value magic_quotes_gpc 0

Look through the comments at the page below for further information:



HTH.

Sincerely,

Paul Burney






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




RE: [PHP-DB] Still can't turn magic_quotes off!

2002-09-20 Thread John Holmes

I don't know what to say, I couldn't get it to work either. I tried
ini_set('magic_quotes_gpc','Off') and tried moving it to the very first
line of the file, and even tried _GET and _POST instead of importing the
variables. Nothing I tried worked. 

I wonder if it's a windows, thing...let me try this on a linux
server...nope, same thing.

The manual says these settings can be changed at the user level, but it
doesn't appear like they can, unless we're both doing something very
wrong.

---John Holmes...

> -Original Message-
> From: Jason Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 9:31 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Still can't turn magic_quotes off!
> 
> I really wanted this "ini_set()" thing to work, but it still does not.
> Thankyou for your help though John.   If you are curious to see what I
am
> seeing try this out on a windows server where magic_quotes is on...
> 
>  
> // import variables into 'p_' space
> import_request_variables('gp', 'p_');
> 
> ini_set("magic_quotes_gpc","0");
> //ini_set("magic_quotes_sybase","1");
> 
> $var = get_magic_quotes_gpc();
> 
> print "Magic Quotes = ". $var . "";
> 
> if(!isset($p_name)||$p_name==''){$p_name="O'Conner";}
> 
> ?>
> 
> 
> 
> 
> 
> 
> 
> Keep hitting submit
> 
> 
> 
> 
> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 7:46 PM
> To: Vincent, Jason [BRAM:1334:EXCH]
> Subject: RE: [PHP-DB] magic_quotes_gpc?
> 
> 
> ini_set("magic_quotes_gpc","0")
> 
> same for magic_quotes_sybase, which is what you really want, I think.
> 
> You'll probably need it on both the form page and the processing page.
If
> you have a config file that's included on every page, that'd be a good
> place
> for it.
> 
> ---John Holmes...
> 
> -Original Message-
> From: Jason Vincent [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 3:12 PM
> To: 1LT John W. Holmes
> Subject: RE: [PHP-DB] magic_quotes_gpc?
> 
> AHHH.  Now your're talking.  It is an IIS server, and Access database
(yes
> -
> escapes a quote with another quote).  Attempting to set the
magic_quotes
> to
> zero has had no effect - even if I check for it using
> get_magic_quotes_gpc()
> and the value is in fact 0, the PHP engine still adds those dang
slashes
> to
> everything anyway!
> How do I use ini_set() ?  Like this? ...   ini_set(php_value
> magic_quotes_gpc 0);
> like this?  ini_set("php_value magic_quotes_gpc 0");
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]
>  ]
> Sent: Thursday, September 19, 2002 3:11 PM
> To: Vincent, Jason [BRAM:1334:EXCH]; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] magic_quotes_gpc?
> 
> > New PHP (long time PERL user) here.  I am using an Access database -
> > yeah I know Access is crap, but I have no choice.  Anyway, it seems
> > that this magic backslash thing is unavoidable.  As I understand it,
I
> > can shut it off at the .ini level, but I am running this app on a
> > hosted server
> with
> > other apps - I haven't the choice to make that change.  The question
> > is this...
> >
> > Can I override the magic_quotes_gpc setting at the script level?
> > (i.e. on the fly, for this script only?)  If not, I am guessing I
need
> > to remove
> the
> > single quotes on the client side (javascript) prior to submitting
the
> data?
> > (any other ideas on how to handle this without changing the .ini?)
> You can use ini_set() in all of your scripts (or include file), or
> .htaccess
> depending on your server.
> php_value magic_quotes_gpc 0
> Does Access escape it's quotes with an additional ' instead of an \ ?
If
> so,
> then you should look at magic_quotes_sybase. Turning it on will escape
> strings with a ' instead of an \. It also can be set in .htaccess or
> ini_set().
> ---John Holmes...


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