From: | Frank Bax <fbax(at)sympatico(dot)ca> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: calling perl program within a cgi script with |
Date: | 2005-04-26 14:03:15 |
Message-ID: | 5.2.1.1.0.20050426095922.03b29650@pop6.sympatico.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
At 09:25 AM 4/26/05, Deepblues wrote:
>I have a problem linking my cgi script to the perl function.
>I have perl functions to perform manipulations to the database.
>I am creating a web front end to it. I have a html form which accepts data
>from the user and calls the cgi script ( in perl)which processes this data
>, performs validation and passes the form data as parameters to a perl
>program. My cgi script seems to work fine as far as processinng goes. My
>perl program works too. But I am not able to call the perl program from
>the cgi script. I am tryin to test the main perl program by having lots of
>HTML output statements. but it doesn't appear on the webpage.
>
>suppose my form values are stored in variables
>$a = param('name')
>$b = param('age')
>
>Now I need to call a perl function wth $a, $b as parameters.
>My $string = "perl test.pl $a $b"
>system($string)
>
>This is wht I am using now. when I try eg: perl test.pl john 12 It
>works. And the variables are bnided properly in cgi script. I cheked to
>make sure. Can anyone suggest how i should proceed.
>
>Thanks in advance
>Deepblues
An error message from your logs would have been helpful; otherwise its just
guessing. In fact, if you had bothered to read your log files, you likely
could have figured it out yourself. As long as I bother to reply, I might
as well guess at an answer. My guess is that test.pl is not found in the
"current directory" when your cgi is executed from within webserver. Try
specifying full path.
From | Date | Subject | |
---|---|---|---|
Next Message | Bendik R.Johansen | 2005-04-26 14:15:09 | Encoding woes |
Previous Message | Sean Davis | 2005-04-26 13:49:28 | Re: calling perl program within a cgi script with parameters from html form |