Guestbook script cannot open file
I am trying to write a simple guestbook, but have been getting the dreaded "internal error" message. After commenting some different code, I think I have the problem narrowed down to these lines:
Code:
open( RDGB, "<$guestbook_URL") || My root dir is /usr/local/apache2/htdocs I am running apache2. I thought it might be permissions, and I set the file to world writeable, but that didn't do the trick. Are there some special directory permissions? Any advice would be appreciated. |
And your script and guest_book dir are rooted off $APACHE/cgi-bin or $APACHE/htdocs?
if so remove the leading / |
Ok. Thanks for the advice. I'll post my success...
|
Thank you very much, neo77777. That did the trick.
|
Unomo problemo :D
Perl that is. "Ignorance is bliss" comes from "The Matrix", and I guess Cypher's character was a hardcore Windows whacker. |
GabeF:
Something to remember when doing error checking in perl is to try to make good use of the $! error scalar. It would have given you a better response to what the problem was: Code:
open IN, $file or die "Can't open '$file': $!\n"; |
Thanks for your advice too, LinuxDuck.
Neo77777, I guess I'll have to update my signature then. Thanks for filling me in. |
All times are GMT -5. The time now is 08:50 AM. |