> > 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 abso > lute path of file_one > in place of file_one. > When run it using perl on command line I get the contents of file printed cor > rectly. > > 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 >
First: Check permissions. Can the webserver process (probably running as a de-privileged user) read that file? Second: Is your webserver running in a chroot(2)ed environment, such that /path/to/file_one is not valid from within its context? -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g Computer software consists of only two components: ones and zeros, in roughly equal proportions. All that is required is to sort them into the correct order. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>