Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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 March 11th, 2004, 04:32 PM
Authorized User
 
Join Date: Aug 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tachyon
Default Chapter 10 pg. 339 trouble

Under "Getting Information on Files" the sample hit_counter_10.php is listed. The page says, "If it doesn't, we can infer that the current user is the first visitor to the site and create the data file."

I tried running the sample without a count.dat file in the directory and it didn't create one. It said, "Warning: fopen(./count.dat): failed to open stream: Permission denied in /home/something.com/html/learnphp/hit_counter_10.php on line 12
Cannot open ./count.dat"

Did I do something wrong? Isn't that sample supposed to create a count.dat file? Or did I read it wrong?
__________________
An overworked Web Developer who\'s expected to know everything yet given time to study nothing.
 
Old March 11th, 2004, 04:45 PM
Authorized User
 
Join Date: Aug 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tachyon
Default

Oh, man... Do I ever feel stupid. I didn't put write permissions on the directory. That's why it wasn't creating the count.dat file.

It would be nice if the book could have given us a heads up about that.

 
Old March 12th, 2004, 03:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah, it would be nice... but then again, how much more of a descriptive error do you need than "Permission denied"? It's the kind of thing that's frustrating while you're trying to figure it out, but once you do, you kick yourself because the answer was extremely obvious and right in front of you.


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 pg 95 al2000 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 August 4th, 2008 09:18 PM
Chapter 4 Pg 117 Try It Out workib ASP.NET 3.5 Basics 1 April 7th, 2008 12:49 AM
error found Chapter 10 pg 439 dogfish227 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 April 8th, 2004 01:08 PM





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