From: rebe at unit01 dot net Operating system: linux PHP version: 5.1.2 PHP Bug Type: *General Issues Bug description: go-pear.php web installation
Description: ------------ Latest go-pear: $Id: go-pear,v 1.81 2006/03/11 14:15:20 pajoye Exp $ fails on php5 with open_basedir restriction. Function tmp_dir() about line 1156 has check code: $_temp = my_env('TMPDIR'); if (!$_temp) { if (is_writable('/tmp')) { $_temp = '/tmp'; } } which fails cause is_writable('/tmp') return true (!!) even if php cannot write anything there because of restrictions, so then in line 423: $ptmp = tempnam($foo, 'gope'); $ptmp becomes ampty - script is downloading packages into current dir which makes then conflicts and errors. I suggest to change this: if (!$_temp) { if (is_writable('/tmp')) { $_temp = '/tmp'; } } to something like that: if (!$_temp) { $test = '/tmp/'.uniqid(); if (@mkdir($test)) { @rmdir($test); $_temp = '/tmp'; } } which forces to create something to check if its possible. ------------------------ Second small bug is that after i fixed that code above and installation finished with success i got link: "Start Web Frontend of the PEAR Installer >>" which points to pear/pear/index.php dir instead of pear/index.php dir (where "pear" was my dir i choosed to put go-pear.php there and run with defaults). -- Edit bug report at http://bugs.php.net/?id=36873&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36873&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36873&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36873&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36873&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36873&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36873&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36873&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36873&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36873&r=support Expected behavior: http://bugs.php.net/fix.php?id=36873&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36873&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36873&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36873&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36873&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36873&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36873&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36873&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36873&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36873&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36873&r=mysqlcfg