Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97489 - dev-php/PEAR-PEAR-1.3.5-r1 seems broken
Summary: dev-php/PEAR-PEAR-1.3.5-r1 seems broken
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 06:15 UTC by Jakub Moc (RETIRED)
Modified: 2005-07-13 08:18 UTC (History)
0 users

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 Jakub Moc (RETIRED) gentoo-dev 2005-06-30 06:15:49 UTC
I cannot install this without disabling all restrictions in
/etc/php/apache2-php5/php.ini. Testing php/mod_php-5.1.0_beta currently.


Reproducible: Always
Steps to Reproduce:
1. emerge =PEAR-XML_RPC-1.3.1

Actual Results:  
>>> Install PEAR-XML_RPC-1.3.1 into /var/tmp/portage/PEAR-XML_RPC-1.3.1/image/
category dev-php
WARNING: running in safe mode requires that all files created be the same uid as
the current script.  PHP reports this script is uid: 0, and current user is: root

Warning: mkdir(): open_basedir restriction in effect. File(/var) is not within
the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect. File(/var/tmp) is not
within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect. File(/var/tmp/portage) is
not within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on
line 249

Warning: mkdir(): SAFE MODE Restriction in effect.  The script whose uid is 0 is
not allowed to access /var/tmp/portage/PEAR-XML_RPC-1.3.1 owned by uid 250 in
System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image) is not within the allowed
path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr) is not within the allowed
path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr/lib) is not within the
allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr/lib/php) is not within the
allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr/lib/php/pear) is not within
the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr/lib/php/pear/.registry) is
not within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on
line 249
could not create directory
'/var/tmp/portage/PEAR-XML_RPC-1.3.1/image/usr/lib/php/pear/.registry'

!!! ERROR: dev-php/PEAR-XML_RPC-1.3.1 failed.
!!! Function php-pear_src_install, Line 49, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

---

After commenting out open_basedir it get:

>>> Install PEAR-XML_RPC-1.3.1 into /var/tmp/portage/PEAR-XML_RPC-1.3.1/image/
category dev-php
WARNING: running in safe mode requires that all files created be the same uid as
the current script.  PHP reports this script is uid: 0, and current user is: root
Package name
'/var/tmp/portage/PEAR-XML_RPC-1.3.1/work/XML_RPC-1.3.1/package.xml' not valid

!!! ERROR: dev-php/PEAR-XML_RPC-1.3.1 failed.
!!! Function php-pear_src_install, Line 49, Exitcode 1
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


Expected Results:  
Install w/o having to mess with php.ini file. Why is this checking for mod_php
php.ini and not the CLI one anyway? I never had such a problem before, I don't
have safe mode/open_basedir restrictions enabled in CLI PHP.


Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r11 i686)
=================================================================
System uname: 2.6.11-gentoo-r11 i686 AMD Sempron(tm)
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data
/usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo
ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow acpi apache2 apm bash-completion bcmath berkdb bzip2 calendar
crypt curl curlwrappers exif fbcon fortran freetds ftp gd gdbm gif iconv imap
innodb jpeg libg++ libwww maildir mcal memlimit mhash mime mmx mp3 mpeg mssql
mysql mysqli ncurses nls nptl nptlonly odbc offensive pam pcntl pcre pdflib perl
php png pnp posix python readline sasl session simplexml soap sockets spl sqlite
sse ssl sysvipc tcpd tidy tiff tokenizer unicode wddx xml xml2 xmlrpc xsl zlib
linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL
Comment 1 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-12 12:30:45 UTC
Cannot reproduce. Besides, the PHP 5 ebuilds are package.masked.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-07-12 14:04:56 UTC
(In reply to comment #1)
> Cannot reproduce. 

OK, still broken w/ PEAR-XML_RPC-1.3.2 and dev-php/mod_php-5.1.0_beta-r1. I can
reproduce this on two boxes. It's really easy - just setting safe_mode = On and
open_basedir= "/some/path" in /etc/php/apache2-php5/php.ini is enough for this
ebuild to fail.

> Besides, the PHP 5 ebuilds are package.masked.

Hmm, I thought that they are package.masked to fix bugs before unmasking them.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-07-13 05:48:05 UTC
OK, seems like PEAR-PEAR is pretty much broken...

$ pear list
WARNING: running in safe mode requires that all files created be the same uid as
the current script.  PHP reports this script is uid: 0, and current user is: root

Warning: mkdir(): open_basedir restriction in effect. File(/usr) is not within
the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect. File(/usr/lib) is not
within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect. File(/usr/lib/php) is not
within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on line 249

Warning: mkdir(): open_basedir restriction in effect. File(/usr/lib/php/pear) is
not within the allowed path(s): (/usr/share/php:/var/www:/tmp) in System.php on
line 249

Warning: mkdir(): open_basedir restriction in effect.
File(/usr/lib/php/pear/.registry) is not within the allowed path(s):
(/usr/share/php:/var/www:/tmp) in System.php on line 249
could not create directory '/usr/lib/php/pear/.registry'

Hmm... So what about unmerge and reinstall PEAR-PEAR:

>>> Install PEAR-PEAR-1.3.5-r1 into /var/tmp/portage/PEAR-PEAR-1.3.5-r1/image/
category dev-php
>>> dobin: making pear executable...

Warning: main(PEAR.php): failed to open stream: Operation not permitted in
pearcmd.php on line 42
PHP Fatal error:  main(): Failed opening required 'PEAR.php'
(include_path='.:/var/tmp/portage/PEAR-PEAR-1.3.5-r1/image//usr/share/php') in
/var/tmp/portage/PEAR-PEAR-1.3.5-r1/image/usr/share/php/pearcmd.php on line 42

Fatal error: main(): Failed opening required 'PEAR.php'
(include_path='.:/var/tmp/portage/PEAR-PEAR-1.3.5-r1/image//usr/share/php') in
/var/tmp/portage/PEAR-PEAR-1.3.5-r1/image/usr/share/php/pearcmd.php on line 42

!!! ERROR: dev-php/PEAR-PEAR-1.3.5-r1 failed.
!!! Function install_pear_after_bootstrap, Line 87, Exitcode 255
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

Hmmm?
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-07-13 08:18:40 UTC
Closing, I will open a new bug to make it consistent.