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
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
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
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, "(
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
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/
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
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
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?/
>
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
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
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
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
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
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
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
---
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
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
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]
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
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
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
==
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
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
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
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
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
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
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
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
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
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
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
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
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
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
> 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
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
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
39 matches
Mail list logo