mySQL Error.

legendz

AcemanWolf
I'm not good at fixing php stuff. How do I fix this when i'm using XAMPP?

Deprecated: Function get_magic_quotes_gpc() is deprecated in C:\xampp\htdocs\sources\sql\mysql.php on line 80

Warning
: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\sources\sql\mysql.php:80) in C:\xampp\htdocs\sources\admin\settings.php on line 1080
 

Mark

Administrator
Staff member
this is fixed in 1.9

open /sources/sql/mysql.php

find and remove:
PHP:
    if (get_magic_quotes_gpc()) {
      $value = stripslashes($value);
    }
 
Last edited:

legendz

AcemanWolf
this is fixed in 1.9

open /sources/sql/mysql.php

find:
PHP:
    if (get_magic_quotes_gpc()) {
      $value = stripslashes($value);
    }
replace with:
PHP:
$value = stripslashes($value);
I replaced that and I get this

Parse error: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) or const (T_CONST) in C:\xampp\htdocs\sources\sql\mysql.php on line 83
 

Basti

Administrator
Staff member
That stripslashes isnt needed at all Mark, it was there before to counter the magic quotes, nothing else.
If you plain simply strip slashes now, the user input is altered ( one could just use double slash and the slash would make it through anyway ) - stripslashes is not a security function
Another reason you cant simply stripslashes is json, we work with json in 1.9 and users might also in custom plugins, by stripping slashes, you kill json stored data
 

Mark

Administrator
Staff member
My mistake, I have updated my original post and applied this change to 1.9.

Thanks Basti for catching that!
 
Top