[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-web
Subject:    continued - calling a cgi program from perl
From:       "Tobias Beuving" <tobias () gadgets ! nl>
Date:       2001-08-22 21:56:46
[Download RAW message or body]

Hi all!

(Forgive me for using caps here and there, but my mail got so long that I
wanted to add a more reader friendly touch to it.)

FIRST:
Thanks a lot everybody for you replies on my question: Calling a cgi program
from perl Using activePerl, windows2000 and apache!!! I felt less lost
working on this weird case :-)

On your suggestions I tried:
- backquoting
- system
- exec
- do
(amongst may more things that didn't make sense at all :-) but none of them
work from my browser.
If I run the perl script from the (NT) command line it works without
complaining.

I previously tried to do the same using plain php, but there I couldn't
succeed neither, and I think that I got stuck at about the same point.

MORE DETAILED PROBLEM DESCRIPTION:
I try to describe my problem a bit more detailed:
I want to do something 'behind the screens' :
I want to convert jpg's into flash (.swf) files using the swift-generator
which is a cgi program.
So, I have the user on an html-page upload a jpg from his harddisk to the
server.
When it arrived there I want to make a flash file of the jpg.
What I do not want is the user to notice anything about this process but
just having feedback like: "conversion Ok" or something else that indicates
the procedure completed.
If I use the generator from the url, like:
http://localhost/generator/swift-generator.cgi?sws=imageconverter.sws
it works, but . . .I cannot escape from the feedback of the cgi program
which is the returning of the flashmovie that it created.

So I dont want 2 things:
- no flashmovie back from the cgi program
- and (to the user) invisible processing

Therefore I thought, I could indeed - like most of you guys mentioned- do
something like:

  exec("cmd /c \"d:\\www\\generator\\swiftgenerator.cgi
d:\\imageconverter.sws\"");
  system("cmd /c \"d:\\www\\generator\\swiftgenerator.cgi
d:\\imageconverter.sws\"");
  `cmd /c \"d:\\www\\generator\\swiftgenerator.cgi
d:\\imageconverter.sws\"`;

they all work from the command line, but not from the browser . . .

BATCH FILE:
I even tried calling a batchfile:
do.bat:
d:\www\generator\swiftgenerator.cgi d:\imageconverter.sws

and then with perl:
  `d:\\perl\\eg\\do.bat`;

But there the same, it works from the commandline, but not from the browser.

Aaaaarrggghhhh

FINALLY:
For those of you still reading :-)

Now I am thinking that it might be a security issue, that perhaps apache is
restricting the use of cgi's like this???


Anybody? I am totally puzzled,

Tobias


*   *   *     *      *       *        *         *          *           *
*
*  Tobias Beuving
*  g a d g e t s    m e d i a
*  http://www.gadgets.nl
*   *   *     *      *       *        *         *          *           *
*

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic