php: pear upgrade pear fails

Problems with the Windows version of XAMPP, questions, comments, and anything related.

php: pear upgrade pear fails

Postby spas » 16. November 2005 04:26

Hi,

I noticed that XAMPP 1.5.0 and XAMPP 1.5.0 pl1 both have a problem with the PHP pear command.

Attempting to run `pear upgrade pear` fails with:

Code: Select all
downloading PEAR-1.4.4.tgz ...
Starting to download PEAR-1.4.4.tgz (276,978 bytes)
.........................................................done: 276,978 bytes
permission denied (delete): \xampp\php\pear.bat
permission denied (delete): \xampp\php\peardev.bat
permission denied (delete): \xampp\php\pecl.bat
ERROR: commit failed


This is resolved by removing the ATTRIB +R command for the three files listed.

The pear.bat included in pear-1.4.4 has not mention of ATTRIB commands.

Thanks,
Scott
spas
 
Posts: 1
Joined: 16. November 2005 04:17

Postby Wiedmann » 16. November 2005 10:10

permission denied (delete): \xampp\php\pear.bat
permission denied (delete): \xampp\php\peardev.bat
permission denied (delete): \xampp\php\pecl.bat

That is no Problem. Just make the Upgrade with "-f" (force) and you have a working PEAR 1.4.4.

This is resolved by removing the ATTRIB +R command for the three files listed.

Not a good idea. I use special batchfiles for the XAMPP environment. And with the read-only flag I make sure that an upgrade not not override the batchfiles from XAMPP...
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby rushy2uk » 08. December 2005 11:45

I have had a similar problem when trying to run 'pear upgrade -a Services_Ebay-alpha' but found this advice here http://www.symfony-project.com/trac/wik ... format=txt :
Code: Select all
C:\xampp>pear upgrade PEAR
downloading PEAR-1.4.4.tgz ...
Starting to download PEAR-1.4.4.tgz (276,978 bytes)
.........................................................done: 276,978 bytes
permission denied (delete): \xampp\php\pear.bat
permission denied (delete): \xampp\php\peardev.bat
permission denied (delete): \xampp\php\pecl.bat
ERROR: commit failed
}}}

Found the problem after a little research.  Open `c:\xampp\php\pear.bat` in notepad. 
Near the middle of the file you will see several lines like this:

ATTRIB +R %PHP_PEAR_BIN_DIR%\pear.bat >nul
ATTRIB +R %PHP_PEAR_BIN_DIR%\peardev.bat >nul
ATTRIB +R %PHP_PEAR_BIN_DIR%\pecl.bat >nul

Put a REM in front of all three commands, save the file and then run the `pear upgrade pear` again.  It should work now.


I have added 'REM' to the lines under the :INSTALLED section of the pear.bat file like so:
Code: Select all
REM ATTRIB +R %PHP_PEAR_BIN_DIR%\pear.bat >nul
REM ATTRIB +R %PHP_PEAR_BIN_DIR%\peardev.bat >nul
REM ATTRIB +R %PHP_PEAR_BIN_DIR%\pecl.bat >nul

Is this okay to do or will this lead to problems in the future?
rushy2uk
 
Posts: 1
Joined: 08. December 2005 11:10
Location: Weston-super-Mare, England


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests