Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: CGI from another script

by kutsu (Priest)
on Sep 02, 2005 at 15:41 UTC ( #488686=note: print w/replies, xml ) Need Help??


in reply to CGI from another script

that is a valid way to call a cgi script from the command line so we'd need to see "some_script.cgi" to be able to tell why it's not working.

On another note, are you calling this second cgi script with backticks? I've never seen this as a good idea - everytime it's either needed changed into a module, called with a form, or ran using a redirect. So if you could give your reason for using backticks maybe we could find a better solution.

"Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce

Replies are listed 'Best First'.
Re^2: CGI from another script
by rsiedl (Friar) on Sep 03, 2005 at 06:41 UTC
    Hi, thanks for your reply.

    I'm not sure I follow what you mean by "everytime it's either needed changed into a module, called with a form, or ran using a redirect".

    Isnt backtick and system() both the same, or are you saying its a bad idea to use either of these fullstop?

    The reason I am using this method is because I have some scripts which i need the output from. Ideally I want to rewrite them in module format but at the moment dont have the time.

      backticks and system are not the same (seeing as you want to capture the output backticks is proably what you want) but yes using system or backticks always opens up a potential security hole anytime it's used (not to say it can't be closed).

      The main point is that a cgi script where a module is needed is confusing and harder to maintain - I just wanted to make sure you were aware of this. Though make sure the script is read-only as you are calling it with 'perl ...' and this will prevent it from being called through the webserver.

      "Cogito cogito ergo cogito sum - I think that I think, therefore I think that I am." Ambrose Bierce

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://488686]
help
Chatterbox?
[Lady_Aleena]: I don't know what to tell you. I can barely get my Linux machine to do things I want.
[Discipulus]: if DE or WM means desktop env and win manager.. no, not an option
[Lady_Aleena]: That's what they mean, at least to me. 8)
[Discipulus]: in the first attempt i failed, with an not usable v-machine.. ;=)
[Discipulus]: but then discovered a registry trick to do before the physical2virtual migration
[Lady_Aleena]: Sounds like a headache.
[Discipulus]: a bit shaggy.. every atttempt is ~4hours to virtualize and 1-2hours to kick the big file to boot..
[Lady_Aleena]: Ouch...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2017-05-22 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?