Articles in this section

How to enable PEAR support for a domain in Plesk?

kb: how-to Plesk for Linux ABT: Group A php php extension

Applicable to:

  • Plesk for Linux

Question

A website application requires PEAR (PHP Extension and Application Repository) but it shows PEAR is not installed.

How to enable PEAR support for a domain in Plesk?

Answer

  1. Log in to Plesk GUI
  2. Go to Plesk > Domains > example.com > PHP settings > Common settings > Make sure that the include_path directive includes PEAR folder path relative to the selected PHP version. For example, if Plesk PHP 7.3 is selected, the PEAR folder is located in:

    CONFIG_TEXT: .:/opt/plesk/php/7.3/share/pear

    Click here to expand image

     

  3. Copy PEAR folder path from include_path and append it in open_basedir directive as follows:

    CONFIG_TEXT: {WEBSPACEROOT}{/}{:}{TMP}{/}:/opt/plesk/php/7.3/share/pear

    Click here to expand image

     

  4. Finally, check if PEAR was enabled correctly creating the pear.php file in the website public directory with the following content:

    CONFIG_TEXT: <?php
    require_once 'System.php';
    if (class_exists('System')) {
    echo 'PEAR is enabled';
    } else {
    echo 'PEAR is NOT enabled';
    };
    ?>

 

Additional Information

How to change PHP parameter for all domains on Plesk server?

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.