Lunarpages Web Hosting Forum

Author Topic: $token =get perl HTTP 500 Error  (Read 2732 times)

Offline Mowse

  • Newbie
  • *
  • Posts: 3
$token =get perl HTTP 500 Error
« on: August 28, 2003, 06:57:42 AM »
Receiving HTTP 500 error on following perl script.  The file "search.pl"  is in our cgi-bin directory with Ch mod = 755 & was uploaded as ascii.  

Would appreciate any help on this, for if we can't get this work in perl or php we will not be able to stay with lunarpages :-(  This is my first experience with perl, so try to keep it simple.  FYI: Our "pid" has been defined on the remote token registry as is our lunar server IP.

Also, although I am receiving 500 error, I see nothing in my Error Log. It just says "nolog.html".  Know of way to get add'l clues on what's happen'g?  TIA Mowse

#!/usr/bin/perl -w

use LWP::Simple;

$token = get("http://token.blahblah.com/TokenInit.asp?pid=99");

print <<END_of_HTML;

print Content-type: text/html\n\n";

<html>
<head>
<title>Blah Realty, Inc. - Search for a Home</title>
</head>


<frameset rows="187,*" framespacing="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main" src="http://blahblah.lunarpages.com/searchhead.html" marginwidth="0" marginheight="0">
<frame name="main" src="http://blablah/templates/search_form.asp?sec=$token"> marginwidth="0" marginheight="0" scrolling="auto" noresize>
<noframes>
<body topmargin="0" leftmargin="0">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

END_of_HTML

stephan

  • Guest
$token =get perl HTTP 500 Error
« Reply #1 on: August 28, 2003, 09:53:13 AM »
If you need your error log, please e-mail support@lunarpages.com

We can make it create an error log file in your root d irectory.

If you need more help with this, in general, please e-mail us at support@lunarpages.com

Try taking out commands, bit by bit, and see which line is causing the error.

Offline StephanieŽ

  • Master Jedi
  • *****
  • Posts: 1090
$token =get perl HTTP 500 Error
« Reply #2 on: August 28, 2003, 01:30:24 PM »
Hi Mowse,

actually looking at that you are missing a string terminator at the end of the script.

Try
Code: [Select]
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);

use LWP::Simple;

$token = get("http://token.blahblah.com/TokenInit.asp?pid=99");

print <<END_of_HTML;

print Content-type: text/html\n\n";

<html>
<head>
<title>Blah Realty, Inc. - Search for a Home</title>
</head>


<frameset rows="187,*" framespacing="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main" src="http://blahblah.lunarpages.com/searchhead.html" marginwidth="0" marginheight="0">
<frame name="main" src="http://blablah/templates/search_form.asp?sec=$token"> marginwidth="0" marginheight="0" scrolling="auto" noresize>
<noframes>
<body topmargin="0" leftmargin="0">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

END_of_HTML
;


A good debug line for a perl script is to replace your top line with this.

Code: [Select]
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);


Run the script and it will print out the main errors in the browser for you.

Failing that, as Stephan said, we can place your error logs in a top level folder of your account :)