Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 610857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:43:14+00:00 2026-05-13T17:43:14+00:00

I am trying to install a PEAR package into my recent XAMPP PHP installation

  • 0

I am trying to install a PEAR package into my recent XAMPP PHP installation (PHP 5.3.1) on Windows 7 64-bit.

Installing new packages fails because PEAR tries to access c:\windows\pear.ini instead of the existing c:\path_to_xampp\php\pear.ini. This results (rightly) in a permission denied error. I am logged on as Administrator, but the Windows directory enjoys some additional protection IIRC.

Rather than fiddle with write rights in the windows directory, I would like to use the existing pear.ini file.

Does anybody know where to change PEAR’s behaviour accordingly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:43:15+00:00Added an answer on May 13, 2026 at 5:43 pm

    Not entirely sure but PEAR registered the following keys in the registry of my machine

    REGEDIT4
    [HKEY_CURRENT_USER\Environment]
    "PHP_PEAR_SYSCONF_DIR"="D:\\webserver\\xampp\\php"
    ....
    

    And PEAR/Config.php contains the following code snippet:

    if (getenv('PHP_PEAR_SYSCONF_DIR')) {
        define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR'));
    

    and the constructor for the Config class

    function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false,
                             $strict = true)
        {
            $this->PEAR();
            PEAR_Installer_Role::initializeConfig($this);
            $sl = DIRECTORY_SEPARATOR;
            if (empty($user_file)) {
                if (OS_WINDOWS) {
                    $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini';
                } else {
                    $user_file = getenv('HOME') . $sl . '.pearrc';
                }
            }
    

    $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini'; seems to be the line that makes “my” PEAR installation use the file D:\webserver\xampp\php\pear.ini.
    If that’s correct all you have to do is to somehow set the environment variable PEAR_CONFIG_SYSCONFDIR

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to install pear package and keep getting this strange error. Can you shed
I am trying to install PEAR for use with PHP. As i read on
I'm trying to install a couple of pear packages but have an issue with
I just made a new install of WAMP on Windows 7 and I'm trying
I'm trying to install pear on my centos. I've used *yum install php-pear** to
I'm trying to send an email using PHP Pear. I have everything install correctly
I am trying: install.packages(RGoogleDocs, repos = http://www.omegahat.org/R) As suggested here , but it doesn't
Trying to install Symfony 1.4.11 application on Ubutnu Server + Nginx + php-fpm Nginx
When trying to install my 32bit service on a Windows 64bit machine my installer
I'm trying to install a PECL package on Linux, but the installer never gets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.