Thread: Magic-Quotes
View Single Post
  #3 (permalink)  
Old 04-29-2008, 01:08 PM
Sigh-clone's Avatar
Sigh-clone Sigh-clone is offline
Premium Member
 
Join Date: 02 Nov 2006
Location: Noo Zeelund
Posts: 300
Sigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond reputeSigh-clone has a reputation beyond repute
Default Re: Magic-Quotes

I did a blog search and found this:

Note: Beware of magic_quotes! PHP’s automatic escaping of special characters with a backslash may seem like a good idea at first, but most good programmers generally agree that it (a) encourages sloppy programming that does not validate input and (b) causes annoyances in well-written code that would not occur if “magic quoting” were turned off. One such annoyance is the corruption of binary data. In the example above, if magic_quotes_runtime is on, the data that readfile() outputs may have backslashes added to it, thus corrupting the file that is sent to the user. Ideally, you should turn magic_quotes_runtime off in your php.ini file to avoid this, but if you do not have access to the configuration file, you can also use the set_magic_quotes_runtime() function (pass is the 0 (zero) integer) to turn the setting off.

Happily, the minutes of a recent PHP Developer meeting show that they have decided to abandon magic quotes in future versions (6+) of PHP. Until everyone upgrades, however, keeping the problems this feature can cause in mind can save you quite a bit of trouble and frustration.

The blog is here: Header Tutorial Boolean Island !

Good luck
__________________

The original point and click interface was a Smith and Wesson.
Never underestimate the power of PINK
Reply With Quote