[PEAR-BUG] Bug #16939 [Com]: PEAR Installer should not write to C:\Windows

[email protected] ("ykorotia")
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=16939&edit=1

 ID:               16939
 Comment by:       ykorotia
 Reported By:      ykorotia at hotmail dot com
 Summary:          PEAR Installer should not write to C:\Windows
 Status:           Open
 Type:             Bug
 Package:          PEAR
 Operating System: Windows 7
 Package Version:  1.9.0
 PHP Version:      5.3.1
 New Comment:

add variable for environment

>set PHP_PEAR_SYSCONF_DIR=C:\PHP-Addons\PEAR

as example

then check pear config-show.


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

[2011-05-07 15:15:39] gggeek

Same here, on win vista - installed pear 'locally', with php cli
installed in d:\phpsomething.
The installer complained that pear dir was not in my ini path, but after
that running pear.bat works.
Except it says pear user config file is c:\windows\pear.ini, which does
not exist and cannot be written to (not running as privileged user).
A pear.ini file was actually created in the dir where pear was
installed, so I can run pear commands with the -c option, but it took me
a while to find out.
A suggestion: patch pear.bat to look if there is a pear.ini file in the
pear install dir, and add it automatically to the pearcmd.php command...

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

[2010-08-27 04:06:49] mailandryan

I had the same error in Windows 7, but was able to get it working by
running the command prompt as administrator.

Start -> Type in "cmd" -> right-click "cmd.exe" -> click "run as
administrator"

Then change to the directory of your go-pear.bat or go-pear.php, run the
script and you should be good to go.

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

[2010-04-07 22:59:37] dufuz

So if I understand you correctly, you no longer suffer from #16394
(Which had the 
same problem but during installation)?

They have the same underlying problem but if #16394 isn't happening
anymore 
then I can focus my effort a bit more.

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

[2009-12-22 16:30:31] sebastian

Description:
------------
* Clean install of PHP 5.3.1 to personal folder.
* Run go-pear.bat
* Installation succeeds, but discovering a channel does not work
* This is FAIL.

Expected result:
----------------
No write to C:\Windows\pear.ini

Actual result:
--------------
C:\Users\Sebastian Bergmann\php>go-pear

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : local
Please confirm local copy by typing 'yes' : yes

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : C:\Users\Sebastian
Bergmann\
php
 2. Temporary directory for processing            : C:\Users\Sebastian
Bergmann\
php\tmp
 3. Temporary directory for downloads             : C:\Users\Sebastian
Bergmann\
php\tmp
 4. Binaries directory                            : C:\Users\Sebastian
Bergmann\
php
 5. PHP code directory ($php_dir)                 : C:\Users\Sebastian
Bergmann\
php\pear
 6. Documentation directory                       : C:\Users\Sebastian
Bergmann\
php\docs
 7. Data directory                                : C:\Users\Sebastian
Bergmann\
php\data
 8. User-modifiable configuration files directory : C:\Users\Sebastian
Bergmann\
php\cfg
 9. Public Web Files directory                    : C:\Users\Sebastian
Bergmann\
php\www
10. Tests directory                               : C:\Users\Sebastian
Bergmann\
php\tests
11. Name of configuration file                    : C:\Users\Sebastian
Bergmann\
php\pear.ini
12. Path to CLI php.exe                           : .

1-12, 'all' or Enter to continue:
Der Befehl "".\php.exe"" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

*WARNING*
We found php.exe under ., it uses an unknown SAPI. PEAR commandline
tool has not been tested with it, if you have a CLI (or CGI) php.exe
available,
we strongly recommend using it.

Beginning install...

Warning: date(): It is not safe to rely on the system's timezone
settings. You a
re *required* to use the date.timezone setting or the
date_default_timezone_set(
) function. In case you used any of those methods and you are still
getting this
 warning, you most likely misspelled the timezone identifier. We
selected 'Europ
e/Paris' for '1.0/no DST' instead in phar://C:/Users/Sebastian
Bergmann/php/PEAR
/go-pear.phar/PEAR/Registry.php on line 1012

Warning: date(): It is not safe to rely on the system's timezone
settings. You a
re *required* to use the date.timezone setting or the
date_default_timezone_set(
) function. In case you used any of those methods and you are still
getting this
 warning, you most likely misspelled the timezone identifier. We
selected 'Europ
e/Paris' for '1.0/no DST' instead in phar://C:/Users/Sebastian
Bergmann/php/PEAR
/go-pear.phar/PEAR/Registry.php on line 1012

Warning: date(): It is not safe to rely on the system's timezone
settings. You a
re *required* to use the date.timezone setting or the
date_default_timezone_set(
) function. In case you used any of those methods and you are still
getting this
 warning, you most likely misspelled the timezone identifier. We
selected 'Europ
e/Paris' for '1.0/no DST' instead in phar://C:/Users/Sebastian
Bergmann/php/PEAR
/go-pear.phar/PEAR/Registry.php on line 1012

Warning: date(): It is not safe to rely on the system's timezone
settings. You a
re *required* to use the date.timezone setting or the
date_default_timezone_set(
) function. In case you used any of those methods and you are still
getting this
 warning, you most likely misspelled the timezone identifier. We
selected 'Europ
e/Paris' for '1.0/no DST' instead in phar://C:/Users/Sebastian
Bergmann/php/PEAR
/go-pear.phar/PEAR/Registry.php on line 1012
Configuration written to C:\Users\Sebastian Bergmann\php\pear.ini...
Initialized registry...
Preparing to install...
installing phar://C:/Users/Sebastian
Bergmann/php/PEAR/go-pear.phar/PEAR/go-pear
-tarballs/Archive_Tar-1.3.3.tar...
installing phar://C:/Users/Sebastian
Bergmann/php/PEAR/go-pear.phar/PEAR/go-pear
-tarballs/Console_Getopt-1.2.3.tar...
installing phar://C:/Users/Sebastian
Bergmann/php/PEAR/go-pear.phar/PEAR/go-pear
-tarballs/PEAR-1.9.0.tar...
installing phar://C:/Users/Sebastian
Bergmann/php/PEAR/go-pear.phar/PEAR/go-pear
-tarballs/Structures_Graph-1.0.2.tar...
installing phar://C:/Users/Sebastian
Bergmann/php/PEAR/go-pear.phar/PEAR/go-pear
-tarballs/XML_Util-1.2.1.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.3
install ok: channel://pear.php.net/Console_Getopt-1.2.3
install ok: channel://pear.php.net/Structures_Graph-1.0.2
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.9.0
PEAR: Optional feature webinstaller available (PEAR's web-based
installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based
installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based
installer)

PEAR: To install optional features use "pear install
pear/PEAR#featurename"

******************************************************************************
WARNING!  The include_path defined in the currently used php.ini does
not
contain the PEAR PHP directory you just specified:
<C:\Users\Sebastian Bergmann\php\pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.

Current include path           : .;C:\php5\pear
Configured directory           : C:\Users\Sebastian Bergmann\php\pear
Currently used php.ini (guess) :
Press Enter to continue:

** WARNING! Old version found at C:\Users\Sebastian Bergmann\php, please
remove
it or be sure to use the new c:\users\sebastian bergmann\php\pear.bat
command

The 'pear' command is now at your service at c:\users\sebastian
bergmann\php\pea
r.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'c:\users\sebastian bergmann\php\pear.bat' until you have added
** 'C:\Users\Sebastian Bergmann\php' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

  http://pear.php.net/faq.php
  http://pear.php.net/manual/

Thanks for using go-pear!

Drücken Sie eine beliebige Taste . . .

C:\Users\Sebastian Bergmann\php>pear
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
channel-delete         Remove a Channel From the List
channel-discover       Initialize a Channel from its server
channel-info           Retrieve Information on a Channel
channel-login          Connects and authenticates to remote channel
server
channel-logout         Logs out from the remote channel server
channel-update         Update an Existing Channel
clear-cache            Clear Web Services Cache
config-create          Create a Default configuration file
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings
convert                Convert a package.xml 1.0 to package.xml 2.0
format
cvsdiff                Run a "cvs diff" for all files in a package
cvstag                 Set CVS Release Tag
download               Download Package
download-all           Downloads each available package from the default
channel

info                   Display information about a package
install                Install Package
list                   List Installed Packages In The Default Channel
list-all               List All Packages
list-channels          List Available Channels
list-files             List Files In Installed Package
list-upgrades          List Available Upgrades
login                  Connects and authenticates to remote server
[Deprecated i
n favor of channel-login]
logout                 Logs out from the remote server [Deprecated in
favor of c
hannel-logout]
makerpm                Builds an RPM spec file from a PEAR package
package                Build Package
package-dependencies   Show package dependencies
package-validate       Validate Package Consistency
pickle                 Build PECL Package
remote-info            Information About Remote Packages
remote-list            List Remote Packages
run-scripts            Run Post-Install Scripts bundled with a package
run-tests              Run Regression Tests
search                 Search remote package database
shell-test             Shell Script Test
sign                   Sign a package distribution file
svntag                 Set SVN Release Tag
uninstall              Un-install Package
update-channels        Update the Channel List
upgrade                Upgrade Package
upgrade-all            Upgrade All Packages [Deprecated in favor of
calling upgr
ade with no parameters]
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help <command>" to get the help for the specified command.

C:\Users\Sebastian Bergmann\php>dir
 Datenträger in Laufwerk C: ist Windows
 Volumeseriennummer: D69C-7BE4

 Verzeichnis von C:\Users\Sebastian Bergmann\php

22.12.2009  17:26    <DIR>          .
22.12.2009  17:26    <DIR>          ..
22.12.2009  17:26    <DIR>          cfg
22.12.2009  17:26    <DIR>          data
19.11.2009  09:52    <DIR>          dev
22.12.2009  17:26    <DIR>          docs
19.11.2009  09:52    <DIR>          ext
19.11.2009  09:53    <DIR>          extras
19.11.2009  09:52         1.052.672 glib-2.dll
19.11.2009  09:52            16.896 gmodule-2.dll
19.11.2009  09:53                90 go-pear.bat
19.11.2009  09:52        11.361.792 icudt38.dll
19.11.2009  09:52         1.140.224 icuin38.dll
19.11.2009  09:52            41.472 icuio38.dll
19.11.2009  09:52           187.904 icule38.dll
19.11.2009  09:52            42.496 iculx38.dll
19.11.2009  09:52            50.176 icutest.dll
19.11.2009  09:52            99.840 icutu38.dll
19.11.2009  09:52         1.093.120 icuuc38.dll
19.11.2009  09:52            86.472 install.txt
19.11.2009  09:52         1.016.832 libeay32.dll
19.11.2009  09:52            43.008 libenchant.dll
19.11.2009  09:52            44.544 libenchant_ispell.dll
19.11.2009  09:52           293.888 libenchant_myspell.dll
19.11.2009  09:52            97.792 libpq.dll
19.11.2009  09:52             3.286 license.txt
19.11.2009  09:52           266.863 news.txt
22.12.2009  17:26    <DIR>          PEAR
22.12.2009  17:26             4.740 pear.bat
22.12.2009  17:26               706 pear.ini
22.12.2009  17:26             4.748 peardev.bat
22.12.2009  17:26             4.677 pecl.bat
19.11.2009  09:53                39 phar.phar.bat
19.11.2009  09:53            53.212 pharcommand.phar
19.11.2009  09:52            39.936 php-cgi.exe
19.11.2009  09:52            23.040 php-win.exe
19.11.2009  09:52            23.040 php.exe
19.11.2009  09:52             2.523 php.gif
19.11.2009  09:52            70.515 php.ini-development
19.11.2009  09:52            70.800 php.ini-production
19.11.2009  09:52         5.582.848 php5.dll
19.11.2009  09:52           791.632 php5embed.lib
19.11.2009  09:52               135 pws-php5cgi.reg
19.11.2009  09:52               139 pws-php5isapi.reg
19.11.2009  09:52            20.693 readme-redist-bins.txt
19.11.2009  09:52             1.025 snapshot.txt
19.11.2009  09:52           200.704 ssleay32.dll
22.12.2009  17:26    <DIR>          tests
22.12.2009  17:26    <DIR>          tmp
22.12.2009  17:26    <DIR>          www
              38 Datei(en),     23.834.519 Bytes
              12 Verzeichnis(se), 19.776.192.512 Bytes frei

C:\Users\Sebastian Bergmann\php>pear channel-discover pear.phpunit.de
PEAR_Config::writeConfigFile fopen('C:\Windows\pear.ini','w') failed
(fopen(C:\W
indows\pear.ini): failed to open stream: Permission denied)

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


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16939&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.