Article ID: 129718, created on Oct 28, 2016, last review on Oct 28, 2016

  • Applies to:
  • Operations Automation 6.0
  • Operations Automation 5.5

Symptoms

"Creating local pear installation for domain service" task fails:

Internal error: /usr/bin/pear /usr/bin/pear config-create /var/www/vhosts/9/100001 /var/www/vhosts/9/100001/.pearrc failed with code 255 saying: STDOUT: '' STDERR ''.

Cause

The value of open_basedir directive, defined in global PHP configuration file /etc/php.ini, prevents /usr/bin/pear binary from successful execution.

Resolution

There are several alternatives to resolve the situation, depending on the desired outcome:

  1. [Recommended] Include all paths required by Pear into open_basedir directive at TOP > Services > Web Hosting > NG Default Configuration > PHP Configuration > Language Settings > Edit open_basedir. The values of the following directives should be present to allow Pear scripts execution:

    include_path
    upload_tmp_dir
    session.save_path
    

    The values can be found inside /etc/php.ini file on any NG web server.

  2. The below solution does not imply changing global open_basedir configuration, but requires getting re-applied upon each php-pear package update, since /usr/bin/pear gets replaced with the default one.

    Correct /usr/bin/pear script and pass an empty open_basedir parameter to it:

    # cat /usr/bin/pear
    
    #!/bin/sh
    exec /usr/bin/php -C -d include_path=/usr/share/pear -d open_basedir="" \
        -d output_buffering=1 /usr/share/pear/pearcmd.php "$@"
    

    In case open_basedir restriction is still required for Pear (to achieve maximum security), pass the required directories together with PATH variable:

    # cat /usr/bin/pear
    
    #!/bin/bash
    PATH=/usr/bin:/usr/share:/usr/libexec/php4-cgi/bin exec /usr/bin/php -C -d include_path=/usr/share/pear \
        -d date.timezone=UTC \
        -d output_buffering=1 -d open_basedir=/usr/bin:/usr/share:/usr/libexec:/etc:/tmp:/root /usr/share/pear/pearcmd.php "$@"
    
  3. [Unsecure] Remove the global PHP open_basedir settings at all.

Search Words

open_basedir

Creating local pear installation for domain service

include_path

pearrc

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 956c448bddc7e1f3585373687602379f 6f1456866eed87488c0f02b298a741c0 5b048d9bddf8048a00aba7e0bdadef37 2554725ed606193dd9bbce21365bed4e

Email subscription for changes to this article
Save as PDF