Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8734963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:56:58+00:00 2026-06-13T09:56:58+00:00

Possible Duplicate: How to turn off magic quotes on shared hosting? I’ve been at

  • 0

Possible Duplicate:
How to turn off magic quotes on shared hosting?

I’ve been at my wits ends all day trying to disable magic quotes in my WordPress Theme…

I’ve tried both the .htaccess and php.ini (and php5.ini) file methods but the .htaccess gave me a 500 internal sever error (my host is GoDaddy) and the php.ini method just didn’t work. I’ve also tried the php method with dozens of different code I’ve found online, this being one of them:

if (get_magic_quotes_gpc()) 
{
function remove_slash(&$value)
{
$value = stripslashes($value);
}
array_walk_recursive($_GET, "remove_slash");
array_walk_recursive($_POST, "remove_slash");
array_walk_recursive($_COOKIE, "remove_slash");
array_walk_recursive($_REQUEST, "remove_slash");
}

However, not a single one of them have got rid of those annoying backslashes! If someone on here manages to solve this issue for me I’d really appreciate it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:56:59+00:00Added an answer on June 13, 2026 at 9:56 am

    On my project I use this:

    if (get_magic_quotes_gpc()) {
        $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
        while (list($key, $val) = each($process)) {
            foreach ($val as $k => $v) {
                unset($process[$key][$k]);
                if (is_array($v)) {
                    $process[$key][stripslashes($k)] = $v;
                    $process[] = &$process[$key][stripslashes($k)];
                } else {
                    $process[$key][stripslashes($k)] = stripslashes($v);
                }
            }
        }
        unset($process);
    }
    

    I put it in the runtime and it works.

    I also know how to disable it via .htaccess.

    php_flag magic_quotes_gpc off
    

    I am sure these both work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Using <meta> tags to turn off caching in all browsers? I am
Possible Duplicate: Enable GPS programatically like Tasker Is it possible to programmatically turn on/off
Possible Duplicate: Can I turn off impersonation just in a couple instances I've created
Possible Duplicate: .htaccess Problem - ( Turn off SSL for every page except login.php
Possible Duplicate: Troubleshooting BadImageFormatException I'm trying to compile my solution and i receive an
Possible Duplicate: How Turn on only Camera flash light programmatically in android? I am
Possible Duplicate: Remove marker in Google Maps Api v3 I'm trying to give users
Possible Duplicate: Substitute multiple whitespace with single whitespace in Python trying to figure out
Possible Duplicate: Turning on camera flash LED in Android? I need to turn on
Possible Duplicate: Big Satellite Image Processing I'm trying to run Mort Canty's Python iMAD

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.