Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check whether Suhosin is installed?

Tags:

php

suhosin

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.

like image 525
Mike Avatar asked Aug 01 '10 22:08

Mike


People also ask

How do I enable suhosin?

Installing Suhosin on PHP 5.4, 5.5, or 5.6 X, SSH in to your server as root and install the packages required to build the Suhosin extension. Next, download Suhosin, extract it, and change to the Suhosin directory. You can find the latest version on the Suhosin downloads page. Now, compile, install, and restart PHP.

What is suhosin wordpress?

Suhosin (pronounced 'su-ho-shin') is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. Suhosin comes in two independent parts, that can be used separately or in combination.


2 Answers

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");
like image 180
Mikhail Chernykh Avatar answered Sep 29 '22 02:09

Mikhail Chernykh


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.

like image 30
Pankaj Khairnar Avatar answered Sep 29 '22 03:09

Pankaj Khairnar