using LWP:UserAgent under htaccess

D

dan baker

I have a script that checks incoming fields from a form, and if I have
a problem, I'd like to load up a couple parameters and POST to another
script... I cant just print a Location:.... redirect because a couple
of the fields can be fairly long and I dont really want it to show up
in the browser Location window.

Both scripts are in a cgi-bin that is htaccess protected.

I can get this working fine outside htaccess, but am getting a cryptic
"server 500" error when I attempt to run in under htaccess. Nothing
usefull in the error log that I could see.

Is there something major I am missing? Here is a snippet where it
seems to be breaking:

# check format of MRN entered

$tempStatus = &FormatIsMRN($PatientMRN) ;
if ( $tempStatus ) {
$PatientMRN = $tempStatus ; # used cleaned up value returned
}else{

$ua = LWP::UserAgent->new ;
$req = POST $cfgAbsPath_top2cgi.'UI_Home.pl',
[
HTML_StartNewOrderError => $HTML_ErrorMsg ,
PatientMRN => $PatientMRN
] ;

# prints direct to browser
print $ua->request($req)->as_string;
exit;
}


thanks,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top