The information is displayed but then nothing actually happens within
the visitor_log file. The piece of code im using was originally found
here:http://www.ruby-forum.com/topic/202526
And this is from my error log:
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1]
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `initialize': No such
file or directory - media/Apache/apache2/logs/visitor_log
(Errno::ENOENT), referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `open', referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `<main>', referer: http://localhost:10000/
And this is from my error log:
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1]
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `initialize': No such
file or directory - media/Apache/apache2/logs/visitor_log
(Errno::ENOENT), referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `open', referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `<main>', referer: http://localhost:10000/
Well, this errors is pretty clear, isn't it? "No such file or directory - media/Apache/apache2/logs/visitor_log (Errno::ENOENT)".
···
On Wed, 09 Jan 2013 20:21:06 +0100, Adam Kennedy <lists@ruby-forum.com> wrote:
And this is from my error log:
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1]
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `initialize': No such
file or directory - media/Apache/apache2/logs/visitor_log
(Errno::ENOENT), referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `open', referer: http://localhost:10000/
[Wed Jan 09 19:13:33 2013] [error] [client 127.0.0.1] \tfrom
/media/Apache/apache2/cgi-bin/hello1.cgi:26:in `<main>', referer: http://localhost:10000/
Thanks Ryan,
Ive just changed it. But still getting a 500 internal Server error on
the page. Also changed the permissions to 777 so that it can write to
that file. Still nothing working yet, but thanks for finding that error