magic quotes

Hey! It aint that hard!

magic quotes

Postby SOD » 08/28/07, 12:45 am

Do you guys use them? or do you shut them off I had heard that they degrade proformance.....thoughts?
It is better to be here than there - SOD
SOD
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5284
Joined: 12/06/01, 12:00 am
Location: here and there

Postby bob » 08/28/07, 1:33 pm

I don't use them, but instead use a series of regular expressions... Not sure why I chose the one method over the other....
WYSIWTF
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis

Postby bob » 08/28/07, 3:20 pm

I also use mysql_real_escape_string, strip_tags, addslashes, and htmlentities, but still need the regular expressions too -- it's kind of maddening how all the invalid characters can get in there
WYSIWTF
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis

Postby SOD » 08/30/07, 8:45 pm

The continunity on the web leaves much to be desired...

BTW www.dinfilter.com has been stable for a couple of months now. Take a look at the 'Learn about Dinfilter' link. I created a simple narrative paragarph with links to the concepts and definitions that drive it. Also note the way cool graph. :D

BTW if our output looks different than the RSS it is correct we can provide hourly proofs.
It is better to be here than there - SOD
SOD
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5284
Joined: 12/06/01, 12:00 am
Location: here and there

Postby SOD » 08/31/07, 10:09 pm

Forensics is a wonderful thing.
It is better to be here than there - SOD
SOD
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5284
Joined: 12/06/01, 12:00 am
Location: here and there

Postby Gerry » 08/22/08, 4:50 pm

Magic quotes was a colossal fuckup and PHP finally admitted it:

Warning

This feature has been DEPRECATED and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.


http://jp.php.net/magic_quotes


They tried to be too smart, thinking for the user when they shouldn't be.... like Vista and it's auto update timer which restarted my computer right near the end of a 8 hour merge script that I had been running, just because I wasn't around to say, "Hey, no actually Vista, I would really like it if you didn't fuck me over like that, please delay this timer for another four hours, which you have decided to set as the limit for the delay dropdown box".

... unlike PHP through, they are yet to admit this is was a colossal fuckup of an idea.

sorry yeah.... magic quotes bad as it auto corrupts data that only really the programmer knows the purpose of. It's also escaping the data at the wrong point and it is making assumptions about the way that it needs to be escaped, when really it has no clue.

ps. hi
I answer rhetorical questions for my own enjoyment.
Gerry
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5727
Joined: 12/04/01, 12:00 am
Location: Perth, Western Australia

Postby RedRage » 08/22/08, 5:32 pm

i tired to use them for a while and ya did notice a performance hit.

regex just seemed to work better but i know theres still some out there that i missed LOL
Image
RedRage
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 1541
Joined: 12/04/01, 12:00 am

Postby bob » 08/27/08, 2:37 am

Gerry? How'd I miss this post? You back, old dog? Where'd you go?
WYSIWTF
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis

Postby Gerry » 08/27/08, 3:52 am

[ot]I'm now working as a thespian, stunning audiences in Melborne. I won't go into too many details though, it's kinda embarrassing to explain if you haven't seen one of my shows.[/ot]
I answer rhetorical questions for my own enjoyment.
Gerry
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5727
Joined: 12/04/01, 12:00 am
Location: Perth, Western Australia

Postby bob » 08/27/08, 4:36 pm

male stripper? I guess that explains the embarassment...


BTW, on magic quotes, I'm having a heck of a time with apostrophes right now. Trying to fix it this morning. Some headlines come in with
Code: Select all
%27
and other have just plain apostrophes. (Same headline, same source - maybe different browser?) Causes the counter to count the same headline as two separate ones, thereby causing the Top Headline lists to have repeats.... I think I almost have the problem in hand though. Funny, only had the problem sporadically before, now I have it every day. I think it might have something to do with the feedburner - google transition.
WYSIWTF
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis

Postby Gerry » 08/27/08, 11:38 pm

I dunno.... http://jp.php.net/manual/en/function.urldecode.php maybe.... depends on the code before it really.

Na, no stripping, I haven't got the legs for it. ..... but if I did!!!
I answer rhetorical questions for my own enjoyment.
Gerry
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 5727
Joined: 12/04/01, 12:00 am
Location: Perth, Western Australia

Postby bob » 08/28/08, 1:27 am

This is a Perl issue, Gerry. No problem with the PHP sections... But maybe I could run the strings through something like that before sending them to Perl or the database....
WYSIWTF
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis

Re: magic quotes

Postby JohnT » 08/28/08, 10:33 am

SOD wrote:Do you guys use them? or do you shut them off I had heard that they degrade proformance.....thoughts?


I did have some thoughts.. until I read the Topic title once again. Heh! I thought the topic was "Magic Goats".... :roll: :P
"A man may be a fool and not know it, but not if he is married."
JohnT
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
 
Posts: 2486
Joined: 12/03/01, 12:00 am
Location: Vladivostok, Russia


Return to Play With Code

Who is online

Users browsing this forum: No registered users and 1 guest

cron