FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18466&edit=1

ID: 18466
Comment by: zane
Reported By: zane59anez at yahoo dot com
Summary: Cannot change more than 1 path during installation.
Status: Open
Type: Bug
Package: PEAR
Operating System: Windows XP SP3
Package Version: 1.9.2
PHP Version: 5_3 SVN-2011-04-20
New Comment:

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.

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

[2011-08-17 12:55:55] metzed

I've also experienced this while attempting a new install today with
Windows 7. Anyone any idea why this hasn't been fixed?

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

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-07-12 01:38:06] doconnor

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)

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

bug:18466;patch:PEAR_Start_CLI_win32BrowseForFolder.patc;revision:1303319150;.

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

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.

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

## Related Discussions

Discussion Overview
 group pear-bugs categories php posted Nov 12, '11 at 8:00p active Nov 12, '11 at 8:00p posts 1 users 1 website pear.php.net

### 1 user in discussion

Content

People

Support

Translate

site design / logo © 2022 Grokbase