SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possibel to enable magic_quotes_gpc for php through the htaccess file?
    If so how?

    TIA
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't quote me on this, but I believe this would work:
    php_value magic_quotes_gpc 1

    Also, you can (IIRC) set it in your code with:
    if(set_magic_quotes_runtime(1)) { echo "Set MQR!"; }
    else { echo "Error setting MQR."; }

    It might just be magic_quotes_runtime. I'm a bit rusty.

  3. #3
    Non-Member
    Join Date
    Apr 2000
    Location
    Waco, Texas.
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a specific reason why you need to use .htaccess to do this?
    You could try
    ini_alter("magic_quotes_gpc","On|Off");
    at the start of your code, which will alter PHP.INI temporarily while the script runs.



    Hope that helps.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •