Question:Unable to insert image in File Manager HTML editor: Call to undefined function get_magic_quotes_gpc()
Symptoms
- Unable to insert an image from Domains > example.com > File Manager > any-file.html > menu button on the right > Edit in HTML Editor with the error:
Server Error
500 Error
Call to undefined function get_magic_quotes_gpc()
Cause
This is caused by Plesk bug
PPPM-13901 and will be fixed in future updates.
Resolution
- Until the bug is fixed as a workaround:
- Log in to Plesk server via SSH
Edit the file /usr/local/psa/admin/htdocs/spaw/class/util.class.php:
Find and replace the code block:
public static function stripSlashes($var)
{
if (get_magic_quotes_gpc()) {
return stripslashes($var);
}
return $var;
}
With this code instead:
public static function stripSlashes($var)
{
return stripslashes($var);
return $var;
}