PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » PEAR » PEAR » Bug #2370

could not create lock file: failed to open stream: Permission denied

Details

Submitted2004-09-22 08:55 UTC
Fromsmith at backendmedia dot com
Assignedcellog
StatusNo Feedback
PackagePEAR
PHP Version4.3.8
OSwindows xp sp2
Roadmaps(Not assigned)

Comments

[2004-09-22 08:55 UTC] smith at backendmedia dot com

Description:
------------
I get this error during installs and uninstalls (havent tried other commands). I have added some debugging output and removed the @ infront of the fopen() in the _lock() method of Registry.php. Here is the output. What is odd is that the .lock file appearently gets created a bunch of times before it eventually fails.

The quick fix for me was to simply disable the locking inside the source all together .. using --ignore-errors didnt solve the issue.

Actual result:
--------------
C:\PHP>pear install RDF-alpha
resource(71) of type (stream)
resource(72) of type (stream)
resource(73) of type (stream)
resource(74) of type (stream)
resource(76) of type (stream)
resource(77) of type (stream)
downloading RDF-0.1.0alpha1.tgz ...
Starting to download RDF-0.1.0alpha1.tgz (56,104 bytes)
.............done: 56,104 bytes
resource(133) of type (stream)
resource(135) of type (stream)
resource(136) of type (stream)
resource(137) of type (stream)
resource(138) of type (stream)
resource(139) of type (stream)
resource(141) of type (stream)
resource(142) of type (stream)
resource(217) of type (stream)
resource(218) of type (stream)

Warning: fopen(C:\PHP\pear\.lock): failed to open stream: Permission denied in R
egistry.php on line 289
bool(false)
could not create lock file: failed to open stream: Permission denied

[2004-09-22 17:50 UTC] pierre at dotgeek dot org

"Warning: fopen(C:\PHP\pear\.lock): failed to open stream: Permission denied in Registry.php on line 289"

Are you sure you have the permissions to use this folder? write mode?

Anyway this messages should be silent and something cleaner displayed.

--Pierre

[2004-09-22 17:52 UTC] smith at backendmedia dot com

Well I have admin rights on windows. Also as you can see from the dump creating the lock file seems to work several times before it suddenly fails.

[2004-10-22 10:12 UTC] smith at backendmedia dot com

Using Registry.php from the PEAR_1_3 branch with my PEAR 1.3.1 install still gave me:
C:\php>pear uninstall xml_annotea
could not create lock file: failed to open stream: Permission denied

But then I totally wiped my PEAR install and reinstalled and the issue seems gone. However I am quite sure that back then I also wiped my PEAR install. So I am not sure whats going on.

[2006-02-07 20:43 UTC] vivpuri at yahoo dot com

I am also getting this error. My PHP version is 4.3.11 and tried installing various packages(like Text_Diff-0.2.1.tgz) but get the same error:

***********************************
could not create lock file: failed to open stream: Permission denied
***********************************

OS is Win XP Pro SP1. Please help

-V