RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
From: Mumia W. [mailto:[EMAIL PROTECTED] >> Go into sudoers and replace the name of the binary with the name of a >> script that echoes the real and effective user and group ids. Thanks Mumia, and thanks to all who responded. As it turns out, I was able to resolve the problem by replacing '/bin

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Mumia W.
On 10/05/2006 07:10 PM, RICHARD FERNANDEZ wrote: From: Mumia W. [mailto:[EMAIL PROTECTED] Does the webserver have the proper permissions to invoke that sudo entry? AFAIK, yes. I don't think it would be asking for a password if it couldn't run the binary. It just doesn't seem to be pulling

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
-Original Message- From: Igor Sutton [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 8:17 PM To: RICHARD FERNANDEZ Cc: Beginners List Subject: Re: Can't get Sudo.pm to run my command but it works from a prompt > Looks like this may not, strictly speaking, be a Perl question

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Igor Sutton
Looks like this may not, strictly speaking, be a Perl question any more, but can anyone point me in the right direction? I can definitely run things out of cgi-bin, otherwise I wouldn't have gotten this far. Most times, apache uses nobody or www user. Check if the user apache uses is mention

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
From: Mumia W. [mailto:[EMAIL PROTECTED] > Does the webserver have the proper permissions to invoke that sudo entry? AFAIK, yes. I don't think it would be asking for a password if it couldn't run the binary. It just doesn't seem to be pulling the right entry (webuser) out of the sudoers file,

Re: Parsing HEX Snoop Dump

2006-10-05 Thread Chris Charley
- Original Message - From: <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Monday, October 02, 2006 10:33 AM Subject: Parsing HEX Snoop Dump I'm trying to parse a huge (~2-5MB) Snoop dump from our servers. The output is below: 15:44:14.57313 199.117.205.249 -> s31

Re: CGI bug

2006-10-05 Thread Rob Dixon
Jeremy Kister wrote: > > Using an older (unknown version) and brand new (3.25) CGI, I have been > able to demonstrate a simple bug: > > use strict; > use CGI qw(:standard); > > my $q = new CGI(); > > my $x = $q->param('x'); > my $y = ($x + 1); > > print $q->header(), $q->start_html(), > $q->

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Mumia W.
On 10/05/2006 03:23 PM, RICHARD FERNANDEZ wrote: if the user has never signed in and the admin never ran passwd user passwd -f user and then that user never went into make his/her password permenant then yes it would matter b/c the passwd is not set. I've gone in and set a passwd for the u

Re: about PXPerl

2006-10-05 Thread chen li
--- "D. Bolliger" <[EMAIL PROTECTED]> wrote: >> > I recenlty install PXPerl on my window xp. The > > documentations come with perl6 bible stuff. Out > of > > curiosity I read some of the object section and > data > > type/variable in Perl 6. It looks like we have to > > predeclare a lot of type

Re: CGI bug

2006-10-05 Thread John W. Krahn
Jeremy Kister wrote: > Using an older (unknown version) and brand new (3.25) CGI, I have been > able to demonstrate a simple bug: There is a beginners-cgi list that deals with Perl and CGI issues: http://lists.cpan.org/showlist.cgi?name=beginners-cgi And if you are reporting a bug in CGI: perldo

CGI bug

2006-10-05 Thread Jeremy Kister
Using an older (unknown version) and brand new (3.25) CGI, I have been able to demonstrate a simple bug: use strict; use CGI qw(:standard); my $q = new CGI(); my $x = $q->param('x'); my $y = ($x + 1); print $q->header(), $q->start_html(), $q->hidden('x',$y), "\n", $q->hidden('a',$

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
> if the user has never signed in and the admin never ran > passwd user passwd -f user and then that user never went into > make his/her password permenant then yes it would matter b/c > the passwd is not set. > I've gone in and set a passwd for the user. Then I actually logged in as the user

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
--- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > > Did you edit the sudoers file using visudo -f > "file" > > Yes. > > > Show us the sudoers file using cat -etu "file". > > # cat -etu /usr/local/etc/sudoers > > /tmp/sudoers.richf > # less /tmp/sudoers.richf > # sudoers file. > # > # This file

RE: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
> Did you edit the sudoers file using visudo -f "file" Yes. > Show us the sudoers file using cat -etu "file". # cat -etu /usr/local/etc/sudoers > /tmp/sudoers.richf # less /tmp/sudoers.richf # sudoers file. # # This file MUST be edited with the 'visudo' command as root. # User privilege specif

Re: Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread Derek B. Smith
-- RICHARD FERNANDEZ <[EMAIL PROTECTED]> wrote: > Hi folks, > > I have the following in a CGI script: > > > When this code gets run (via webpage) I get the > following in the > error_log: > > > > output: > > result: 256 > > STDOUT: > STDERR: > We trust you have received the usual lectu

Can't get Sudo.pm to run my command but it works from a prompt

2006-10-05 Thread RICHARD FERNANDEZ
Hi folks, I have the following in a CGI script: my $replace = Sudo->new( { sudo => $sudo, debug => 3, username => 'root', program => '/bin/cp',

Re: regexp inside hashes

2006-10-05 Thread John W. Krahn
Jay Savage wrote: > On 10/4/06, John W. Krahn <[EMAIL PROTECTED]> wrote: >> Michael Alipio wrote: >> >> > Now, my goal is to adapt that code, particularly >> > obtaining only Start, IP, User. However, those three >> > targets are not anymore located at the beginning of a >> > line. >> > >> > "Start

Re: perltidy and -w flag

2006-10-05 Thread Jay Savage
Michael, Thanks for the suggestions, but I'm actually pretty happy with what I have. I've used BBedit, and I prefer TextMate on the whole. It has most of the same features, but I like the implementation better. When I need a full-featured IDE, I use Komodo, which is nice because it runs on all th

RE: an easy way to know if a module is installed or not

2006-10-05 Thread Johnson, Reginald \(GTI\)
-Original Message- From: Chad Perrin [mailto:[EMAIL PROTECTED] Sent: Thursday, October 05, 2006 1:11 PM To: beginners@perl.org Subject: Re: an easy way to know if a module is installed or not On Thu, Oct 05, 2006 at 12:34:18PM -0400, Johnson, Reginald (GTI) wrote: > To piggy back off of

Re: about PXPerl

2006-10-05 Thread D. Bolliger
chen li am Donnerstag, 5. Oktober 2006 14:13: > Hi all, > > I recenlty install PXPerl on my window xp. The > documentations come with perl6 bible stuff. Out of > curiosity I read some of the object section and data > type/variable in Perl 6. It looks like we have to > predeclare a lot of types of

Re: an easy way to know if a module is installed or not

2006-10-05 Thread Mumia W.
On 10/05/2006 11:34 AM, Johnson, Reginald (GTI) wrote: To piggy back off of this question... Is there a way to just list out the modules you have installed? Make sure that perldoc is installed on your system and do this at a command prompt: perldoc -q installed -- To unsubscribe, e-mail:

Re: an easy way to know if a module is installed or not

2006-10-05 Thread Chad Perrin
On Thu, Oct 05, 2006 at 12:34:18PM -0400, Johnson, Reginald (GTI) wrote: > To piggy back off of this question... Is there a way to just list out > the modules you have installed? This works for me: #!/usr/bin/perl -l use strict; use warnings; use File::Find 'find'; use File::Spec::Func

Re: Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Chad Perrin
On Thu, Oct 05, 2006 at 10:35:09AM -0500, Mumia W. wrote: > On 10/05/2006 09:48 AM, Chad Perrin wrote: > >On Thu, Oct 05, 2006 at 09:06:11AM -0500, Mumia W. wrote: > >>> > >>Perhaps you could look at the problem in reverse. Strip out all > >>characters that are not in a certain set; e.g., you migh

gsm mms, how to parse mms message

2006-10-05 Thread Perlguru
hi, Does anybody know structure of mms cgi-handshake? I would like to now what variables I should to parse. I'd like to save the received message to binary file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: an easy way to know if a module is installed or not

2006-10-05 Thread Johnson, Reginald \(GTI\)
To piggy back off of this question... Is there a way to just list out the modules you have installed? -Original Message- From: Mug [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 04, 2006 11:24 PM To: zhihua li Cc: beginners@perl.org Subject: Re: an easy way to know if a module is inst

perltidy and -w flag

2006-10-05 Thread Jay Savage
I've recently started using TextMaker to edit my Perl scripts after many years of Emacs. On the whole I'm happy, but one thing really bugs me: styling. I've never really used perltidy before--Emacs perl-mode and cperl-mode have done everything I wanted. TextMate, though, uses perltidy internally.

Re: Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Mumia W.
On 10/05/2006 09:48 AM, Chad Perrin wrote: On Thu, Oct 05, 2006 at 09:06:11AM -0500, Mumia W. wrote: On 10/05/2006 08:47 AM, Kevin Old wrote: Hello everyone, I have a set of web based admin tools that users in my company use to update various pieces of a website. I've never been able to write

ignore

2006-10-05 Thread Johnson, Reginald \(GTI\)
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. h

Re: an easy way to know if a module is installed or not

2006-10-05 Thread Greg Sabino Mullane
On Thu, 2006-10-05 at 02:49 +, zhihua li wrote: > I've a question about installed modules in perl. To get an idea as to > weather or not a specific module (say A.pm) is present in my perl I can If you are using bash, here's a handy alias I made you can put in your .bashrc file: alias modv

Re: an easy way to know if a module is installed or not

2006-10-05 Thread Tom Phoenix
On 10/4/06, zhihua li <[EMAIL PROTECTED]> wrote: Can I browse or even search through all the modules already installed in perl directly instead of do the search? You could use Inside: http://search.cpan.org/~phoenix/Inside-1.01/ Hope this helps! --Tom Phoenix Stonehenge Perl Training --

Re: Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Chad Perrin
On Thu, Oct 05, 2006 at 09:06:11AM -0500, Mumia W. wrote: > On 10/05/2006 08:47 AM, Kevin Old wrote: > >Hello everyone, > > > >I have a set of web based admin tools that users in my company use to > >update various pieces of a website. I've never been able to write > >enough regexes, "clean routin

Re: regexp inside hashes

2006-10-05 Thread Jay Savage
On 10/4/06, John W. Krahn <[EMAIL PROTECTED]> wrote: Michael Alipio wrote: > Hi, Hello, [ snip ] > Now, my goal is to adapt that code, particularly > obtaining only Start, IP, User. However, those three > targets are not anymore located at the beginning of a > line. > > "Start" is the date=.ti

Re: Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Mumia W.
On 10/05/2006 08:47 AM, Kevin Old wrote: Hello everyone, I have a set of web based admin tools that users in my company use to update various pieces of a website. I've never been able to write enough regexes, "clean routines", etc. to clean out all of the "bad characters" that users put in. Th

Re: Is that possible to tie print ?

2006-10-05 Thread Peter Scott
On Thu, 05 Oct 2006 10:43:38 +0800, Mug wrote: > I have a module that converts Chinese text between Big5 and GB2312. > and I have write my own /PrintCh() /as an exported sub. > > However, I am looking for more, can I silently /tie print() /or /tie > STDOUT / > something ? and whenever I /print()/

Cleaning smart quotes, etc from data pasted to a form

2006-10-05 Thread Kevin Old
Hello everyone, I have a set of web based admin tools that users in my company use to update various pieces of a website. I've never been able to write enough regexes, "clean routines", etc. to clean out all of the "bad characters" that users put in. The big culprit is of course, good ole cut a

about PXPerl

2006-10-05 Thread chen li
Hi all, I recenlty install PXPerl on my window xp. The documentations come with perl6 bible stuff. Out of curiosity I read some of the object section and data type/variable in Perl 6. It looks like we have to predeclare a lot of types of variables before we can use them, just like those in JAVA.

Re: Imlib2 Module install failure problem

2006-10-05 Thread Igor Sutton
2006/10/5, Raphael Brunner <[EMAIL PROTECTED]>: Thanks for your tip, but how can i reinstall this module? in the perl-shell show the command "help" only install etc, but nothing to reinstall. And if I choose install, then it says: it is always on the newest version... Open your CPAN shell, th

Re: Imlib2 Module install failure problem

2006-10-05 Thread Raphael Brunner
Thanks for your tip, but how can i reinstall this module? in the perl-shell show the command "help" only install etc, but nothing to reinstall. And if I choose install, then it says: it is always on the newest version... Sorry this question. :-( Thanks a lot! Raphael On Wed, Oct 04, 2006 at 07:

Re: extract URLs..

2006-10-05 Thread John W. Krahn
Alexandru Maximciuc wrote: > > Thursday, October 5, 2006, 9:11:44 AM, you wrote: > >>Thursday, October 5, 2006, 8:40:19 AM, you wrote: > >>>Alexandru Maximciuc wrote: > could somebody point me to _the_perfect_ regexp for extracting an url? I need to get all the urls from a set of files(