php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19890 pearize is missing in the instalation process
Submitted: 2002-10-13 18:25 UTC Modified: 2003-01-20 15:51 UTC
From: michael dot mauch at gmx dot de Assigned:
Status: Closed Package: PEAR related
PHP Version: 4CVS-2002-11-14 OS: Linux RedHat 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michael dot mauch at gmx dot de
New email:
PHP Version: OS:

 

 [2002-10-13 18:25 UTC] michael dot mauch at gmx dot 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-13 19:07 UTC] sniper@php.net
Works fine here. What was the full configure line used?

 [2002-10-15 14:51 UTC] michael dot mauch at gmx dot de
I tried it again with a clean source tree and all worked well  - I can't reproduce it. Sorry for the annoyance.
 [2003-01-07 09:48 UTC] daniel dot bergstrom at gis dot ericsson dot 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) {
 [2003-01-20 15:51 UTC] ssb@php.net
Set the INSTALL_ROOT environment variable, and install-pear.php will take care of the rest.  No need for dirty hacks.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 01:01:28 2025 UTC