Re: problem with quotes (single and double) in forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, August 9, 2006 9:07 am, afan@xxxxxxxx wrote:
> Have a web site on server where magic quote is turned On. Because of
> problems with quotes within forms, I was thinking to turn it Off. I
> wonder
> how much work I'll have to change code to accept new setting? Are we
> talking about major changes or something that could be done in day or
> two
> (the site has few couple-pages long forms and about 10 "regular"
> contact
> us/register/edit membership/edit account/... forms)?
>
> I have access to php.ini. Could I just turn magic quotes Off to see
> what's
> going on and what forms will not work and how to fix it?
>
> On http://www.zend.com/manual/security.magicquotes.disabling.php that
> ini_set() is not an option, but there is an solution to disable magic
> quotes at runtime. Means, I can use this to change code (prepare for
> turning off) on pages with forms? Correct?

If you can use .htaccess, here is what I would do:

Step 1:
Copy all the forms and stuff to a new directory, like, say, 'new'

Step 2:
Use .htaccess in the 'new' directory to turn off Magic Quotes
php_value magic_quotes_gpc 0

Now, test and debug all your forms in 'new' and make sure they all
behave correctly with the setting turned off.

You may even want to set up 'new' so that it connects to a different
database, so you can test heavily without any risk to the 'real' data.
 Just be sure to not mess up when you move the files back to the real
site that you don't keep using the fake database.

This provides you with a low-risk easy way to take as much time as you
need to get the job done, while your current site stays up and
running, at least as well as it was running before.

-- 
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux