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
-
Go to Plesk > Domains > example.com > PHP settings > Common settings > Make sure that the
include_pathdirective 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

-
Copy PEAR folder path from
include_pathand append it inopen_basedirdirective as follows:{WEBSPACEROOT}{/}{:}{TMP}{/}:/opt/plesk/php/7.3/share/pear

-
Finally, check if PEAR was enabled correctly creating the
pear.phpfile 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?