Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP 5.3
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP 5.3
This is the forum to discuss the Wrox book Beginning PHP 5.3 by Matt Doyle; ISBN: 978-0-470-41396-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 5.3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 20th, 2011, 12:37 AM
Authorized User
Points: 216, Level: 4
Points: 216, Level: 4 Points: 216, Level: 4 Points: 216, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Location: USA, OHIO
Posts: 51
Thanks: 9
Thanked 0 Times in 0 Posts
Send a message via MSN to nawar youssef
Default Hey need help on Pear installation chapter 15

I installed or I started running the Pear from my terminal on Mac and I tried to instal the package Net_UserAgent_Detect but I got an error says something about the line 835 in pearl.php about the touch() function, so I went to that file but I have no idea what should I know!!!! anybody can help thx,
this is the error shows in the terminal :

Code:
Warning: touch(): Unable to create file /usr/lib/php/.lock because Permission denied in /usr/lib/php/PEAR/Registry.php on line 835
could not create lock file: fopen(/usr/lib/php/.lock): failed to open stream: No such file or directory
Reply With Quote
  #2 (permalink)  
Old December 21st, 2011, 06:04 AM
Friend of Wrox
Points: 639, Level: 9
Points: 639, Level: 9 Points: 639, Level: 9 Points: 639, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Location: North East UK
Posts: 119
Thanks: 0
Thanked 23 Times in 23 Posts
Default

Greetings,

Whatever user php is running as on your system needs the appropriate permissions to be able to create files in the 'usr/lib/php' directory.
Reply With Quote
  #3 (permalink)  
Old December 21st, 2011, 06:47 PM
Authorized User
Points: 216, Level: 4
Points: 216, Level: 4 Points: 216, Level: 4 Points: 216, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Location: USA, OHIO
Posts: 51
Thanks: 9
Thanked 0 Times in 0 Posts
Send a message via MSN to nawar youssef
Default

Thanks of replaying, but how can I give or get those promotions? I have no idea how to do that.
thx
Reply With Quote
  #4 (permalink)  
Old December 22nd, 2011, 05:32 AM
Friend of Wrox
Points: 639, Level: 9
Points: 639, Level: 9 Points: 639, Level: 9 Points: 639, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Location: North East UK
Posts: 119
Thanks: 0
Thanked 23 Times in 23 Posts
Default

Greetings,

Try: a google search as a starting point.
Reply With Quote
  #5 (permalink)  
Old December 22nd, 2011, 05:34 PM
Authorized User
Points: 216, Level: 4
Points: 216, Level: 4 Points: 216, Level: 4 Points: 216, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Location: USA, OHIO
Posts: 51
Thanks: 9
Thanked 0 Times in 0 Posts
Send a message via MSN to nawar youssef
Default thx, I tried but I still have the error but ...

but I found the registery.php file which the error inside it in the line 835 as the error message shows, and this is the code insid the file
PHP Code:
 $open_mode 'w';
        
// XXX People reported problems with LOCK_SH and 'w'
        
if ($mode === LOCK_SH || $mode === LOCK_UN) {
            if (!
file_exists($this->lockfile)) {
                
touch($this->lockfile);
            }
            
$open_mode 'r';
        } 
there is some rported problems with lock_sh and 'w' do you have any idea how to fix it ? maybe we can change the 'w' to something else ????
thanks
Reply With Quote
  #6 (permalink)  
Old December 23rd, 2011, 12:29 PM
Friend of Wrox
Points: 639, Level: 9
Points: 639, Level: 9 Points: 639, Level: 9 Points: 639, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Location: North East UK
Posts: 119
Thanks: 0
Thanked 23 Times in 23 Posts
Default

Greetings,

Are you still getting the error in your first post?

If you are then the problem is with the permissions on the directory, php does not have the permissions to write to the directory to create the file, correct the permissions issue and it will work.

If you do not know how to set the permissions then I suggest you do some reading on how your operating system works when working with files and directories. Use the link to Google I gave you previously as a starting point.
Reply With Quote
  #7 (permalink)  
Old December 23rd, 2011, 09:54 PM
Authorized User
Points: 216, Level: 4
Points: 216, Level: 4 Points: 216, Level: 4 Points: 216, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2011
Location: USA, OHIO
Posts: 51
Thanks: 9
Thanked 0 Times in 0 Posts
Send a message via MSN to nawar youssef
Default

thx you for trying helping me, but I could not find a way, I read almost all the links I couldn't have found the solution. I am gonna give up,
Can I start reading the next chapter ( ch 16 ) without reading the ch 15 ????
if so I am going to move on and continue, if not I don't know what to do.

by the way I am using XAMPP not MAMP, and I have Mac OS X not snow board.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP PEAR installation help vinodkalpaka BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 2 February 26th, 2006 01:42 AM
Chapter 15 rrlevron BOOK: Beginning ASP 3.0 0 November 17th, 2005 02:38 PM
PEAR::Auth and PEAR::Auth_HTTP Ceriwaen Beginning PHP 1 February 18th, 2005 03:36 PM
Chapter 15 moggie BOOK: Beginning ASP 3.0 2 October 19th, 2004 01:30 PM
Chapter 15!! studentinpain BOOK: Beginning ASP 3.0 16 March 12th, 2004 09:26 AM



All times are GMT -4. The time now is 12:00 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.