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

Bug #2370 could not create lock file: failed to open stream: Permission denied
Submitted: 2004-09-22 08:55 UTC
From: smith at backendmedia dot com Assigned: cellog
Status: No Feedback Package: PEAR
PHP Version: 4.3.8 OS: windows xp sp2
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 39 - 39 = ?

 
 [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

Comments

 [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-09-24 10:12 UTC] mike
Perhaps a weird "opened files" restriction of XP SP2? (You remember the files= statement in Win9x' config.sys?) Does PEAR really open so many file handles like it seems? I'll have a look with FileMon...
 [2004-10-22 06:04 UTC] cellog
Lukas, can you try the PEAR/Registry.php I just committed? The lockfile was never being fclosed(), but was being fopened() numerous times. I suspect that garbage collection wasn't really closing things on your system, and so the number of open file pointers went crazy too high. Greg
 [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.
 [2004-10-22 15:04 UTC] cellog
well, keep trying it until you get the error. Try your original test case with RDF-alpha. I have windows xp sp2 as well with no issues, but home, you probably are running professional? Greg
 [2004-10-25 04:51 UTC] cellog
any news (not to be pushy, but I would love to kill this prior to 1.3.2) Greg
 [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