Not sure this is the problem, but remember that when you run a CGI
script from the command line, you are running as yourself. When you
run it in the browser, you are running under whatever username and
group the server is running with (and almost always this is different
from yourself). So, you have to be sure that the directory that you
want to read from can be read by the user under which the browser runs.
So, it isn't a PATH problem, but a permissions problem.
Sean
On Apr 25, 2005, at 7:17 AM, TapasranjanMohapatra wrote:
All,
My script goes like this...
--------------------------------------
#!/usr/bin/perl
print "Content-type: text/html\n\n";
$cmd = "cat file_one";
$content = qx!$cmd!;
print "$content";
--------------------------------------
I have a case where file_one is not in the same directory. So I give
the absolute path of file_one
in place of file_one.
When run it using perl on command line I get the contents of file
printed correctly.
But when accessed through browser (cgi-bin), I get nothing printed.
I thought it might be path problem , but it is not. Because when the
file is in same directory,
it prints the content of the file.
Can anybody let me know where I am going wrong?
TIA
tapas
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>