1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Rep Power

    Disabling magic quotes fails all the times with htaccess

    hello dear folks i am allmost lost here

    i want to disable magic quotes


    in order to switch Magic Quotes to off i tried both ways - both failed.... and gave back this text

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, at the site.... and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.

    i tried it this way - by naming the file .htaccess

    php_flag magic_quotes_gpc off
    and also that way

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

    what can i do now
    hmm i can talk to the serveradmin - but is nt it possible to do it at the www-side - the webroot!?

    love to hear from you
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Pennsylvania, USA
    Rep Power
    .htaccess files are not PHP files, <?php tags are incorrect.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    Putting php_flag inside .htaccess will only work if PHP is an Apache module (and you remove the <?php ?> tags as ManiacDan said).

    You should contact the server administrator for assistance. It may be possible for you to make the change without the server administrator, but the way that you make the change depends on how the server is configured. On some systems where PHP is not an Apache module, they may allow you to create your own php.ini files, but the location and name of the ini files varies depending on how the server is configured.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo