You are here: Re: magic_quotes_gpc ? « PHP Programming Language « IT news, forums, messages
Re: magic_quotes_gpc ?

Posted by Oli Filth on 11/06/05 01:35

Cameri said the following on 05/11/2005 21:57:
> If you use On, PHP will automatically escape single and double quotes,
> backslashes and null characters, you'll have to use stripslashes() if
> you want the original string. This reduces efficiency because, you
> don't always need to escape every single string, but in the other hand,
> protects you a bit more from SQL injection.

Except, of course, that if you want your script to be portable, then
you'll have to manually test for magic_quotes_gpc setting, and if it's
"Off", then you'll have to manually escape anyway.

And, of course, the fact that it doesn't really help that much against
SQL injection, because escape syntax varies between SQL variants. The
results of magic_quotes aren't strictly correct for MySQL, and not at
all correct for MS SQL Server nor PostgreSQL.


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация