Plesk

Information About Plesk

To retrieve information about Plesk and the server on which it is
installed, use the
pm_ProductInfo
class.

Examples

class IndexController extends pm_Controller_Action
{
    public function init()
    {
        parent::init();
        if (pm_ProductInfo::getOsName() === pm_ProductInfo::OS_DEBIAN && version_compare(pm_ProductInfo::getOsVersion(), '8.0', '<')) {
            pm_Log::info('Debian older then 8.0 is not supported!');
            $this->_redirect('not-supported');
        }
    }
}
class IndexController extends pm_Controller_Action
{
    public function init()
    {
        parent::init();
        if (in_array(pm_ProductInfo::getVirtualization(), [pm_ProductInfo::VIRT_VZ, pm_ProductInfo::VIRT_OPENVZ])) {
            pm_Log::info('Virtuozzo is not supported!');
            $this->_redirect('not-supported');
        }
    }
}