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

Bug #16939 PEAR Installer should not write to C:\Windows
Submitted: 2009-12-22 21:30 UTC
From: sebastian Assigned:
Status: Open Package: PEAR (version 1.9.0)
PHP Version: 5.3.1 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  


 [2009-12-22 21:30 UTC] sebastian (Sebastian Bergmann)
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)

Comments

 [2010-04-08 02:59 UTC] dufuz (Helgi Þormar Þorbjörnsson)
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.
 [2010-08-27 08:06 UTC] mailandryan (fuk yoooo)
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.
 [2011-05-07 19:15 UTC] gggeek (Gaetano Giunta)
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...
 [2011-06-23 02:09 UTC] ykorotia (Yurii Korotia)
add variable for environment >set PHP_PEAR_SYSCONF_DIR=C:\PHP-Addons\PEAR as example then check pear config-show.
 [2011-12-08 02:09 UTC] kevinpeno (Kevin Peno)
Yurii Korotia, that helps, but it doesn't resolve the problem absolutely. All that does is, basically, make the installation no longer local. If it worked correctly I could install pear per project.
 [2012-08-26 16:51 UTC] ykorotia (Yurii Korotia)
what about adding such line to pear.cmd.php // ykorotia: // fix to include pear.ini in PEAR installation directory // as user configuration by default // NOTE! still can be overwritten by option [ -c file ] if (file_exists('pear.ini')) { $pear_user_config = 'pear.ini'; } at line 99 ?
 [2012-08-26 16:57 UTC] ykorotia (Yurii Korotia)
if (file_exists(dirname(dirname(__FILE__)). "/pear.ini")) { $pear_user_config = 'pear.ini'; } to be totally right
 [2013-06-29 13:44 UTC] brats (Subrata Bauri)
Set the PHP_PEAR_SYSCONF_DIR in the pear.bat file like following: IF "%PHP_PEAR_SYSCONF_DIR%"=="" SET "PHP_PEAR_SYSCONF_DIR=C:\wamp\bin\php\php5.4.3" You have to give the directory path of the pear.ini file of your system.