Horrors of magic_quotes_gpc

Discussion in 'NZ Computing' started by Lawrence D¹Oliveiro, Sep 25, 2004.

  1. I've just been checking out the Dr Floppy site
    <https://www.reseller.net.nz/drfloppy/>. It seems to have collected an
    awful lot of backslashes everywhere a quote mark occurs in the text. The
    one time this happened to me was when a client's machine had its PHP
    upgraded and the new version was configured with "magic_quotes_gpc =
    On". It's such a stupid default setting, but I suppose it makes sense
    after a fashion, given the calibre of PHP's target market.

    By the way, I worry about buying something from a site that says
    "Shipment delayed due in 29th May" ...
     
    Lawrence D¹Oliveiro, Sep 25, 2004
    #1
    1. Advertising

  2. Lawrence D¹Oliveiro

    Harry Guest

    Lawrence D¹Oliveiro wrote:

    > I've just been checking out the Dr Floppy site
    > <https://www.reseller.net.nz/drfloppy/>. It seems to have collected an
    > awful lot of backslashes everywhere a quote mark occurs in the text.
    > The one time this happened to me was when a client's machine had its PHP
    > upgraded and the new version was configured with "magic_quotes_gpc =
    > On". It's such a stupid default setting, but I suppose it makes sense
    > after a fashion, given the calibre of PHP's target market.



    Looks ok to me. I think you are misinterpreting what is happening.
    For example "cd\\\'" is not three escapes for a single quote.
    The first two backslashes reduce to a single backslash.
    And the single quote has a single escape.

    So:
    c
    d
    \
    '

    gets encoded as:
    c
    d
    \\
    \'
     
    Harry, Sep 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dragon

    Little Shop Of Horrors £5.99

    Dragon, Oct 21, 2004, in forum: DVD Video
    Replies:
    0
    Views:
    371
    Dragon
    Oct 21, 2004
  2. SMS

    Re: Horrors spawned by P&S marketing

    SMS, Dec 9, 2008, in forum: Digital Photography
    Replies:
    21
    Views:
    779
    Andrew Koenig
    Dec 12, 2008
  3. iL_weReo

    The horrors of Buttner - FCI

    iL_weReo, Dec 4, 2009, in forum: Computer Support
    Replies:
    0
    Views:
    364
    iL_weReo
    Dec 4, 2009
Loading...

Share This Page