[Mediawiki-l] Problem with magic_quotes_runtime

Brion Vibber brion at pobox.com
Mon Feb 14 01:51:12 UTC 2005

Bernhard Walle wrote:
> I run MediaWiki 1.4beta6 on a Linux PHP server. The magic_quotes_runtime
> variable is set to "1" (cannot change this). Is it possible that this
> causes problemes? ' is shown as \' and " as \".

Having magic_quotes_runtime will cause EVERYTHING to fail. This is the
most incredibly stupid option in PHP and no one should ever use it.
Here's what it does:

         If magic_quotes_runtime is enabled, most functions
         that return data from any sort of external source
         including databases and text files will have quotes
         escaped with a backslash. If magic_quotes_sybase is
         also on, a single-quote is escaped with a single-
         quote instead of a backslash.

This will automatically corrupt all data coming from the database or the
filesystem, which seems like a pretty bad thing to do.

Note that there is a set_magic_quotes_runtime() function which you may
be able to use to turn it off at runtime:

If that doesn't work, contact your system administrator and ask that
they reconsider their bizarre practice of corrupting all your data.

-- brion vibber (brion @ pobox.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20050213/6344156f/attachment.pgp 

More information about the MediaWiki-l mailing list