]> granicus.if.org Git - php/commitdiff
Made the install of the config honors $INSTALL_ROOT
authorTomas V.V.Cox <cox@php.net>
Thu, 10 Jul 2003 01:34:46 +0000 (01:34 +0000)
committerTomas V.V.Cox <cox@php.net>
Thu, 10 Jul 2003 01:34:46 +0000 (01:34 +0000)
pear/install-pear.php

index 1dd72d3a26447d86877c74e74d3639670503c7b8..44665acc974a313464ec2a87dffa91e4243ecb1d 100644 (file)
@@ -115,13 +115,17 @@ foreach ($install_files as $package => $instfile) {
                             'a previous PEAR installation at ' .
                             "'$ufile'. You may probably want to remove it.");
         }
-        $ui->outputData('Writing PEAR system config file at: ' . $config->files['system']);
-        $ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
         $config->set('verbose', 1, 'default');
         foreach ($config->getKeys() as $key) {
             $data[$key] = $config->get($key);
         }
-        $config->store('system', $data);
+        $cnf_file = $config->getConfFile('system');
+        if (!empty($install_root)) {
+            $cnf_file = $install_root . DIRECTORY_SEPARATOR . $cnf_file;
+        }
+        $config->writeConfigFile($cnf_file, 'system', $data);
+        $ui->outputData('Wrote PEAR system config file at: ' . $cnf_file);
+        $ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');
     }
 }
 ?>