[PHP] Re: php.ini setting

2011-10-02 Thread Stephen

On 11-10-02 12:12 PM, Jim Giner wrote:

Spoke to quickly - still having issues.  While the .ini file in each of my
appl. folders has magic quotes set to Off, my scripts are still escaping my
input - obviously following the server's .ini file settings.  Waiting for my
hosters to get back to me.

You could refer them to:

http://php.net/manual/en/security.magicquotes.php

Indicate that magic quotes have deprecated, and ask them to turn them off.

But they will say "no", because of all the other users on the server 
that you use.


In the end, you will be left with stripping the slashes on your own:


 $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
?>

I know it is not the answer you are looking for, but it does work, and 
used by thousands of coders.


Stephen


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



Re: [PHP] php.ini setting

2011-10-02 Thread Jim Giner
Spoke to quickly - still having issues.  While the .ini file in each of my 
appl. folders has magic quotes set to Off, my scripts are still escaping my 
input - obviously following the server's .ini file settings.  Waiting for my 
hosters to get back to me. 



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



[PHP] EBNF-Grammar of PHP

2011-10-02 Thread Anonym
Hi

i´m looking for an EBNF-Grammar of PHP. is there an official (or
complete) grammar available?

thanks for your help

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



Re: [PHP] php.ini setting

2011-10-02 Thread Ashley Sheridan
On Sat, 2011-10-01 at 14:01 -0400, Mike Mackintosh wrote:

> On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote:
> 
> > On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote:
> > 
> >> On 11-10-01 11:57 AM, Jim Giner wrote:
> >>> I'm trying to set magic quotes Off as my reading tells me that it's not 
> >>> good
> >>> to have it defaulted to On.
> >>> 
> >>> 
> >> http://php.net/manual/en/security.magicquotes.disabling.php
> >> 
> >> Stephen
> >> 
> > 
> > 
> > Stephen, that page specifies the exact same line for the .htaccess that
> > he said he used. I'm not sure why it would cause an internal server
> > error, but I've seen some Apache configurations completely flake over
> > lines in the .htaccess that were fine elsewhere.
> > 
> > The only thing I can find online where this line will cause a server
> > error is where the server is set up to allow custom php.ini files which
> > override the defaults. To test this, try adding a php.ini file into the
> > directory your script is (this is completely untested, I just saw it on
> > a forum (http://www.bluehostforum.com/archive/index.php/t-15975.html ))
> > and enter the regular php.ini line to turn it off.
> > 
> > If that fails, I'd try and contact your hosting provider and see what
> > they say, as they probably have more information specific to this
> > problem, as it's most likely a setting of theirs that is causing it.
> > 
> > -- 
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> > 
> > 
> 
> 
> Have you tried:
> 
> ini_set('magic_quotes_gpc', false);


That won't work, because by the time the server comes to process the
script, the data has already been processed. In effect, that line will
do nothing.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk