Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.13

Bug #18362 A whitespace TEMP_DIR path breaks install/upgrade functionality
Submitted: 2011-03-14 11:29 UTC
From: azazul Assigned: dufuz
Status: Closed Package: PEAR (version 1.9.2)
PHP Version: 5.3.5 OS: Windows 7
Roadmaps: (Not assigned)    

 [2011-03-14 11:29 UTC] azazul (M?rti?š Tereško)
Description: ------------ In file PEAR/System.php function _parseArgs($argv, $short_options, $long_options = null) { if (!is_array($argv) && $argv !== null) { $argv = preg_split('/\s+/', $argv, -1, PREG_SPLIT_NO_EMPTY); } return Console_Getopt::getopt2($argv, $short_options); } If $argv contains something like "-t X:\path\to\PHP 5.3\tmp -d pear" , then it will split on space in "PHP 5.3". Test script: --------------- $args = "-t R:\applications\PHP 5.3\tmp -d pear"; $opts = System::_parseArgs($args, 't:d'); var_dump( $opts ); Expected result: ---------------- i have no idea Actual result: -------------- array(2) { [0]=> array(1) { [0]=> array(2) { [0]=> string(1) "t" [1]=> string(19) "R:\applications\PHP" } } [1]=> array(3) { [0]=> string(7) "5.3\tmp" [1]=> string(2) "-d" [2]=> string(4) "pear" } }


 [2011-03-14 11:42 UTC] azazul (M?rti?š Tereško)
Setting 'pear config-set temp_dir "C:\Users\MyUserName\AppData\Local\Temp" ' helps, but you have to set it manually.
 [2011-04-12 16:13 UTC] kalvaro (Alvaro G. Vicario)
Workaround: 1. Use DIR /X to find out the 8+3 name of the folder. 2. Set it with config-set, e.g.: pear config-set temp_dir "C:\ARCHIV~1\PHP\tmp"
 [2011-07-05 01:49 UTC] dufuz (Helgi Þormar Þorbjörnsson)
-Status: Open +Status: Closed -Assigned To: +Assigned To: dufuz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.