Greetings, brothers.

Here goes my stats:

I'm using Windows 98SE, ActiveState's Perl 5.6.1 Build 631, DBI/DBD::ODBC, Xitami Webserver 2.4d9 and a Microsoft Access 2000 Database.

When I run a particular script it causes Perl to crash, generating the following Windows error (translated, since I'm not american):
PERL caused an invalid page flaw at module <unknown> in 0000:1f8fdff2. Records: EAX=01cd0094 CS=015f EIP=1f8fdff2 EFLGS=00010202 EBX=01cd0314 SS=0167 ESP=0153f89c EBP=0153f8bc ECX=00000000 DS=0167 ESI=01cd0a90 FS=3f77 EDX=8175814c ES=0167 EDI=00000001 GS=0000 Bytes in CS:EIP:
Here's the piece of code that's causing it:
if (param('action') eq "cli_definido") { #$dt_prosp = ""; $ger = ""; $cliente = param('n_cliente'); #@t=(localtime)[0..5]; #$dt_prosp=sprintf "%02u/%02u/%02u %02u:%02u:%02u",$t[3],$t[4] ++1,$t[5]+1900,$t[2],$t[1],$t[0]; $dbh = SysUtils::Connect; $sth2 = $dbh->prepare_cached("SELECT nome FROM usuarios WHERE +login='$login'"); $sth2->execute; while (@data = $sth2->fetchrow_array) { $nome_gerente = $data[0]; } $ger = "<span class=\"texto2\">$nome_gerente</span><input type +=\"hidden\" name=\"gerente\" value=\"$login\">"; $sth2->finish; $neg = "<select name=\"n_negocio\">\n<option value=\"null\" SE +LECTED>Selecione:</option>\n"; $sth3 = $dbh->prepare_cached("SELECT oportunidade, status FROM + oportunidades WHERE razao_social='$cliente' AND status NOT IN ('F',' +L')"); $sth3->execute; while (@data = $sth3->fetchrow_array) { $neg .= "<option value=\"$data[0]\">$data[0]</option>\n"; $def_status = $data[1]; } $neg .= "</select>"; $sth3->finish; $slct_status = "<select name=\"n_status\">"; $sth4 = $dbh->prepare_cached("SELECT cd_status, status FROM st +atus ORDER BY cd_status"); $sth4->execute; while (@data = $sth4->fetchrow_array) { $pos_status = $data[0]; if ($pos_status eq $def_status) { $slct_status .= "<option value=\"$pos_status\" SELECTE +D>$data[1]</option>\n"; } else { $slct_status .="<option value=\"pos_status\">$data[1]< +/option>\n"; } } $slct_status .= "</select>\n"; $sth4->finish; $n_cliente = param('n_cliente'); $cli = "<span class=\"texto2\">$n_cliente</span><input type=\" +hidden\" name=\"n_cliente\" value=\"$n_cliente\"><input type=\"hidden +\" name=\"action\" value=\"go\">"; $dbh->disconnect; print "Content-type: text/html\r\n\r\n"; open (FH,"templates/cadastro_proposta.htm") or die "Cant open +body: $!"; $body = join('',<FH>); close (FH); eval "\$body = sprintf \"%s\",<<FYNYS;\n $body\nFYNYS\n"; print $body; }
Any possibilities?

I'm really desperate here...

Thanks in advance,

Er Galvão Abbott
a.k.a. Lobo, DaWolf
Webdeveloper


PS1: I know that I should use strict. Please be kind to not flame me on this right now. I need help.

PS2: I used <code>-w<code> and all I got were the original "non-fatal" warnings - like possible typos and stuff.

PS3: PLEASE HELP ME.

In reply to ActivePerl is crashing when running a script! by DaWolf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.