ID:               36873
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rebe at unit01 dot net
 Status:           Bogus
 Bug Type:         *General Issues
 Operating System: linux
 PHP Version:      5.1.2
 New Comment:

Please open a PEAR bug using pear.php.net:
http://pear.php.net/bugs/report.php?package=PEAR


Previous Comments:
------------------------------------------------------------------------

[2006-03-27 16:08:55] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please report bugs in PEAR in the PEAR bug tracker at
http://pear.php.net/bugs/
Thank you.

------------------------------------------------------------------------

[2006-03-27 15:59:50] rebe at unit01 dot net

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 this bug report at http://bugs.php.net/?id=36873&edit=1

Reply via email to