Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Information About Plesk

 
extensions guideplesk features available for extensionsretrieve data from plesklinuxserver

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

  • getVersion()
    - retrieves the Plesk version.
  • getPlatform()
    - retrieves the platform name.
  • isUnix()
    - returns true if Plesk is installed on a Linux server, or
    false otherwise.
  • isWindows()
    - returns true if Plesk is installed on a Windows server, or
    false otherwise.
  • getOsName()
    - retrieves the OS name.
  • getOsVersion()
    - retrieves the OS version.
  • getOsArch()
    - retrieves the OS architecture.
  • getVirtualization()
    - retrieves the type of virtualization used on the server (if any).
    If the $all argument is set to true, the method returns an
    array with all actual virtualization types instead. Constants for
    virtualization types are named according to the following convention:
    pm_ProductInfo::VIRT_*.
  • getPrivateTempDir()
    - returns absolute path to Plesk temp directory.
  • getProductRootDir()
    - returns absolute path to Plesk root directory.

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');
        }
    }
}
Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »
Knowledge Base

Uploading Backup Files to Server

Read More »

(Plesk for Linux) Cgroups Manager – Limiting Resource Consumption

Read More »

(Plesk for Linux) System Updates – Starting to Use the System Updates Tool

Read More »

Setting Up Custom Error Pages on Linux Servers

Read More »

Hosting Wiki

  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • Red Hat Virtualization
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • Plesk
  • Web Server
  • DNS Server
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family