-- Ryan Brooks <[EMAIL PROTECTED]> wrote
(on Monday, 31 March 2008, 10:15 PM -0500):
> Not that I want to contradict Matthew, but last I checked
> magic_quotes_gpc can't be set at runtime.
You're right. It used to be, but hasn't been in the 5.x series -- it's
now PHP_INI_PERDIR.
> Try setting it in your php.ini, or alter your .htaccess file with:
> php_value magic_quotes_gpc off
Verified.
> On Mon, 31 Mar 2008 22:15:52 -0400, Matthew Weier O'Phinney <[EMAIL
> PROTECTED]> wrote:
> > -- dowker <[EMAIL PROTECTED]> wrote
> > (on Monday, 31 March 2008, 02:32 PM -0700):
> >> I have the following code in IndexController.php. If I submit the form
> > with
> >> the value "Help's Needed!" (without the double quotes) in "Field 1", the
> >> form will fail validation (because "Field 2" is empty), and will
> > repopulate
> >> "Field 1" with "Help\'s Needed!" (without the double quotes). Aren't the
> >> slashes stripped by Zend_Form? If not, What's the best way to filter
> > them
> >> out? Thanks.
> >
> > Best way? Turn off magic_quotes_gpc.
> >
> > Zend_Form isn't adding them; PHP is, because that setting is on. Turn it
> > off early in your bootstrap:
> >
> > ini_set('magic_quotes_gpc', false);
> >
> > (Most default configurations have this off currently, for this very
> > reason.)
--
Matthew Weier O'Phinney
PHP Developer | [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/