Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Using PEAR

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2006
    Location
    Palm Springs, CA
    Posts
    5

    Question Using PEAR

    I have a site that would like to use some of the PHP functionality found in PEAR for. I see that /usr/share/pear is in the PHP Include path when I run phpinfo() in a test script. ssh onto the server, I see that PEAR appears to be installed on the server at /usr/share/pear. But, if I try to include anything from PEAR (e.g.: include 'PEAR.php'), the script chokes on the include and refuses to process further.

    What do I need to do to make PEAR accessible to my domains?

    Alex

  2. #2
    StephenAtSpry
    Guest

    Default

    If you've got the software installed but it's not coming up with that include, it's probably because it can't find the right path. Check to see if include('/usr/share/pear/PEAR.php'); works. IIRC, /etc/php.ini includes an option where you can specify search paths for includes.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2006
    Location
    Palm Springs, CA
    Posts
    5

    Default

    Tried that, it still chokes. I am also getting FALSE if I do glob('/usr/share/pear/*').

    from phpinfo():
    include_path .:/usr/share/pear

    I'm stumped. The permissions on /usr/share/pear have not been modified and allow read access to all users.

  4. #4
    StephenAtSpry
    Guest

    Default

    Hmm. Would you mind PMing me your IP address so I can check out the server and ensure everything's configured correctly?

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    3

    Default

    I am having the same problem...

    this is the error i am getting:
    Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/PEAR.php) is not within the allowed path(s):

  6. #6
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    3

    Default

    A bit more info, i checked out /etc/php.ini and php.ini.saved.by.psa and neither of them had the open basedir set.. it was commented out on both.

    any ideas?

  7. #7
    Former Employee Power Poster
    Join Date
    Apr 2005
    Location
    Seattle, WA
    Posts
    140

    Default

    Plesk does not define the open_basedir restrictions within the default php.ini. Instead it specifies this value for each domain independently. It does this by placing directives within the httpd.include file under the domain's conf directory, either /var/www/vhosts/domain.com/conf or /home/httpd/vhosts/domain.com/conf. You should also be able to remove the open_basedir restriction from within Plesk one domain at a time.

  8. #8
    Junior Member Newbie
    Join Date
    Jun 2006
    Posts
    6

    Default Where is PEAR located for Cpanel

    I looked at various places and couldn't find it. I used Pear to install PhpDocumentor and now I couldn't where it is installed as well.
    I want PhpDocumentor is available to all of the domains. How do I do that?
    Please help.

    Thanks

  9. #9
    Forum Administrator Power Poster Lyle@Spry's Avatar
    Join Date
    May 2005
    Posts
    455

    Default

    Quote Originally Posted by spryblue
    I looked at various places and couldn't find it.
    Code:
    # pear config-show
    Configuration (channel pear.php.net):
    =====================================
    Auto-discover new Channels     auto_discover    <not set>
    Default Channel                default_channel  pear.php.net
    HTTP Proxy Server Address      http_proxy       <not set>
    PEAR server [DEPRECATED]       master_server    pear.php.net
    Default Channel Mirror         preferred_mirror pear.php.net
    Remote Configuration File      remote_config    <not set>
    PEAR executables directory     bin_dir          /usr/local/bin
    PEAR documentation directory   doc_dir          /usr/local/lib/php/doc
    PHP extension directory        ext_dir          /usr/local/lib/php/extensions/no-debug-non-zts-20050922
    PEAR directory                 php_dir          /usr/local/lib/php
    PEAR Installer cache directory cache_dir        /tmp/pear/cache
    PEAR data directory            data_dir         /usr/local/lib/php/data
    PHP CLI/CGI binary             php_bin          /usr/local/bin/php
    PEAR test directory            test_dir         /usr/local/lib/php/test
    Cache TimeToLive               cache_ttl        3600
    Preferred Package State        preferred_state  stable
    Unix file mask                 umask            22
    Debug Log Level                verbose          1
    PEAR password (for             password         <not set>
    maintainers)
    Signature Handling Program     sig_bin          /usr/bin/gpg
    Signature Key Directory        sig_keydir       /usr/local/etc/pearkeys
    Signature Key Id               sig_keyid        <not set>
    Package Signature Type         sig_type         gpg
    PEAR username (for             username         <not set>
    maintainers)
    User Configuration File        Filename         /root/.pearrc
    System Configuration File      Filename         /usr/local/etc/pear.conf
    Quote Originally Posted by spryblue
    I want PhpDocumentor is available to all of the domains. How do I do that?
    If you used pear to install it, its files should be available on the php include path, ready for use by all of your domains.

  10. #10
    Former employee Newbie
    Join Date
    Jul 2006
    Posts
    57

    Default

    Remember, all web-site specific changes should be made to /var/www/vhosts/bidstork.com/conf/vhost.conf and /var/www/vhosts/bidstork.com/conf/vhost_ssl.conf for http:// and https:// respectively.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •