Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning PHP 5.3
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2011, 01:37 AM
Authorized User
 
Join Date: Jun 2011
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
 
Old December 21st, 2011, 07:04 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 125
Thanks: 0
Thanked 24 Times in 24 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.
 
Old December 21st, 2011, 07:47 PM
Authorized User
 
Join Date: Jun 2011
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
 
Old December 22nd, 2011, 06:32 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 125
Thanks: 0
Thanked 24 Times in 24 Posts
Default

Greetings,

Try: a google search as a starting point.
 
Old December 22nd, 2011, 06:34 PM
Authorized User
 
Join Date: Jun 2011
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
 
Old December 23rd, 2011, 01:29 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 125
Thanks: 0
Thanked 24 Times in 24 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.
 
Old December 23rd, 2011, 10:54 PM
Authorized User
 
Join Date: Jun 2011
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.





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 02:42 AM
Chapter 15 rrlevron BOOK: Beginning ASP 3.0 0 November 17th, 2005 03:38 PM
PEAR::Auth and PEAR::Auth_HTTP Ceriwaen Beginning PHP 1 February 18th, 2005 04: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 10:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.