Results 1 to 1 of 1
Threaded View
-
22nd Feb 2011, 02:52 AM #1
Script to check your Suhosin settings
We all know Suhosin causes problems in scripts such as vBulletin, Invision Power Board, PHPMyAdmin, Roundcube Mail and others.
This will help you (and your host) to improve their Suhosin settings in order not to mess with scripts.
PHP Code:<?php
/**
* Suhosin Configuration Checker v0.2
* @author NewEraCracker
* @date 22-02-2011
* @license Public Domain
*/
//
// Configuration
//
// Value has to be the same or higher to pass tests
$test_values = array(
array( 'suhosin.post.max_array_index_length', 256 ),
array( 'suhosin.post.max_totalname_length', 8192 ),
array( 'suhosin.post.max_vars', 4096 ),
array( 'suhosin.post.max_value_length', 1000000 ),
array( 'suhosin.request.max_array_index_length', 256 ),
array( 'suhosin.request.max_totalname_length', 8192 ),
array( 'suhosin.request.max_vars', 4096 ),
array( 'suhosin.request.max_value_length', 1000000 ),
array( 'suhosin.request.max_varname_length', 350 ),
);
// Value has to be false to pass tests
$test_false = array(
'suhosin.cookie.encrypt',
'suhosin.session.encrypt',
);
//
// Main code
//
ob_start();
if( extension_loaded('suhosin') )
{
$problems = 0;
echo "<b>Suhosin installation detected!</b>".PHP_EOL;
foreach($test_false as $test)
{
if( ini_get($test) != false )
{
echo "Please ask your host to <b>disable (turn off) {$test}</b> in php.ini".PHP_EOL;
$problems++;
}
}
foreach($test_values as $test)
{
if( isset($test['0']) && isset($test['1']) )
{
if( ini_get($test['0']) < $test['1'])
{
echo "Please ask your host to set <b>{$test['0']}</b> in php.ini to <b>{$test['1']}</b> or higher".PHP_EOL;
$problems++;
}
}
}
if($problems == 0)
{
echo "<b>No problems detected!</b>".PHP_EOL;
}
}
else
{
echo "<b>There is no Suhosin in here :)</b>".PHP_EOL;
}
$output = ob_get_contents();
ob_end_clean();
$output = str_replace(PHP_EOL, PHP_EOL.PHP_EOL ,$output);
$output = nl2br($output);
echo $output;
?>NewEraCracker Reviewed by NewEraCracker on . Script to check your Suhosin settings We all know Suhosin causes problems in scripts such as vBulletin, Invision Power Board, PHPMyAdmin, Roundcube Mail and others. This will help you (and your host) to improve their Suhosin settings in order not to mess with scripts. <?php /** * Suhosin Configuration Checker v0.2 * @author NewEraCracker * @date 22-02-2011 Rating: 5Trusted: Dom, l0calh0st, 0ccul7, robert420
Find all threads started by NewEraCracker
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to change Softaculous' settings and email settings
By Areon in forum Server ManagementReplies: 0Last Post: 3rd Mar 2014, 03:25 PM -
Check Your Settings: Cell Phone Pictures Are Risky Business
By cyber-cliff in forum News & Current EventsReplies: 3Last Post: 4th Apr 2011, 04:17 PM -
[PHP/MySQL] Proxy check script
By NewEraCracker in forum Web Development AreaReplies: 3Last Post: 27th Mar 2011, 08:32 PM -
Kloxo help (Noob) DNS settings Domain settings
By Master Server in forum Technical Help Desk SupportReplies: 5Last Post: 7th Mar 2011, 12:04 PM -
Does google check on nulled script?
By Neokenzo in forum Webmaster DiscussionReplies: 10Last Post: 21st Nov 2009, 08:11 PM
themaLeecher - leech and manage...
Version 5.05 released. Open older version (or...