[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Debugging perl (about the thread "Server Hacked?")



Ahoy Ariel

My mistake.

So why not send the same advice to your users? In fact, why not
insist upon it?

Here's why:

Years ago, when I myself was "some user who's not a programmer",
I stayed up late poring over my brand-new Perl book, trying to write
a script. Around midnight, I installed something like this:

$ii = 100;
$i = 0;
while($i < $ii) {
  &DoSomething;
}
$i++;
&SendAWebPage;


I pumped it up to my web space, gave it permission, and fired it off.
I got no response. So I punched it again. And again. Pored over
the script. Tried again. Finally, I moved the curly bracket to come after
the $i++, and everything worked. SendAWebPage sent me one. Happy
day. I went to bed content.

Along about 3 am, the sysadmin's pager went off. &DoSomething
was gobbling up 98% of system resources.

If you encourage users to debug their scripts on the server, this
sort of thing is bound to happen to you. When you say that  "The
best way to debug a perl program is running it from the shell", I
strongly disagree. Especially if they do not have shell access.
Without that, how would they kill a runaway process even if they
knew how to?

Aloha



>[...]
>>>reason to give telnet access to the users, so: Is there any way to get
the
>>>errors of the perl script on the browser? Maybe using #!/usr/bin/perl
>
>>Ariel, two suggestions, equally important:
>>1) Be prepared
>[...]
>>2) Be careful
>[...]
>
>I'm not talking about me (I have linux machines all over the place), I'm
>talking about some user who's not a programmer, and is trying to run a perl
>script on the server, and find out it's not just uploading. The best way to
>debug a perl program is running it from the shell, but I don't want to give
>the user telnet access.. So I'm looking for a way to debug perl programs
>using the browser..
>
>Bye..
>
>Ariel.
>
>
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>http://list.cobalt.com/mailman/listinfo/cobalt-users
>