Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88763 - PEAR config in /etc/pear.conf specifies /usr/lib/php/php
Summary: PEAR config in /etc/pear.conf specifies /usr/lib/php/php
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 86761 88958 (view as bug list)
Depends on:
Blocks: 84525
  Show dependency tree
 
Reported: 2005-04-11 13:12 UTC by David
Modified: 2005-05-10 08:46 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2005-04-11 13:12:54 UTC
The PEAR directory seems to have changed to /usr/lib/php/php, but the PHP config does not have this as an include path, it still has /usr/lib/php.  I am guessing that the extra /php is a mistake which needs to be removed.

When using 'pear install <package>', it will be installed to /usr/lib/php/php and thus unavailable to webapps that are using .:/usr/lib/php as the include path (the default).

Reproducible: Always
Steps to Reproduce:
1. Install php
2. Check /etc/pear.conf



Expected Results:  
Perhaps the extra '/php' needs removing from /etc/pear.conf, otherwise the
default include paths need changing in /etc/php/<version>/php.ini.

This appears to be the same on three machines I run and is "correct" on one that
hasn't yet been updated to the latest php ebuild.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-04-13 08:16:27 UTC
*** Bug 88958 has been marked as a duplicate of this bug. ***
Comment 2 Mike Nerone 2005-04-13 16:03:36 UTC
Been that way about a month, and it is a slight annoyance. If anyone cares, I'd vote for moving them back into /usr/lib/php, or if you really want a subdir, then /usr/lib/php/pear ("/usr/lib/php/php" just seems embarassingly redundant :P).

I suspect the whole subdir thing was just an accident, though.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-04-13 16:53:14 UTC
Mike, moving to /usr/lib/php/pear or /usr/share/php or whatever won
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-04-13 16:53:14 UTC
Mike, moving to /usr/lib/php/pear or /usr/share/php or whatever won´t solve anything b/c you´d need to modify php.ini anyway. :-)

Can´t we have include_path=.:/usr/lib/php:/usr/lib/php/php/ which would work for both the PEAR modules installed before and those upgraded now and prevent nitpicking like in Bug 86761? At least until this gets sorted out and Bug 76991 is fixed? Sebastian, what do you think? 
Comment 5 Mike Nerone 2005-04-13 21:10:24 UTC
I'm aware that php.ini would need to be updated. That's why I said I'd rather they move back into /usr/lib/php. I was just saying that *if* a subdirectory was specifically desired for PEAR components to keep them separate from other include files (as opposed to a simple accident as I theorize), then a subdir called "/usr/lib/php/pear" rather than "/usr/lib/php/php" (including the necessary change to the php.ini files) would be more appropriate.

If using /usr/lib/php/php is intentional and permanent, then I'm fine with it. I think it was probably an accident, though, since the php.ini's would have been modified, as well.

By the way, I'm amused that you refer to rockoo's desire (in bug #86761) for PEAR to actually work when installed as "nitpicking." ;)
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2005-04-14 01:05:38 UTC
CC-ing Sebastian as he proposed the PEAR split. Sebastian, is this directory change intentional? 
Comment 7 Sebastian Bergmann (RETIRED) gentoo-dev 2005-04-14 02:16:19 UTC
The PEAR installation directory will change to /usr/share/php with PEAR-PEAR-1.3.5-r1, which is currently package.masked. This is also the first version of PEAR-PEAR that will bring the split of PEAR from PHP.

AFAIK the /usr/lib/php/php path was not changed intentionally and is most likely a bug of some kind.
Comment 8 Mike Nerone 2005-04-14 12:44:26 UTC
So very likely, this confusion will go away when PEAR-PEAR-1.3.5-r1 (and the corresponding php ebuilds) get unmasked and stabled. Satisfies me. :P
Comment 9 Wendall Cada 2005-04-15 11:59:52 UTC
Personally, I think this was an extremely poorly implemented change. Many webapps depend on PEAR working. This inexcusably broke PEAR. It needs to have been done right or not at all. A very minimal amount of testing would have told you it was broken. Anything that is done, expecially directory changes need to be reflected in an updated php.ini (which they aren't) if I use the command line installer for pear, the paths need to be identical. I find it particularly silly to use portage to manage packages that php folks provide tools for already. Having PEAR-PEAR in the portage tree is a waste of space and not useful whatsoever. PEAR package updates can break software and need testing before deployment on servers. I could go on, but just hope I am getting across that I am extremely disappointed in the poor handling of this major change. I hope major changes aren't just made willy nilly in the future and some more thought goes into them. A fix for this is necessary soon, or send it back to ~arch and patch something that installs properly.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-04-15 19:36:06 UTC
*** Bug 86685 has been marked as a duplicate of this bug. ***
Comment 11 Ben 2005-04-16 01:00:41 UTC
+1 on comment #8
Comment 12 Daniel Webert 2005-05-09 11:28:13 UTC
stable masked mod_php does not work / stable masked horde (#86761) - for 1,5 month happens nothing - plz a solution 
Comment 13 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-09 13:01:25 UTC
*** Bug 86761 has been marked as a duplicate of this bug. ***
Comment 14 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-09 13:20:55 UTC
I just made a clean installation of PHP 4.3.11 on my ~x86 Gentoo system:

  - PEAR is installed to /usr/lib/php/php instead of /usr/lib/php.

  - /etc/pear.conf has php_dir = /usr/lib/php/php instead of /usr/lib/php

  - /etc/php/cli-php4/php.ini has include_path = ".:/usr/lib/php"

I have no idea why the PHP 4.3.11 ebuild (or the php-sapi.eclass) install PEAR to /usr/lib/php/php.

Installing dev-php/PEAR-* packages, however, works on my system, including the PEAR-PEAR-1.3.5 ebuild.

If nobody beats me to it (Stuart?) I will try to debug why PEAR is installed to /usr/lib/php/php instead of /usr/lib/php but my time is currently limited.
Comment 15 Jan Hrabe 2005-05-09 16:24:53 UTC
I've just updated php ebuild to 4.3.11, fresh on 5/9/2005, and it suggested overwriting the /etc/apache2/conf/php.ini with a version that still has 
include_path = ".:/usr/lib/php
in it, so I can confirm it's still broken.

Jan
Comment 16 Wendall Cada 2005-05-09 17:17:57 UTC
Sebastian,

Do a diff between the last changes Robin made and current. You'll see the issue.

Wendall
Comment 17 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-09 21:41:49 UTC
You mean http://www.gentoo.org/cgi-bin/viewcvs.cgi/eclass/php-sapi.eclass?r1=1.55&r2=1.56, right?
Comment 18 Sebastian Bergmann (RETIRED) gentoo-dev 2005-05-10 01:08:51 UTC
Adding --with-pear=/usr/lib/php to the php-sapi.eclass solved the problem that was introduced by Robin's multilib fix.
Comment 19 Wendall Cada 2005-05-10 08:46:44 UTC
Yes, that was the file. :) Fix looks great, thanks Sebastian.