Re: Taint mode CGI problem

2011-11-12 Thread 'lesleyb'
On Sat, Nov 12, 2011 at 08:24:52AM -0300, Tessio Fechine wrote: > But why the same code works fine at command line? That's what bothers me > most. > And.. there is no code duplication. search.pl is a normal script that I use > at command line. I just want to output the result in a web page. > > Th

Re: Taint mode CGI problem

2011-11-12 Thread Tessio Fechine
But why the same code works fine at command line? That's what bothers me most. And.. there is no code duplication. search.pl is a normal script that I use at command line. I just want to output the result in a web page. Thanks! 2011/11/12 Peter Scott > On Fri, 11 Nov 2011 19:08:18 -0300, Tessio

Re: Taint mode CGI problem

2011-11-11 Thread Peter Scott
On Fri, 11 Nov 2011 19:08:18 -0300, Tessio Fechine wrote: > #!/usr/bin/perl -T -w > > use strict; > use CGI; > > $ENV{PATH} = '/var/www/cgi-bin/'; > my $exec = 'search.pl'; > > > my $c = CGI->new(); > print $c->header(), $c->start_html(-title => "It's alive!\n"), "\n"; > > my $search = $c->par

Taint mode CGI problem

2011-11-11 Thread Tessio Fechine
Hello, I have this CGI script: ---//--- #!/usr/bin/perl -T -w use strict; use CGI; $ENV{PATH} = '/var/www/cgi-bin/'; my $exec = 'search.pl'; my $c = CGI->new(); print $c->header(), $c->start_html(-title => "It's alive!\n"), "\n"; my $search = $c->param('search') || 'nobody'; !system $exec, "(

Re: CGI problem fith file URIs

2008-03-10 Thread Tom Phoenix
On Mon, Mar 10, 2008 at 12:17 PM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > In what way is opening a file from a browser a CGI problem? Maybe you missed where the OP said "I am developing a help viewer app with CGI pm." Cheers! --Tom Phoenix Stonehenge Perl Training

Re: CGI problem fith file URIs

2008-03-10 Thread Gunnar Hjalmarsson
that in the beginners-CGI forum. In what way is opening a file from a browser a CGI problem? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: CGI problem fith file URIs

2008-03-10 Thread Tom Phoenix
On Mon, Mar 10, 2008 at 7:50 AM, Mike Martin <[EMAIL PROTECTED]> wrote: > However when I try to access the file ie: with > file://usr/share/doc/somefile.html I cannot Now, you know that a file URL refers to a file that is available to the machine that has the browser, right? It's not generally

CGI problem fith file URIs

2008-03-10 Thread Mike Martin
I am developing a help viewer app with CGI pm. However I have hit a roadblocjk with the last part of the program This searches the /usr/share/doc heirarchy for html files and presents a dropdown list. However when I try to access the file ie: with file://usr/share/doc/somefile.html I cannot I ha

Re: perl cgi problem

2006-04-20 Thread Mr. Shawn H. Corey
On Thu, 2006-20-04 at 13:08 +0100, Dermot Paikkos wrote: > On 20 Apr 2006 at 11:54, Saurabh Singhvi wrote: > > > Hi > > > > I am getting 500 internal server errors when i use > > > > #!/usr/bin/perl -wT > > > > in cgi's. It goes away if i remove the T part. So what could be the > > problem?/ >

Re: perl cgi problem

2006-04-20 Thread Dermot Paikkos
On 20 Apr 2006 at 11:54, Saurabh Singhvi wrote: > Hi > > I am getting 500 internal server errors when i use > > #!/usr/bin/perl -wT > > in cgi's. It goes away if i remove the T part. So what could be the > problem?/ Something is tainted. Check the web-server error log for the perl error. Hav

perl cgi problem

2006-04-20 Thread Saurabh Singhvi
Hi I am getting 500 internal server errors when i use #!/usr/bin/perl -wT in cgi's. It goes away if i remove the T part. So what could be the problem?/ thanks Saurabh

Re: cgi problem

2005-07-05 Thread Aditi Gupta
e <[EMAIL PROTECTED] > wrote: > > >> > > >> > > >>>I know this is a stupid question, but have you installed the perl > > >>>intepreter on your XP system and does IIS know that it should call > > perl for > > >&g

Re: cgi problem

2005-07-04 Thread N. Ganesh Babu
perl intepreter that will do the setup for you when you install is activeperl. www.activestate.com <http://www.activestate.com> - Original Message: From: Aditi Gupta <[EMAIL PROTECTED]> To: Perl Beginners Date: Monday, July 4 2005 08:09 Subject: cgi problem He

Re: cgi problem

2005-07-04 Thread Aditi Gupta
rl. www.activestate.com <http://www.activestate.com> > > - > Original Message: > From: Aditi Gupta <[EMAIL PROTECTED]> > To: Perl Beginners > Date: Monday, July 4 2005 08:09 > Subject: cgi problem > Hello Perlers, > > I'm very new to CGI programming. I'm wor

Re: cgi problem

2005-07-03 Thread Owen Cook
On Mon, 4 Jul 2005, Aditi Gupta wrote: > > I'm very new to CGI programming. I'm working with following: > Browser: Mozilla Firefox > Server: Apache 2.0.54 > OS: Windows XP > > I'm going through the following online tutorial for cgi: > http://www.cgi101.com/book/ > > The 1st cgi code that I w

cgi problem

2005-07-03 Thread Aditi Gupta
Hello Perlers, I'm very new to CGI programming. I'm working with following: Browser: Mozilla Firefox Server: Apache 2.0.54 OS: Windows XP I'm going through the following online tutorial for cgi: http://www.cgi101.com/book/ The 1st cgi code that I wrote is as follows: first.cgi ---

Re: newbie cgi problem

2001-10-18 Thread Brett W. McCoy
On Thu, 18 Oct 2001, dan radom wrote: > I'm trying to print the contents of a file which is being passed from > a html form. I'm pretty close (I think). Here's what I have... > > #!/usr/local/bin/perl -w You should also have 'use strict' here. > use CGI qw(:all); > $s=CGI::param('host'); > $s

Re: newbie cgi problem

2001-10-18 Thread dan radom
thanks too all who replied. i knew i was close. i can't believe i missed the extra " on line 7. duh. thanks everyone! dan * dan radom ([EMAIL PROTECTED]) wrote: > I'm trying to print the contents of a file which is being passed from a html form. >I'm pretty close (I think). Here's what I

RE: newbie cgi problem

2001-10-18 Thread Heely, Paul
Hi, > open(CONF, "/opt/disk4/REDBACK-BACKUP/$s") or die("configuration file not found")"; ^ Try getting rid of the extra " on line 7. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: newbie cgi problem

2001-10-18 Thread Richie Crews
try this.. foreach (@t) { print "$_"; }; On Thu, 2001-10-18 at 10:54, dan radom wrote: > I'm trying to print the contents of a file which is being passed from a html form. >I'm pretty close (I think). Here's what I have... > > html form... > > > Enter the hostname to view the configuraqtio

newbie cgi problem

2001-10-18 Thread dan radom
I'm trying to print the contents of a file which is being passed from a html form. I'm pretty close (I think). Here's what I have... html form... Enter the hostname to view the configuraqtion file perl script... #!/usr/local/bin/perl -w use CGI qw(:all); $s=CGI::param('host'); $s = qu

Re: CGI Problem

2001-05-02 Thread SunDog
Ok ...after the #!/usr/bin/perl ... fix the next thing to check for is ^M this is the extra CR that Windoze editors leave behind ... you can open this file up on a linux box using fox-editor it will show any offending ^M's delete them ...then try again ... regards SunDog ==

RE: CGI Problem

2001-05-02 Thread King, Jason
Joe McMahon writes .. >On Wed, 2 May 2001, J. Patrick Lanigan wrote: > >> I am getting an "Internal Server Error" returned to my >browser. The error >> log shows the following: >> >> "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] >Premature end of >> script headers: /path/to/filenam

Re: CGI Problem

2001-05-02 Thread Matt Cauthorn
It's almost certainly (to my mind) your http header. Make sure and use the CGI.pm module, as it makes this type of thing extremely easy to write. --- "J. Patrick Lanigan" <[EMAIL PROTECTED]> wrote: > I am getting an "Internal Server Error" returned to my browser. The error > log shows the follow

Re: CGI Problem

2001-05-02 Thread Joe McMahon
On Wed, 2 May 2001, J. Patrick Lanigan wrote: > I am getting an "Internal Server Error" returned to my browser. The error > log shows the following: > > "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] Premature end of > script headers: /path/to/filename" > > I have set the directory and

RE: CGI Problem

2001-05-02 Thread J. Patrick Lanigan
Thank you, Thank you, Thank you!! I did everything you said and it worked. So, I wanted to find out what specifically the problem was. Turns out it was the absense of the -w switch on the shebang. Thanks again, Patrick > Gary Stainburn wrote: > > Hi Patick, > > You say you've set the permission

Re: CGI Problem

2001-05-02 Thread Gary Stainburn
Hi Patick, You say you've set the permissions for the dir and the script to 755. Have you checked the permissions for the parent directories? Also, put the '-w' on the perl line, and 'use strict'. lastly, put the following line as the 1st statement in the script print STDERR "\nGot this far\n

RE: CGI Problem

2001-05-01 Thread J. Patrick Lanigan
Yeah, the CLI gave me the expected result. I am pretty stumped at this point. I have added everything to my httpd.conf that should be in there. And I am geting a different error than before, so I am confident that the file is found. Anyone have any other ideas? Thanks Jason, Patrick > jason kin

RE: CGI Problem

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >I tried them on th CLI first. I even su'ed to user nobody to >match the env of apache. and on the CLI - I presume that they outputted exactly what you expected .. ie. "Content-type: text/html Hello World! " it doesn't seem like a permissions error .. I presume

RE: CGI Problem

2001-05-01 Thread J. Patrick Lanigan
I tried them on th CLI first. I even su'ed to user nobody to match the env of apache. > King, Jason wrote: > > J. Patrick Lanigan writes .. > > > >I am getting an "Internal Server Error" returned to my > >browser. The error > >log shows the following: > > > >"[Wed May 2 00:04:39 2001] [error] [c

RE: CGI Problem

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >I am getting an "Internal Server Error" returned to my >browser. The error >log shows the following: > >"[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] >Premature end of >script headers: /path/to/filename" your scripts are very simple which would sugge

CGI Problem

2001-05-01 Thread J. Patrick Lanigan
I am getting an "Internal Server Error" returned to my browser. The error log shows the following: "[Wed May 2 00:04:39 2001] [error] [client 192.168.0.10] Premature end of script headers: /path/to/filename" I have set the directory and file to 755 and the correct ownership. I have tried a coup

Re: CGI problem, no luck so far

2001-04-20 Thread Matt Cauthorn
Pam -- this is a bit of a shot in the dark, but ensure that perl is not messing up your http header in it's buffer by using: $|=1; # This sets autoflush to flush the buffer after every print, printf and write (from the Camel). Hope it helps. We're using your Solaris and Perl versions at work wit

RE: CGI problem, no luck so far

2001-04-20 Thread blowther
when running the script through CGI or when using perl in an embeded situation. Bruce W. Lowther Micron Technology, Inc. Boise, Idaho -Original Message- From: Dan Brown [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 19, 2001 4:23 PM To: Pam Derks Cc: [EMAIL PROTECTED] Subject: Re: CGI

Re: CGI problem, no luck so far

2001-04-19 Thread Dan Brown
Is this really the exact script? The reason I ask is that you shouldn't even get as far as to get the error you present ("Premature end of script headers"). There is an extra curley brace at the end that should have caused the Perl compiler to croak with something like Unmatched right c

CGI problem, no luck so far

2001-04-19 Thread Pam Derks
Thanks all for your suggestions regarding earlier post (below): Am testing out a new web server running SunOS5.8 " and I can't get any of my cgi scripts to run. I get this error message: "Premature end of script headers" the cgi scripts worked perfectly on the old server which was running D

RE: CGI problem

2001-04-19 Thread Nutter, Mark
> Am testing out a new web server running SunOS5.8 " and I > can't get any of my cgi scripts to run. I get this error message: > "Premature end of script headers" > > the cgi scripts worked perfectly on the old server which was running Digital UNIX. In general this means your script died befor

Re: CGI problem

2001-04-19 Thread Dan Brown
I for one will need more information to diagnose this. You mention that the OS is different on the two boxes but what about the rest of the configuration? For example, is the web server on the old machine the same as on the new machine (e.g., are the web servers on both machines Apache?)? Are t

CGI problem

2001-04-19 Thread Pam Derks
Hi, Am testing out a new web server running SunOS5.8 " and I can't get any of my cgi scripts to run. I get this error message: "Premature end of script headers" the cgi scripts worked perfectly on the old server which was running Digital UNIX. any ideas? many thanks, Pam