phpsuhosin

How to check whether Suhosin is installed?


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.


Solution

  • 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");