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
-
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 -
Copy PEAR folder path from
include_path
and append it inopen_basedir
directive as follows:CONFIG_TEXT: {WEBSPACEROOT}{/}{:}{TMP}{/}:/opt/plesk/php/7.3/share/pear
Click here to expand image -
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?
Comments
0 comments
Please sign in to leave a comment.