larsen has asked for the wisdom of the Perl Monks concerning the following question:
This script, as you could guess, will be called from another automatically generated page, in such a way...
print $query->start_html( -title => 'Some title', -script => { -language => 'Javascript', -src => 'my_script.pl' } );
The problem is in the first step. Since the HTML code is simply ugly, I'm using lynx to get a text-dump of the page, as some good monks suggested me in this thread (Reverse engineering HTML).
So the first lines of my_script.pl are something like:
my $query = new CGI; print $query->header("text/plain"); my $body = `lynx -dump some_url_here`;
But this doesn't work. I've add print $body after this snippet and I've seen this (for me, mysterious) error message (the string after /var/www/ changes every time I run the script):
/var/www/XCjrzA: Permission denied
I think it could be a problem in the configuration of Apache, so I apologize in advance for offtopic question. I also add that I tried to use pipes to read lynx's output, but it didn't worked, with the same error-message.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with backticks (maybe with Apache configuration)
by busunsl (Vicar) on Jun 22, 2001 at 14:24 UTC | |
|
Re: Problems with backticks (maybe with Apache configuration)
by perigeeV (Hermit) on Jun 22, 2001 at 15:33 UTC | |
|
Re: Problems with backticks (maybe with Apache configuration)
by Zaxo (Archbishop) on Jun 22, 2001 at 14:28 UTC | |
by larsen (Parson) on Jun 22, 2001 at 16:21 UTC |