Plesk

How to enable PEAR support for a domain in Plesk?

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:

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

     

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

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

     

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

    <?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?

Exit mobile version