Manual:Suhosin

Suhosin is a patch for the PHP code and, differently, an extension which hardens the PHP and aims to protect servers and users from known and unknown flaws in PHP. The Suhosin Hardened-PHP Project homepage is http://www.hardened-php.net/suhosin/.

The most common use is the dynamic linking of the Suhosin extension suhosin.so into PHP. Using the extension, you can for example in case of problems easily deactive the Suhosin extension in PHP by out-commenting the linking line in php.ini (shown below).

Suhosin extension settings for use with MediaWiki
When you downloaded and installed the extension suhosin.so from http://www.hardened-php.net/suhosin/download.html, you should expressly set suhosin.get.max_value_length in your  to a higher value (which overwrites the suhosin built-in default of 512), such as [suhosin] suhosin.get.max_value_length = 2048 extension=suhosin.so and in your MediaWiki  add a corresponding setting for $wgResourceLoaderMaxQueryLength $wgResourceLoaderMaxQueryLength = 2048;
 * comment out the following line if you want to run your PHP without Suhosin extension
 * for example, if the extension makes trouble

or add this code, which dynamically adapts to the  setting in php.ini but upper limited by your $wgResourceLoaderMaxQueryLength :

$wgResourceLoaderMaxQueryLength = 2048;

if ( extension_loaded( "suhosin" ) && ini_get( "suhosin.get.max_name_length" ) && ( !empty( $wgResourceLoaderMaxQueryLength ) ) ) { // suhosin is active, thus do something meaningful with ini_get( "suhosin.get.max_name_length" ) $wgResourceLoaderMaxQueryLength = min( $wgResourceLoaderMaxQueryLength, ini_get( "suhosin.get.max_name_length" ) ); }