I'm using php/oracle for a short time now. I'm forced to work on
server where the following configuration is used:
php.ini:
magic_quotes_gpc = on
magic_quotes_runtime = off
magic_quotes_sybase = off
After my first INSERT into oracle with arbitrary returned from a
post form I got bitten by special characters like ', " and \.
They were all escaped with \, too. But this broke my INSERTS
because ' needs to be escapde with ' so it looks like '' when the
acutal insert happens.
As far as my testing goes, no other character needs escaping, no
'\' needs; just the '.
Retrieving data withing SELECT results in getting back the data
WITH backslashes in them.
After settigns magic_quotes_sybase = on, I couldn't believe it.
Everything worked; from now one only ' was escaped to '', no
other character.
With the first configuration, every data coming from post forms
needed to be processed with the following sequence:
$input = stripslashes( $input);
$input = str_replace( "'", "''", $input);
After activating magic_quotes_sybase, the above is not needs
anymore as the are allready escaped the right way.
Has someone had such troubles too, or are there better ways of
doing that ?
Does someone know if the following configuration
magic_quotes_gpc = on
magic_quotes_runtime = off
magic_quotes_sybase = on
has some known issues about php stability or other problems
arising with it ? (I was told so without getting more in depth
information why or what)
thanks for sharing ideas,
Markus
--
Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]