cvs: pearweb /public_html go-pear

From: Date: Tue, 20 May 2008 20:36:39 +0000
Subject: cvs: pearweb /public_html go-pear
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7579@lists.php.net to get a copy of this message
tias Tue May 20 20:36:39 2008 UTC Modified files: /pearweb/public_html go-pear Log: trying to fix the temp_dir for bug #13167 http://cvs.php.net/viewvc.cgi/pearweb/public_html/go-pear?r1=1.114&r2=1.115&diff_format=u Index: pearweb/public_html/go-pear diff -u pearweb/public_html/go-pear:1.114 pearweb/public_html/go-pear:1.115 --- pearweb/public_html/go-pear:1.114 Fri Feb 1 23:03:35 2008 +++ pearweb/public_html/go-pear Tue May 20 20:36:39 2008 @@ -22,10 +22,10 @@ /** * go-pear is the online PEAR installer: just download it and run it * (through a browser or command line), it will set up a minimal PEAR - * installation that will be ready for immediatel use. + * installation that will be ready for immediate use. * * @license http://www.php.net/license/2_02.txt PHP License 2.02 - * @version CVS: $Id: go-pear,v 1.114 2008/02/01 23:03:35 tias Exp $ + * @version CVS: $Id: go-pear,v 1.115 2008/05/20 20:36:39 tias Exp $ * @link http://pear.php.net/package/pearweb_gopear * @author Tomas V.V.Cox <cox@idecnet.com> * @author Stig Bakken <ssb@php.net> @@ -1258,10 +1258,12 @@ /* try it really, is_writable is buggy with openbasedir */ $fh = @fopen(realpath($default) . "/test","wb"); if ($fh) { - $ptmp = $default; + // desparately try to set temp dir any possible way, see bug #13167 + $ptmp = $_temp = $temp_dir = $default; + if (!isset($_ENV)) { $_ENV = array(); } + $_ENV['TMPDIR'] = $_ENV['TEMP'] = $default; return true; } else { - $ptmp = "failed"; return false; } } @@ -1309,7 +1311,7 @@ // If for some reason the user has no rights to access to // the standard tempdir, we assume that he has the right // to access his prefix and choose $prefix/tmp as tempdir - if (!$_temp) { + if (!$_temp || !is_writable($_temp)) { print "System's Tempdir failed, trying to use \$prefix/tmp ..."; $res = mkdir_p($prefix.'/tmp'); if (!$res) {

« previous php.pear.core (#7579) next »