[12579] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6178 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 30 14:07:28 1999

Date: Wed, 30 Jun 99 11:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 30 Jun 1999     Volume: 8 Number: 6178

Today's topics:
        ==>  Help! LWP Troubles <== <khowe@performance-net.com>
        admininterface <kenny@weng.dk>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 30 Jun 1999 13:26:14 -0300
From: "Kevin Howe" <khowe@performance-net.com>
Subject: ==>  Help! LWP Troubles <==
Message-Id: <Ztre3.44536$%65.110546@tor-nn1.netcom.ca>

I am having trouble with a simple LWP script, which posts some variables to
a .pl file (that simply prints the submitted name=value pairs) and retreives
the results. It works fine on and NT server, but not on a UNIX server.

When I run the syntax check I get this error:

Ambiguous use of POST => resolved to "POST" => at
/virtualhosts/missultimate.com//www/cgi-bin/members/test.pl line 39.

line 39 ==>    my $req = new HTTP::Request POST => $post_url;

I have tried quoting the POST qw(POST => $post_url). This makes the error
message go away, but the script still doesn't work.

Can anyone tell me what I might be doing wrong?

Thanks,
Kevin

THE SCRIPT
-------------------------------

#!/usr/bin/perl

## vars ############################
$IN = "kevin=howe&angela=deburger";
$post_url="http://kevin/cgi-bin/1_autopost/back/post_here.pl";

## program ############################
 &post;

sub post{
 use HTTP::Request::Common qw(POST);
 use LWP::UserAgent;
 my $ua = new LWP::UserAgent;

 # Create a request
 my $req = new HTTP::Request POST => $post_url;
 $req->content_type('application/x-www-form-urlencoded');
 $req->content($IN);

  print "Content-type: text/html";
 print $ua->request($req)->as_string;
}





------------------------------

Date: Wed, 30 Jun 1999 19:07:28 +0200
From: "Kenny Weng" <kenny@weng.dk>
Subject: admininterface
Message-Id: <7ldiqj$skk$1@news1.tele.dk>

How do I configure a script to run as root and
write files as root, when running Apache as Nobody?

I have tried using #!/usr/bin/suidperl and chmod +s script.cgi
but it does not seem to work.

I'm running Red Hat 5.2 width no modifications.

Kenny






------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 6178
**************************************

home help back first fref pref prev next nref lref last post