How to enable PEAR support for a domain in Plesk?

Follow

Comments

10 comments

  • Avatar
    adrianTNT

    I need to send mail trough PHP pear smtp mail functions, I am not sure if I need to manually install php-pear-Mail.noarch or it should already be installed since I have the /usr/share/pear with pear files there.

    0
    Comment actions Permalink
  • Avatar
    Martin Schaible

    I think that this article is outdated and does not match the standard configuration of plesk onyx, at least with CloudLinux.

    The value for include_path is set to .:/opt/plesk/php<version>/share/pear and shouldn't be changed, i guess.

    0
    Comment actions Permalink
  • Avatar
    Unknown User

    These instructions are hard to understand, need to be rewritten

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Darren,

    Thank you for the feedback.

    I'm glad that this article was helpful.

    The article will be reviewed.

    0
    Comment actions Permalink
  • Avatar
    Martin Schaible

     I think the path is /usr/share/psa-pear/pear and not /usr/share/pear.


    0
    Comment actions Permalink
  • Avatar
    Darren Edwards (Edited )

    Probably best to expand a little on the explanations, for example, the include directive may have already been altered previously for some plugin or app, and so having the statement `Set the following value for include_path` is not quite right. Maybe use `change` or `ensure the path includes the values`.

    `Add the following to open_basedir` seems good enough an explanation, bearing in mind the on page instructions already found on the php settings form.

    The two items that state `(use path from step 1):` need to be removed as they are misleading and incorrect.

    However, I found this to be a useful nugget of information, as I have previously had to load PEAR manually in the past, and this is so much easier. Thanks Guys.

    0
    Comment actions Permalink
  • Avatar
    Lev Iurev

    Hello @adrianTNT

     

    If pear is already installed you could check installed modules by the following command:

    pear list

    pear list-all  will list all packages, packaged and/or available. To install the package the command 'pear install' should be used.

    Additional details here: https://pear.php.net/manual/en/guide.users.commandline.commands.php

     

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Martin Schaible
    The path should be the same as in the output of this command:

    /usr/share/psa-pear/pear/pear config-get php_dir

    It may be different depending on the configuration.

    0
    Comment actions Permalink
  • Avatar
    Alexandr Tumanov

    @Scott, article was edited.

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Martin Schaible

    Include_path varies between the different PHP versions. The article shows the include_path for OS PHP version. When switching to Plesk PHP version, e.g. PHP 7.2, the include_path changes to /opt/plesk/php/7.2/share/pear accordingly.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request