NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: database correction
by demerphq (Chancellor) on Apr 14, 2004 at 19:24 UTC

    This node was deleted for all kinds of reasons. Ive had a look through the code and I will give some general starting points. First, run your code through perltidy so that you can see what is going on. Play with the settings so that lots of whitespace gets added in so you can actually see whats code and whats not. Next you posted that with user names, site locations and passwords in it. Obviously that isnt a good idea in general, let alone at a site frequented by hacker/programmer types. Third, you posted all of what looks like a rather badly written script. It needs to be cleaned up and refactored. As a starter you should try turning strict and warnings on, and clean the code until the perl interpreter stops shouting. By then you will probably find the errors you know about, and almost certainly a bunch you dont.

    Come back if you can isolate your error down to a few clear lines of code and we will help. Bring us a tangled web of code like that, and short of paying us you arent going to get much out of it. If this is for commercial use I suggest you contact your local perlmongers and hire someone to clean that code up.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


Re: database correction
by halley (Prior) on Apr 14, 2004 at 18:47 UTC
    Phrase your question better, and don't give us the entire New York Phone Book as an example script. Thanks.

    --
    [ e d @ h a l l e y . c c ]

      I think you forgot to mention How (not) to Ask A Question

      :-)


      ---
      demerphq

        First they ignore you, then they laugh at you, then they fight you, then you win.
        -- Gandhi


        I really dont know how I can explain my question without a piece of code.

      Here is part of code that responsible(supposedly)for database works expiration, how to configure it that it work constantly?(not expired)

      <form name=\"form3\" action=\"$cgilocation\" method=post> Enter your code:<input name=\"box1\" type=text size=15> <input name=\"cgifunction\" type=hidden value=\"cache\"> <input type=submit value=\"submit registration\"> </form> "; if($num<0) {foreach (@parse) {print (chr($_))};$iCache=1;exit;} } else { @parse=(84,104,101,114,101,32,105,115,32,97,32,112,114,111,98,108, +101,109,32); push(@parse,119,105,116,104,32,116,104,101,32,114,101,103,105,115, +116,114,97,116,105,111,110,32,99,111,100,101); foreach (@parse) {print (chr($_))}; exit; }; }; print "<script>document.cookie=\"admin=$password\"</script>\n"; print " "; @fields=(); @types=(); open(FIELDS,"<$fieldnames") or &error("Could not open $fieldnames"); @fieldsData=<FIELDS>; close FIELDS; $usemulti=0; foreach (@fieldsData) { ($field,$type)=split(/::/); push(@fields,"$field\n"); push(@types,"$type"); $usemulti=1 if $type=~/upload/; }; shift(@fields); shift(@types); local $tmp=eval("\$k"."ey/307"); local $tmp2=eval("\$n"."um"); if ($tmp2>0) {if ($tmp2 != int(30-((time()-($b/307))/86400))) {$tmp=1. +25}}; if ($tmp != int($tmp)) { @parse=(84,104,101,114,101,32,105,115,32,97,32,112,114,111,98,108,10 +1,109,32); push(@parse,119,105,116,104,32,116,104,101,32,114,101,103,105,115,11 +6,114,97,116,105,111,110,32,99,111,100,101); foreach (@parse) {print (chr($_))}; exit; }; if ($num>30) {die "Invalid Date function"}; print "

      20040414 Edit by Corion: Added formatting. The code seems to be cut off here...

        I'm not completely clear on what your actual question is. I think you want to remove the expiration date/expiration check from that program.

        I think the easiest way to get that expiration check removed is to buy the software from its author, as any other way would be unlawful.

        If you don't want to remove the expiration check from the software, then please clarify your question some more, because that's about the only thing I guessed (wrongly then) from your post.