> -Original Message-
> From: David Zhuo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 1:41 PM
> To: Bob Showalter
> Cc: [EMAIL PROTECTED]
> Subject: RE: Help!! Retrieving Image File
>
>
> On Wed, 2002-08-21 at 10:44, Bob Showalter wrote:
> > > -Original Message-
>
On Wed, 2002-08-21 at 10:44, Bob Showalter wrote:
> > -Original Message-
> > From: David Zhuo [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 21, 2002 1:12 PM
> > To: Connie Chan
> > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list
> > Subject: Re: Help!! Retrieving Image
> -Original Message-
> From: David Zhuo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 1:12 PM
> To: Connie Chan
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; cgi mailing list
> Subject: Re: Help!! Retrieving Image File
>
>
> where do you get the impression that \n\n is for
where do you get the impression that \n\n is for text file and \r\n\r\n
is for binary data??? did you get that somewhere? \r\n\r\n is OS
specific but \n\n is portable. does Win32 and UNIX-ish use the same
crlf? your best beat is to use \n\n where Perl will
translate(transparently in the background
[.]
>
> #!/usr/local/bin/perl -w
> use strict;
>
> open IMAGE, 'test.jpg' or die "Failed to open image $!";
> my $buf_chunk_size = 1024 * 16;
> my $buffer;
> binmode IMAGE;
> binmode STDOUT;
>
> print "Content-Type: image/jpeg\n\n";
> print $buffer while read IMAGE, $buffer, $buf_chunk_siz
>
> we all know already, what it looks like, when we have a form like
> this:
>
>
>
>
>
>
>
> will be this as a link:
> http://bla.net/cgi-bin/blabla.cgi?AREA=1&EXT=bla
For upload file, you need to make the method by POST,
AND, you have to add enctyp
you need to send the enc_type...
I have an OLD, but still halfway decent tutorial at:
http://www.webreview.com/1998/08_14/developers/08_14_98_3.shtml
Brent
At 05:56 PM 08/21/02 +0800, Connie Chan wrote:
>No... I believe. I've digging on this topic for very very long
>time on my Win32, Sambar and Apache server.
>
>I can't print any image out without \r\n\r\n, where \n\n is for
>text file only. Why? I don't know =) Guess, because \r\n is for
>*binmod
On Wednesday, August 21, 2002, at 05:34 , Bob Showalter wrote:
[..]
>
> Check for DOS line endings (CR/LF) on the script. Perl won't care, but the
> kernel will kvetch if it sees
>
>#!/usr/bin/perl^M
>
the really scary part is that had it been say
#!/usr/bin/perl -w^M
perl would ha
Hi,
we all know already, what it looks like, when we have a form like
this:
will be this as a link:
http://bla.net/cgi-bin/blabla.cgi?AREA=1&EXT=bla
ok but, what does it look link, when we are uploading a FILE?
my goal is it to log in my we
it's ok, it was written on windoze so it had the ^M in it. dos2unix'd it
and it works fine.
On Wed, Aug 21, 2002 at 09:14:14AM -0400, zentara wrote:
> On Wed, 21 Aug 2002 09:51:09 +0100, [EMAIL PROTECTED] (Mat
> Harris) wrote:
>
> >why, when i try to run one of my cgi scripts do i get a "bad
> >
On Wed, 21 Aug 2002 09:51:09 +0100, [EMAIL PROTECTED] (Mat
Harris) wrote:
>why, when i try to run one of my cgi scripts do i get a "bad
>interpreter, file not found" error? my shebang line is correct and works
>for every other perl script i run on that server. btw the script in
>question is the i
On Wed, 21 Aug 2002 17:08:18 +0800, [EMAIL PROTECTED] (Connie Chan)
wrote:
>#! /usr/local/bin/perl
>use strict;
>
>my $version = &do_sth_detect_browser_ver();
>my $page = 'surly.cgi';
>if ($version <= 4) { $page = 'tipsy.cgi' }
>
>print "Content-type: text/html\n";
You shouldn't print the regular
thanks, that was it. the fact that it came as a windows zip should have
given it away instantly.
thanks
On Wed, Aug 21, 2002 at 08:34:39 -0400, Bob Showalter wrote:
> > -Original Message-
> > From: Mat Harris [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 21, 2002 4:51 AM
> > To
> -Original Message-
> From: Mat Harris [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 21, 2002 4:51 AM
> To: [EMAIL PROTECTED]
> Subject: bad interpreter
>
>
> why, when i try to run one of my cgi scripts do i get a "bad
> interpreter, file not found" error? my shebang line is
>
No... I believe. I've digging on this topic for very very long
time on my Win32, Sambar and Apache server.
I can't print any image out without \r\n\r\n, where \n\n is for
text file only. Why? I don't know =) Guess, because \r\n is for
*binmoded data*.
And without binmode STDOUT and IMAGE both.
Emm... I think this mail would better go to CGI list ...
[...]
>
>
> #! /usr/local/bin/perl
>
> print "Content-type: text/html\n\n";
>
> if ($ENV{'HTTP_USER_AGENT'} =~ /Mozilla 4/
> and not $ENV{'HTTP_USER_AGENT'} =~ /compatible/i ) {
> print ;
> } else {
> print ;
> }
>
>
How a
why, when i try to run one of my cgi scripts do i get a "bad
interpreter, file not found" error? my shebang line is correct and works
for every other perl script i run on that server. btw the script in
question is the ikonboard forum solution from www.ikonboard.com. does
anyone know of any bugs wi
18 matches
Mail list logo