I'm not familiar with Suhosin (never used it) but if possible I need to check using PHP whether it is installed. This is for part of an installer that I'm writing. Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To detect the Suhosin Extension use extension_loaded() no matter if it is dynamically loaded or statically compiled:
extension_loaded('suhosin');
To detect the Suhosin-Patch, check for the constant presence:
constant("SUHOSIN_PATCH");
回答2:
simply write a php file in your document root like <?php phpinfo(); ?>
it will print all the information related to php installation just find for the "suhosin" block in it is installed on your server you can find the block with all the values set for it.
回答3:
extension_loaded('suhosin');
PHP docs for extension_loaded
.
If the extension doesn't load, it may still be available through dl
:
if (!extension_loaded('suhosin')) {
if (!dl('suhosin.so')) {
// Extension not loaded.
return false;
}
}
// Extension loaded.
return true;
回答4:
You can test if a configuration open is set for Suhosin:
$isSuhosinInstalled = ini_get('suhosin.session.max_id_length') !== '';