|
Php some random notes about magic quotes!
I was stonkered recently by the issue of "magic_quotes_gpc". It is by default in php 5 no longer turned on and best practice would suggest that they should stay turned off!
These can be turned off or on via the php ini file which on Mac os X is located at /usr/local/php5/lib/php.ini (don't forget the apache re start!). It's small changes like this that can pull the wool out from under one(esp when you are taking a version 4 database to version 5).
Interesting in that the php ini file also mentions and I quote!
; - magic_quotes_gpc = On [Performance]
; Input data is no longer escaped with slashes so that it can be sent into
; SQL databases without further manipulation. Instead, you should use the
; function addslashes() on each input element you wish to send to a database.
Which means a heck of a lot of code to get some basic stuff up and running and is the sort of thing that old timer's (aka hard core hand coders like me) would prefer to avoid! And anyway I thought computers were the one's that were meant to be doing the work!
|
|