#19890 [Csd]: pearize is missing in the instalation process

From: Date: Mon, 20 Jan 2003 21:51:13 +0000
Subject: #19890 [Csd]: pearize is missing in the instalation process
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12640@lists.php.net to get a copy of this message
ID: 19890 Updated by: ssb@php.net -Summary: --prefix is not honoured for PEAR install -Reported By: michael.mauch@gmx.de +Reported By: alietss@yahoo.com Status: Closed Bug Type: PEAR related -Operating System: Linux +Operating System: Linux RedHat 8.0 -PHP Version: 4.3.0-pre1 +PHP Version: 4CVS-2002-11-14 New Comment: Set the INSTALL_ROOT environment variable, and install-pear.php will take care of the rest. No need for dirty hacks. Previous Comments: ------------------------------------------------------------------------ [2003-01-07 09:48:38] daniel.bergstrom@gis.ericsson.se I have the same problem, when building an RPM of PHP, the case I have is that I will in the end install it below a /app/... structure only when building an RPM it will be placed below /tmp/... When buildning the RPM I don't want write access to the /app/... I found a problem with the install-pear.php and PEAR_Installer(). When the PEAR_Installer is initializing it creates some directories based on php_dir variable, only we are once the init is done replace it with $reg_dir, which can be php_dir, or install_root and php_dir. The patch below will set the php_dir to $reg_dir while it initializes the put back the original value, fast and ugly workaround ;-) I did it on php-4.3.0, checked the code in php-4.3.0RC4 didn't see anything that it should be solved. --- php-4.3.0/pear/install-pear.php~ Fri Dec 13 03:14:22 2002 +++ php-4.3.0/pear/install-pear.php Tue Jan 7 15:27:31 2003 @@ -61,7 +61,11 @@ $reg = &new PEAR_Registry($reg_dir); $ui = &new PEAR_Frontend_CLI(); + +$old_php_dir = $config->get('php_dir'); +$config->set('php_dir', $reg_dir); $installer = &new PEAR_Installer($ui); +$config->set('php_dir', $old_php_dir); $installer->registry = &$reg; foreach ($install_files as $package => $instfile) { ------------------------------------------------------------------------ [2002-10-15 14:51:40] michael.mauch@gmx.de I tried it again with a clean source tree and all worked well - I can't reproduce it. Sorry for the annoyance. ------------------------------------------------------------------------ [2002-10-13 19:07:17] sniper@php.net Works fine here. What was the full configure line used? ------------------------------------------------------------------------ [2002-10-13 18:25:04] michael.mauch@gmx.de Trying to install PHP into a directory other than /usr/local results in a broken PEAR install, because the --prefix directory is not honoured: Installing PHP SAPI module Installing shared extensions: /house/elmicha/spe142/lib/php/extensions/no-debug-non-zts-20020429/ Installing PHP CLI binary: /house/elmicha/spe142/bin/ Installing PEAR environment: /house/elmicha/spe142/lib/php/ Warning: mkdir(/usr/local/lib/php) [http://www.php.net/function.mkdir]: Permission denied in /house/elmicha/local/src/php-4.3.0pre1/pear/System.php on line 236 Warning: mkdir(/usr/local/lib/php/.registry) [http://www.php.net/function.mkdir]: No such file or directory in /house/elmicha/local/src/php-4.3.0pre1/pear/System.php on line 236 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19890&edit=1

« previous php.pear.dev (#12640) next »