I have just transferred a site over to a new server. The perl scripts were working just fine on the old server and now it seems to be having issues and outputting the header content to the screen.

When I fill out a login form that gets send to the script (below) I receive the following error:

Set-Cookie: loggedin=confirmed; path=/; expires=Mon, 07-Dec-2009 07:56:19 GMT Date: Mon, 07 Dec 2009 07:46:19 GMT Refresh: 1, https://www.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=list Content-Type: text/html; charset=ISO-8859-1


Below is the code for the script

use CGI;
$q = new CGI;


if (!$q->cookie('loggedin')) {


if ($q->param('username') eq "XXXX" && $q->param
('password') eq "XXXX") {


if ($q->param('action') && $q->param('id')) {
$action = $q->param('action');
$id = $q->param('id');


$cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', -expires => '+10m');

print $q->header(-cookie => $cookie, -refresh => "1, https://www.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=$action&id=$id");


} elsif ($q->param('action')) {

$action = $q->param('action');

$cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', -expires => '+10m');

print $q->header(-cookie => $cookie, -refresh => "1, https://www.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=$action");

} else {

$cookie = $q->cookie(-name => 'loggedin', -value => 'confirmed', -expires => '+10m');

print $q->header(-cookie => $cookie, -refresh => '1, https://www.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl?action=list');



}
}

} else {

print $q->redirect('https://www.mydomain.com/EAM/cgi-bin/admin/messageadmin.pl');

}

I'm in a real bind and I have no perl experience. Any help would be greatly appreciated.

Many thanks

Lee

This article has been dead for over six months. Start a new discussion instead.