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

Bug #18466 Cannot change more than 1 path during installation.
Submitted: 2011-04-20 16:04 UTC Modified: 2014-06-29 09:43 UTC
From: rquadling Assigned: avb
Status: Closed Package: PEAR (version 1.9.2)
PHP Version: 5_3 SVN-2011-04-20 OS: Windows XP SP3
Roadmaps: 1.9.5    
Subscription  


 [2011-04-20 16:04 UTC] rquadling (Richard Quadling)
Description: ------------ During the initial installation of pear (using php -f go- pear.phar), the second question relates to the directories to be used. Changing one of them creates and invokes the bf.vbs script which is saved into a temp folder in %TEMP%. Attempting to change another directory results in the error ... Input Error: Can not find script file "C:\Documents and Settings\RichardQ\Local Settings\Temp\1\tmp13D.tmp\bf.vbs".\ The cause of this is due to http://svn.php.net/viewvc/pear/pear- core/trunk/PEAR/Start/CLI.php?view=markup#l257. The vbs script is silently deleted but the static variable $wshSaved is not altered, allowing the PEAR_Start_CLI::win32BrowseForFolder() to believe that the script exists and to not recreate it. The unlink was added in http://svn.php.net/viewvc/pear/pear- core/trunk/PEAR/Start/CLI.php?r1=297648&r2=297649 which is over a year ago, so no rush on this one. I see 3 possible solutions 1 - The vbs script should not be deleted, thus making the $wshSaved variable accurate. Certainly a quick fix but does leave the vbs script lying around once all the work is done. 2 - The vbs script is deleted and we don't use the static variable to track its existence. Also a quick fix but does mean a vbs script is created every time the user wishes to select a different directory. 3 - The vbs script is deleted during the destruction of the PEAR_START_Cli.php class. I've built a patch for this but don't seem to be able to build go-pear.phar.

Comments

 [2011-04-20 16:05 UTC] rquadling (Richard Quadling)
 [2011-07-12 00:38 UTC] doconnor (Daniel O'Connor)
Out of curiosity and not being familiar with this part of the package; why does it do so much @suppression of warnings with unlinking/fclosing/etc? Also; is it possible to make a small reproducible test case for this one? (possibly not; due to the use of static vars in a few places and the like)
 [2011-07-12 11:11 UTC] rquadling (Richard Quadling)
I've no idea why there is so much error suppression - maybe lazy dev. Either way, the bug is a PITA. And I don't know how to build PEAR to allow me to test my own fix. As a test would require user input, I think just running PEAR on Windows and attempting to change more than 1 path would prove the issue.
 [2011-08-17 11:55 UTC] metzed (Mark Reynolds)
I've also experienced this while attempting a new install today with Windows 7. Anyone any idea why this hasn't been fixed?
 [2011-11-12 20:57 UTC] zane (zane zane)
i also had a prob with this on win 7 and not sure how to fix it with the patch. if im supposed to replace the file on my local with the patch then im outta luck becuase i dont even see that file in that path. can some one help. im not dumb ...lol its just that this install is new to me.
 [2012-01-26 13:44 UTC] cloakedninjas (Dan Jackson)
I just ran into this issue too - top result on Google. I have a WAMP install - manually downloaded pear.php.net/go-pear.phar After changing 1 path - no more can be edited.
 [2012-02-15 00:09 UTC] time_fly (Time Fly)
The problem hasn't been resolved until now. But I found a solution without any patch. Just use "all" instead of change each individual locations. It will use command prompt. Wish it helpful.
 [2013-03-17 12:14 UTC] vemman (Raman Venmarathoor)
This problem still exists. Anyone has a work around? I'm trying to properly configure PEAR on php 5.4.7 on XAMPP 1.8.1. But if I change directories it gives error I could get past it by going to windows Temp directory and keeping a copy of bf.vbs there and recopying after each directory selection( ie., making sure its there for next directory selection) Thanks
 [2014-06-29 09:43 UTC] avb (Alexey Borzov)
-Status: Open +Status: Closed -Assigned To: +Assigned To: avb -Roadmap Versions: +Roadmap Versions: 1.9.5
Fixed in Git https://github.com/pear/pear-core/commit/a59e7bdb4a4a69c5aea0bcad4a7de300d3c0f7eb