[17623] in Perl-Users-Digest
Perl-Users Digest, Issue: 5043 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 6 06:06:16 2000
Date: Wed, 6 Dec 2000 03:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <976100711-v9-i5043@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 6 Dec 2000 Volume: 9 Number: 5043
Today's topics:
Re: A sort of another color -- a Tale, not a question ; <nospam@nospam.com>
Re: do u get fed up with regexp <xerxes_2k@my-deja.com>
Re: how to check if there is text in an input text fiel (Helgi Briem)
Re: how to check if there is text in an input text fiel (Rafael Garcia-Suarez)
How to set the write permission of Perlscript ()
How to write a packet sniffer for win32 (TCP Packets) <patrick.steiner@alcatel.ch>
Re: kill and security (suid) (Anno Siegel)
Re: kill and security (suid) (Rafael Garcia-Suarez)
Re: kill and security (suid) (Anno Siegel)
Re: kill and security (suid) (Rafael Garcia-Suarez)
Re: kill and security (suid) (Anno Siegel)
Re: Lost in a sea of obfuscation... (David H. Adler)
Re: Lost in a sea of obfuscation... (Logan Shaw)
mail ??? <Per-fredrik.Pollnow@epk.ericsson.se>
Re: mail ??? (Rafael Garcia-Suarez)
Re: mail ??? <schneider@xtewa.de>
Re: MUMPS module alichambers@madasafish.com
Need help with Http{referrer} (Loans2001)
Net::SSLeay <someone@compugenx.com>
Re: Netscape, Apache, Perl and Oracle mtaluc@my-deja.com
Re: Perl Illiterate (Logan Shaw)
Re: Perl Illiterate (Eric Bohlman)
Re: Perl Illiterate <David.Hiskiyahu@alcatel.be>
Re: Problem creating DBM database (Flint Slacker)
Re: Problem with split using | (Logan Shaw)
Re: progress of upload using multipart/form-data yaronn@my-deja.com
Re: Protecting my Perl script? (Tad McClellan)
Re: R: print, CGI and socket! (Anno Siegel)
Re: R: print, CGI and socket! nobull@mail.com
simulating htaccess <dontspamme@awdang.com>
Sockets in CGI alrashedf@my-deja.com
Sockets in CGI alrashedf@my-deja.com
Re: Sockets in CGI <schneider@xtewa.de>
Re: Sockets in CGI <schneider@xtewa.de>
Re: tie()ing an entire namespace <rick.delaney@home.com>
Re: which linux for Perl 5.6? <dela@nospam.ukonline.co.uk>
Re: Willing to review a 90 line Perl program? <philipg@atl.mediaone.net>
Re: Zip files in a directory by zipping directory <jochen@c-lab.de>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 Dec 2000 10:55:40 GMT
From: The WebDragon <nospam@nospam.com>
Subject: Re: A sort of another color -- a Tale, not a question ;)
Message-Id: <90l5vc$9sd$0@216.155.32.166>
In article <2lcX5.77$T3.170845184@news.frii.net>,
cfedde@fedde.littleton.co.us (Chris Fedde) wrote:
| Do you need to sort the 'huge body of data' each time that it is
| accessed? If you write out the 'manufactured key' array as a flat
| file can it be re-loaded faster than it can be regenerated?
|
Yes, I need to sort through it each time, for two reasons:
one, I can't pre-add the sortkey to the datafile in advance simply
because (if you look) you will see that the sort key is created
differently depending on whether I sort by title or by rating & title.
two, while it currently accesses a flat-file, eventually (one hopes) the
script will be used to access a SQL database directly via the DBI
modules, thereby rendering the flat-file irrelevant.
Right now the flat-file is created by another script that uses LWP to
hit five web pages (.asp) that are accessing said SQL database, and by
using HTML::Parser, it sucks the data outta the html and stuffs it in
the flat-file for the cgi to play with. (along with a few other scripts
I am using that also do further error-checking on said data so I can FIX
problems in the database using the damn html-asp entry forms (when I'd
MUCH rather let Perl do it via scripting so that I can make mass-changes
more practical.. ahhhhhhhhhhhhhhhhhh. But it sucks at the moment since
the SQL database is on an NT/2000 hybrid network that has no Perl
install (nor do they seem interested. bleh. :P)) which takes forever to
deal with manually, but what else can I do? :)
--
send mail to mactech (at) webdragon (dot) net instead of the above address.
this is to prevent spamming. e-mail reply-to's have been altered
to prevent scan software from extracting my address for the purpose
of spamming me, which I hate with a passion bordering on obsession.
------------------------------
Date: Wed, 06 Dec 2000 08:57:32 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: do u get fed up with regexp
Message-Id: <90kv1r$pmu$1@nnrp1.deja.com>
thanx for ur help thats all i wanted to know. if it worked.
thanx.
arse
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 09:32:31 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: how to check if there is text in an input text field?
Message-Id: <3a2e0644.310713472@news.itn.is>
On Tue, 05 Dec 2000 19:09:36 GMT, alazarev1981@my-deja.com
wrote:
>Simple problem:
>
>I've got an html page with:
><input type="text" name="blah">
>
>The form is sent to the process.cgi file that gathers the form
>information as such:
>$text = cgi->param('text');
>
>Then I want to print that text to a new file if and only if that field
>has text in it. So I wrote the following line:
>if($text != "") {
> print NEW_FILE "Your new text is here: $text";
>}
For text comparison you should use the
ne operator, not !=.
If you had put use strict in your script
as you should have seen recommended
a million times on this newsgroup,
you would have received the following,
and most informative, error message:
Argument "" isn't numeric in numeric ne (!=) at line XX
Regards,
Helgi Briem
------------------------------
Date: Wed, 06 Dec 2000 10:12:04 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: how to check if there is text in an input text field?
Message-Id: <slrn92s49a.uu.rgarciasuarez@rafael.kazibao.net>
Helgi Briem wrote in comp.lang.perl.misc:
> On Tue, 05 Dec 2000 19:09:36 GMT, alazarev1981@my-deja.com
> wrote:
>
> For text comparison you should use the
> ne operator, not !=.
>
> If you had put use strict in your script
> as you should have seen recommended
> a million times on this newsgroup,
> you would have received the following,
> and most informative, error message:
> Argument "" isn't numeric in numeric ne (!=) at line XX
This warning (as other warnings) is actually triggered by the -w switch,
not by using strict.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
#!/usr/bin/perl -p
BEGIN { *ARGV=*DATA }
__END__
Just another Perl hacker,
------------------------------
Date: 6 Dec 2000 08:15:36 GMT
From: u8526505@ms27.hinet.net ()
Subject: How to set the write permission of Perlscript
Message-Id: <90ksj8$e4a@netnews.hinet.net>
My PerlScript works fine with my IIS 5 except that I can't write files.I've
tried VBScript and it was ok so it wasn't the matter of the permission of
folders.Thanks for help.
Roy
------------------------------
Date: Wed, 06 Dec 2000 09:53:57 +0100
From: Patrick Steiner <patrick.steiner@alcatel.ch>
Subject: How to write a packet sniffer for win32 (TCP Packets)
Message-Id: <3A2DFEA5.CA6B1680@alcatel.ch>
I need a packet sniffer for Windows NT, written in perl. It must be
analyse TCP Packets.
Which Modul can i use?
Have anyone a example Script?
(Sorry for my bad english)
------------------------------
Date: 6 Dec 2000 08:45:23 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: kill and security (suid)
Message-Id: <90kub3$3ju$1@lublin.zrz.tu-berlin.de>
Rick Delaney <rick.delaney@home.com> wrote in comp.lang.perl.misc:
>
>Anno Siegel wrote:
>>
>> Chris Fedde <cfedde@fedde.littleton.co.us> wrote in comp.lang.perl.misc:
>> >In article <87k89ftryb.fsf@nujoma.perrins>,
>> >Andrew J. Perrin <aperrin@demog.berkeley.edu> wrote:
>> >>
>> >>system("/bin/kill $_") foreach (split(/\s+/,$pppds));
>> >>
>> > system('/bin/kill', '-TERM', $_); # called with proper switch
>>
>> Indeed. The system() variant couldn't work the way the OP wrote it.
>
>Why not? It works for me on a Linux box where SIGTERM is the default
>signal for kill.
Hmm... the specification of kill() has indeed changed from "kill LIST"
to "kill SIGNAL, LIST". However,
perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill $$'
prints nothing. (This is also a Linux system.)
Anno
------------------------------
Date: Wed, 06 Dec 2000 10:02:52 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: kill and security (suid)
Message-Id: <slrn92s3o2.uu.rgarciasuarez@rafael.kazibao.net>
Anno Siegel wrote in comp.lang.perl.misc:
>
> Hmm... the specification of kill() has indeed changed from "kill LIST"
> to "kill SIGNAL, LIST". However,
>
> perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill $$'
>
> prints nothing. (This is also a Linux system.)
perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill 15,$$'
does print "TERM" (on Linux).
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: 6 Dec 2000 10:08:56 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: kill and security (suid)
Message-Id: <90l37o$3pa$1@lublin.zrz.tu-berlin.de>
Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in comp.lang.perl.misc:
>Anno Siegel wrote in comp.lang.perl.misc:
>>
>> Hmm... the specification of kill() has indeed changed from "kill LIST"
>> to "kill SIGNAL, LIST". However,
>>
>> perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill $$'
>>
>> prints nothing. (This is also a Linux system.)
>
> perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill 15,$$'
>
>does print "TERM" (on Linux).
Yes, of course, SIGTERM is 15. The question is if TERM is the
*default* for kill if no explicit signal is given.
Anno
------------------------------
Date: Wed, 06 Dec 2000 10:16:33 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: kill and security (suid)
Message-Id: <slrn92s4ho.uu.rgarciasuarez@rafael.kazibao.net>
Anno Siegel wrote in comp.lang.perl.misc:
> Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in comp.lang.perl.misc:
> >Anno Siegel wrote in comp.lang.perl.misc:
> >>
> >> Hmm... the specification of kill() has indeed changed from "kill LIST"
> >> to "kill SIGNAL, LIST". However,
> >>
> >> perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill $$'
> >>
> >> prints nothing. (This is also a Linux system.)
> >
> > perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill 15,$$'
> >
> >does print "TERM" (on Linux).
>
> Yes, of course, SIGTERM is 15. The question is if TERM is the
> *default* for kill if no explicit signal is given.
And what if you want to kill PID 15?
Of course, it's possible to introduce a new syntax for kill when it has
only one argument. But this would break things like :
kill $signum, @pidlist;
where @pidlist happens to be empty.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
package another; sub AUTOLOAD { $AUTOLOAD =~ /::(.*)/;"$1 @_"; }
package hacker; sub AUTOLOAD { $AUTOLOAD =~ /::(.*)/;"$1 @_,\n"; }
print Just another Perl hacker;
------------------------------
Date: 6 Dec 2000 10:34:26 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: kill and security (suid)
Message-Id: <90l4ni$3s3$1@lublin.zrz.tu-berlin.de>
Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in comp.lang.perl.misc:
>Anno Siegel wrote in comp.lang.perl.misc:
>> Rafael Garcia-Suarez <rgarciasuarez@free.fr> wrote in comp.lang.perl.misc:
>> > perl -e '$SIG{ TERM} = sub {print "TERM\n"}; kill 15,$$'
>> >
>> >does print "TERM" (on Linux).
>>
>> Yes, of course, SIGTERM is 15. The question is if TERM is the
>> *default* for kill if no explicit signal is given.
>
>And what if you want to kill PID 15?
>
>Of course, it's possible to introduce a new syntax for kill when it has
>only one argument. But this would break things like :
>
> kill $signum, @pidlist;
>
>where @pidlist happens to be empty.
Yes, that's what's puzzling me too. While it is true that the unix
kill command uses TERM as a default (not only under Linux), Perl's
kill() doesn't do that, and, for the reason you give, it would make
little sense if it did.
Anno
------------------------------
Date: 6 Dec 2000 07:34:15 GMT
From: dha@panix6.panix.com (David H. Adler)
Subject: Re: Lost in a sea of obfuscation...
Message-Id: <slrn92rqvn.plm.dha@panix6.panix.com>
On 5 Dec 2000 12:48:45 GMT, Ilmari Karonen <iltzu@sci.invalid> wrote:
>In article <90hb9i$20tm$1@newssvr06-en0.news.prodigy.com>, Ryan Joseph wrote:
>>
>>Here is my dillema - I really want to write a JAPH, yet I have no clue how
>>to go about this. Is there any stratigies, tips, techniques, or magic tricks
>
> print "Just another Perl hacker,\n";
>
>There. That's a start. Then you wait until you think of some way to
>make it more difficult, and try to cram it into one line of Perl.
Myself, I'm kind of fond of japhs that are not particularly
difficult or even terribly obfuscated, but rather are somewhat
surprising.
One I'm actually kind of proud of is
perl -e 'print "Just another P$0-r-l hacker\n"'
Of course, on a similar note, there's the japh of abigail's, described
thusly (not an exact quote):
"It's obvious how it does what it does. The question is, why does it
*compile*?"
:-)
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Don't be afraid, we're only elves.
- stimps, http://mindlink.net/stimpy/
------------------------------
Date: 6 Dec 2000 01:53:18 -0600
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Lost in a sea of obfuscation...
Message-Id: <90kr9e$he0$1@pip.cs.utexas.edu>
In article <slrn92rqvn.plm.dha@panix6.panix.com>,
David H. Adler <dha@panix6.panix.com> wrote:
>One I'm actually kind of proud of is
>
> perl -e 'print "Just another P$0-r-l hacker\n"'
That's a pretty good one. Strangely, I just learned why that works
earlier today before I read that article. (Someone had posted
wondering how they could find out what the script's name was, and I
suggested "$0". Without thinking, I tried it out with "-e", and I
learned something new in the process.)
Anyway, another thing you can do with it is this:
perl -e 'system "perl $0 \"print qq(Just another Perl hacker,\n)\""'
- Logan
------------------------------
Date: Wed, 6 Dec 2000 11:21:25 +0100
From: "Per- Fredrik Pollnow" <Per-fredrik.Pollnow@epk.ericsson.se>
Subject: mail ???
Message-Id: <90l3ed$stb$1@newstoo.ericsson.se>
Hi,
I have done a mail script like this, whay don i work ? please help me..
#!/usr/bin/perl -w
$mail_path = "/usr/sbin/sendmail";
$email = "root\@127.0.0.1";
open (MAIL, "|$mail_path -t");
print MAIL "To:$email\n";
print MAIL "Replay-to:\n";
print MAIL "From:root\@127.0.0.1\n";
print MAIL "Subject: tada\n";
print MAIL "\n\n";
print MAIL "hej\n\n";
close(MAIL);
exit;
------------------------------
Date: Wed, 06 Dec 2000 10:41:08 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: mail ???
Message-Id: <slrn92s5vq.11f.rgarciasuarez@rafael.kazibao.net>
Per- Fredrik Pollnow wrote in comp.lang.perl.misc:
>
> I have done a mail script like this, whay don i work ? please help me..
>
> #!/usr/bin/perl -w
> $mail_path = "/usr/sbin/sendmail";
> $email = "root\@127.0.0.1";
> open (MAIL, "|$mail_path -t");
Check the return value of open !
> print MAIL "To:$email\n";
Put a space after ':'.
> print MAIL "Replay-to:\n";
It's "Reply", not "Replay". And if it's unused, don't put it here.
> print MAIL "From:root\@127.0.0.1\n";
Same remark as above for the ':'. Besides this, I don't know whether
your sendmail will accept '@127.0.0.1'. "From: root\n" is probably
better. Let sendmail rewrite the adresses.
> print MAIL "Subject: tada\n";
> print MAIL "\n\n";
A single \n is sufficient.
> print MAIL "hej\n\n";
> close(MAIL);
Check the return value of close when you're writing to a pipe ! And
check the sendmail logs and the root mailbox (which should be aliased to
the one of a real human) to know whether the mail has been delivered.
BTW, there are several modules on CPAN that can help you sending mail;
e.g. Net::SMTP.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 06 Dec 2000 10:51:27 GMT
From: SimBean <schneider@xtewa.de>
Subject: Re: mail ???
Message-Id: <90l5ne$uf1$1@nnrp1.deja.com>
> I have done a mail script like this, whay don i work ?
^^^^^^^^^^^^^^^
What error-message do you get?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 10:26:02 GMT
From: alichambers@madasafish.com
Subject: Re: MUMPS module
Message-Id: <90l47l$t9s$1@nnrp1.deja.com>
Hi
Thanks for your reply. I'm looking to test (via PERL remotely) whether
a certain global variable in our DSM/MUMPS system is locked or not
(when locked it indicates a central process is running). Hence I'll be
able to design a webinterface that has a RUNNING/NOT RUNNING
information box.
I'm not sure about the connection protocol - I'll have to look into it.
I think it's DSM.
Cheers,
Alex Chambers
In article <u9y9xu7mnx.fsf@wcl-l.bham.ac.uk>,
nobull@mail.com wrote:
> alichambers@madasafish.com writes:
>
> > I'm looking for a module for PERL that will allow me to connect to a
> > MUMPS system. Does anyone have any leads?
>
> Connect using what protocol? OMI? MUMPS/188? MSM-NET? DSM-DDP? Some
> other proprietory protocol? CORBA? HTTP?...
>
> Several HTTP servers in MUMPS are avialable and you could talk to a
> MUMPS system using LWP.
>
> Do you happen to have a copy of ANSI/MDC X11.2-1995? If so it wouldn't
> be too hard to knock together a module that implements an OMI client
> as a tied hash.
>
> BTW: Not directly relevant but Have you seen
>
> http://freem.vmth.ucdavis.edu/saintly/MontyPERL/
>
> --
> \\ ( )
> . _\\__[oo
> .__/ \\ /\@
> . l___\\
> # ll l\\
> ###LL LL\\
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 06 Dec 2000 07:10:42 GMT
From: loans2001@aol.com (Loans2001)
Subject: Need help with Http{referrer}
Message-Id: <20001206021042.06350.00002759@ng-xa1.aol.com>
This is from a set of scripts to run an affiliate program. It's a click though
script, and it's supposed to write add a click or 1 to the click log each time
a user clicks from a webpage to my website.
Here is the portion of the script from clicks.cgi that is supposed to do this.
But it is currently not working properlly.
require "config.cgi";
#require 'cookie.lib';
use CGI::Carp (fatalsToBrowser);
#print "Content-type: text/html\n\n";
# get data from link
$ip=$ENV{'REMOTE_ADDR'};
$http=$ENV{'HTTP_REFERER'};
$id=$ENV{'QUERY_STRING'};
$id=lc($id);
# raw click saving
$timenow = time;
open(FILE, ">>$clicklog") || die "I can't open $logfile2";
print FILE "$timenow $id $ip $http\n";
close (FILE);
##############################
# IF NO URL THEN NO CLICK !
if (!($http)){
print "Location: $URL\nURI: $URL\n\n" ;
exit;
}
##############################
if (-f "$regdir/$id.dat") {
&clickprocess;
}
#no matching member id found, so redirect with no click record
#redirection
print "Location: $URL\nURI: $URL\n\n" ;
exit;
########################
#process click
sub clickprocess {
open(FILE, "$regdir/$id.dat") || die "I can't open $regdir/$id.dat";
@all=<FILE>;
close (FILE);
# canceled accounts do not receive clicks
if ($all[0]=~/Canceled/){
print "Location: $URL\nURI: $URL\n\n" ;
exit;
}
($idfile,$clicks,$ipfile)=split (/\|/,$all[0]);
chomp ($ipfile);
if ($ipfile=~/\+/){
($iplog2,$iplog1)=split (/\+/,$ipfile);
}else{
$iplog1=$ipfile;
}
#check if IP is different and if so add one count to clicks
if ($iplog1 eq $ip or $iplog2 eq $ip){
#redirect without click sum because only one click allowed for each visitor
print "Location: $URL\nURI: $URL\n\n" ;
}else{
&cookies_check;
} #end if
} #end sub
########################
#add click to member
------------------------------
Date: Wed, 6 Dec 2000 00:08:36 -0500
From: "Jimmy" <someone@compugenx.com>
Subject: Net::SSLeay
Message-Id: <90khoq$p58$1@bob.news.rcn.net>
After mastering the art of sending data and tearing down the conenction to
theserver, I have yet to figure out how properly to send data to the server,
have it handled, and then be able to have the same client send mroe data and
have it read and handled by the server.... any examples or ideas are greatly
appreciated.
-jimmy
------------------------------
Date: Wed, 06 Dec 2000 08:07:41 GMT
From: mtaluc@my-deja.com
Subject: Re: Netscape, Apache, Perl and Oracle
Message-Id: <90ks4c$ms0$1@nnrp1.deja.com>
i ran into the same problem today and fixed it using the mod_env module
with the setenv directive in the httpd.conf file.
In article <3A2C23ED.EE43FB8@planet.nl>,
"R.C. van der Zant" <rvdzant@planet.nl> wrote:
> This is the description of an error while running a Perl script from
> Netscape 4.72 on RedHat Linux.
>
> The script tries to access an Oracle 8.1.5 database to 'select' one
> table.
>
> The error message is :
>
> install_driver(Oracle) failed: [Fri Nov 24 17:04:21 2000]
> emp_connect.cgi: [Fri Nov 24 17:04:21 2000] emp_connect.cgi: Can't
load
> '/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/Oracle/Oracle.so'
> for module DBD::Oracle: libclntsh.so.8.0: cannot open shared object
> file: No such file or
> directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line 169.
> [Fri Nov 24 17:04:21 2000] emp_connect.cgi: [Fri Nov 24 17:04:21 2000]
> emp_connect.cgi: [Fri
> Nov 24 17:04:21 2000] emp_connect.cgi: [Fri Nov 24 17:04:21 2000]
> emp_connect.cgi: at (eval 7) line 3 Perhaps a required shared library
or
> dll isn't installed where
> expected at /usr/www/roodbms/cgi-bin/emp_connect.cgi line 15
>
> This puzzles me somewhat.
>
> The file libclntsh.so.8.0 exists and can be read by user : webuser,
> group : webgroup.
>
> The Apache HTTP 1.3.12 software has been configured to run under user
:
> webuser, group : webgroup and does so as shown by writing to a file
from
> another script.
> This user can run the Oracle Perl script that causes the problem
without
> any problem from his shell.
>
> What has been done to try and solve the problem is :
>
> 1) Edit the HTTP start shell script and add : ORACLE_HOME,
> LD_LIBRARY_PATH and extend PATH with : ${ORACLE_HOME}/bin.
> Restart the HTTP processes.
> The situation remains unaltered.
>
> 2) Add :
>
> $ENV{LD_LIBRARY_PATH}='/db/oracle/rel815/lib';
> $ENV{ORACLE_HOME}='/db/oracle/rel815';
> $ENV{ORACLE_SID}='SVR815';
>
> to the cgi script above the line that says :
>
> $DBH=DBI->connect("dbi:Oracle:$svn","$usn","$pwd")
> or $q->p("Connectie naar $svn mislukt. Foutcode : $DBI::errstr");
>
> This still produces the same error.
>
> 3) So now reading the : (DBI-)README.help file I got the impression
that
> maybe I hadn't build the DBD software correctly.
> LD_RUN_PATH has been set to the needed value, as were ORACLE_SID
and
> ORACLE_USERID.
> A rebuild has been done.
>
> The problem persists.
>
> 4) I've copied the file Oracle.so to the APache modules directory and
> made it equal to the other *.so files residing in that directory.
>
> Hard luck, the same error.
>
> 5) The file : libclntsh.so.8.0 has been copied to the Apache modules
> directory but alas : nothing has changed.
>
> I've scanned all my available 'O Reilly documentation on Perl, DBI,
> Apache and CGI, but nothing worthwile is mentioned in those books.
>
> I'm sure i've missed something, but I'm at a loss what. Help would be
> greatly appreciated.
>
> Ronald van der Zant
> Email : rvdzant@planet.nl
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 5 Dec 2000 23:40:45 -0600
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Perl Illiterate
Message-Id: <90kjgt$frq$1@pip.cs.utexas.edu>
In article <3A2BE7C8.C579CB08@alcatel.be>,
David Hiskiyahu <David.Hiskiyahu@alcatel.be> wrote:
>There are many interpretations of Perl, the following came to my mind:
>
>anyone wants to continue the list?
Paradigm-Enhancing Rococo Language.
- Logan
------------------------------
Date: 6 Dec 2000 09:08:59 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Perl Illiterate
Message-Id: <90kvnb$qtc$3@bob.news.rcn.net>
Logan Shaw <logan@cs.utexas.edu> wrote:
> In article <3A2BE7C8.C579CB08@alcatel.be>,
> David Hiskiyahu <David.Hiskiyahu@alcatel.be> wrote:
>>There are many interpretations of Perl, the following came to my mind:
>>
>>anyone wants to continue the list?
> Paradigm-Enhancing Rococo Language.
Pretty Easy to Run Low (on memory).
------------------------------
Date: Wed, 06 Dec 2000 11:20:40 +0100
From: David Hiskiyahu <David.Hiskiyahu@alcatel.be>
Subject: Re: Perl Illiterate
Message-Id: <3A2E12F8.B1BF955F@alcatel.be>
Pennies Earned, Rubles Lost
Penis Envy, Rage, Lust
Play Every Round of Lotto
David Hiskiyahu wrote:
>
> There are many interpretations of Perl, the following came to my mind:
>
> - Pascal Experiences Record Low,
> - Pain, Envy, Revenge, Love,
> - Practical Enormously Rich Language,
> - Play & Enjoy this Rubbish Lister,
> - Pinguins Expect Romance & Love
> - Pathologically Eclectic Rubbish Lister,
> - Poorly Educated Romantic Lover,
> - Playing Environment for Rubbish Lovers,
> - ...
>
> anyone wants to continue the list?
>
> Matt Miller wrote:
> >
> > What is perl?
>
> ...
>
> Thought of the day:
>
> "Computers in the future may weigh no more than 1.5 tons."
> Popular Mechanics, 1949
>
> "I think there is a world market for maybe five computers."
> -Thomas Watson, IBM Chairman, 1943
--
*** David Hiskiyahu, Alcatel SRD, 1 Fr.Wellesplein, Antwerp ***
*** Phone/Fax: +32 3 240 7965/9820, private +32 3 290 0912 ***
Quote of the day:
"The doctors X-rayed my head and found nothing."
- Dizzy Dean, St Louis Cardinals Pitcher
------------------------------
Date: Wed, 06 Dec 2000 06:01:20 GMT
From: flint@flintslacker.com (Flint Slacker)
Subject: Re: Problem creating DBM database
Message-Id: <3a2dd343.1307725578@news.tcn.net>
I had this problem when I moved some code from a UNIX box to NT, but
fixed it by changing the DBM package. I don't know why, but it might
help you so.... :)
use DB_File;
to
use GDBM_File;
Well something like the above, anyways it worked.
$mode = oct("0644");
dbmopen(%WORDS, "words", $mode) || die "....
Flint
On Tue, 05 Dec 2000 15:40:31 +0000, Bernard Englefield
<b.englefield@uel.ac.ku> wrote:
>I am having trouble running a very simply perl program to create a DBM
>database.
>I am using perl 5.005_03 under solaris 2.7
>
>The program is only a few lines long
>
>/usr/local/bin/perl
>dbmopen(%WORDS,"words",0644);
>$WORDS{"bernie1"}="test";
>dbmclose(%WORDS);
>
>This program works OK on all my system apart from the one I need to run
>it on.
>On the good systems it creates two files
> size
> 0 words.dir
> 1024 words.pag
>
>On the bad system I get two files
> size
> 24587 words.dir
> 24587 words.pag
>
>The two files seem to be identical and contain the text from the perl
>script.
>
>If I try to open the database I get Segmentation Fault - core dumped
>
>I have rebuilt my version of perl but this has made no differrence. I
>can use other program
>like makedbm to read and write DBM file on the system. Has anyone got
>any ideas what my problem could be.
>
------------------------------
Date: 5 Dec 2000 23:42:59 -0600
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Problem with split using |
Message-Id: <90kjl3$fso$1@pip.cs.utexas.edu>
In article <slrn92rdbl.ouu.tadmc@magna.metronet.com>,
Tad McClellan <tadmc@metronet.com> wrote:
>Except that should be:
>
> @thingies = split (/\|/, $stringy);
>
>If it is a pattern match, then it should _look like_ a pattern match.
Good point. I'm not sure what I was thinking. (However, I am teaching
myself C++ right now despite having avoided it out of a preference for
Perl, so maybe that explains why my brain is at half capacity...)
- Logan
------------------------------
Date: Wed, 06 Dec 2000 07:56:14 GMT
From: yaronn@my-deja.com
Subject: Re: progress of upload using multipart/form-data
Message-Id: <90kret$m85$1@nnrp1.deja.com>
In article <slrn92l4h2.nl7.efflandt@efflandt.xnet.com>,
efflandt@xnet.com wrote:
> You can set an upper limit with CGI.pm or you could check the total
> CONTENT_LENGTH, but I don't know what you mean by "progressive
> length" because the data has been received before your CGI runs.
>
What I'm looking for is showing an upload progress status.
Data is received on CGI init() which runs when a CGI object is created.
What I need is probably to NOT create a CGI object, and accept and parse
the multipart/form-data myself.
How do I do that? do I replicate CGI.pm way of doing it?
> You would have to do something browser side for the client to monitor
> upload status. Unless you are using a Perl script to to submit the
data,
> that is beyond the scope of this newsgroup.
>
I don't think there's a way to monitor it on the browder side, I'll
have to research that...
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 5 Dec 2000 23:15:12 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Protecting my Perl script?
Message-Id: <slrn92rfag.p10.tadmc@magna.metronet.com>
Neb <berube@odyssee.net> wrote:
>
>Now, is there a way that I can protect (so people can't read) my source code
>so that I can give my script away?
^^ ^^^^
^^ ^^^^
It is possible to give your script away _without_ "protecting" it
you know. Or protecting it with a license.
It is called Open Source.
Some guy named Larry Wall did that once with some programming
language or something. People really like him now.
Do you really mean "give" or do you maybe mean "sell" instead?
If you are really going to "give" it away then you wouldn't
be needing to hide it...
>They don't allow
>executable to be run on their server.
Eh?
_perl_ is an executable.
Do they let you run perl on their server?
>So, beside executables, is there an other way to be able to run the script,
Yes. Rewrite it in another language, for instance. But you were
probably hoping for something easier than that...
>but with some encryption of the source code?
I can only assume that, when you were courteously checking the
Perl FAQ before posting to the Perl newsgroup, you missed part 3:
"How can I hide the source for my Perl program?"
--
Tad McClellan SGML consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Dec 2000 09:30:49 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: R: print, CGI and socket!
Message-Id: <90l109$3m5$1@lublin.zrz.tu-berlin.de>
[jeopardy posting re-arranged]
Federico <artax@shineline.it> wrote in comp.lang.perl.misc:
><nobull@mail.com> wrote in message u9u28i7lz4.fsf@wcl-l.bham.ac.uk...
>> "Federico" <artax@shineline.it> writes:
>>
>> > I need to know ('cause i have to do a statistics report) if the
>> > print in CGI environment of a HTML page, ie to a browser, has been
>> > well finished or in other words if the final user has receive all
>> > the page or went away before cause for example a long
>> > delay. Somebody know how to do?
>>
>> I would suggest employing a private detective to stand behind the user
>> and look over this shoulder.
>>
>> Actaully, a small <IMG> at the bottom of the page is probably the
>> simplest solution. If the image gets loaded then you know the page
>> got though to a user-agent. You'll also need a <IMG> at the top of
>> the page as a control so that you can exclude users with image loading
>> disabled from your stats.
>.. ho interesting but how can i know that the image on the bottom of the pae
>has been downloaded from that IP-user??? How can i create e file with al the
>reports of the downloaded images?
You will have to check the server log, which is the only reliable way
to know which pages were loaded.
Anno
------------------------------
Date: 06 Dec 2000 08:32:33 +0000
From: nobull@mail.com
To: "Federico" <artax@shineline.it>
Subject: Re: R: print, CGI and socket!
Message-Id: <u9n1e97u3n.fsf@wcl-l.bham.ac.uk>
"Federico" <artax@shineline.it> writes upside down:
Please quote _in_context_ only _relevant_ parts of the post you are
replying to.
> .. ho interesting but how can i know that the image on the bottom of the pae
> has been downloaded from that IP-user??? How can i create e file with al the
> reports of the downloaded images?
Web server configuration is not a Perl issue.
Federico also mailed this response to me but did not mark it as a copy
of a Usenet post. This is considered rude.
I answered the question by e-mail assuming, wrongly, that Federico had
realised this was off-topic in a Perl group and chosen to take the
matter to e-mail.
Clearly I was mistaking him for someone who gave a damn.
[snip my whole post]
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Wed, 6 Dec 2000 03:55:55 -0600
From: "LimboStar" <dontspamme@awdang.com>
Subject: simulating htaccess
Message-Id: <3a2e128e@news.cc.umr.edu>
Hi all,
I'd like to simulate the behavior of .htaccess with a straight perl script
(without using mod_perl). I know you can do this to display the login box:
# -----
print <<EOT;
Status: 401 Authorization required
WWW-Authenticate: Basic realm="whatever"
Content-type: text/html
...error message...
EOT
# -----
I know that the information is encoded in a relatively simple manner and
sent to the server in the request headers, but how do I access it? Is it
even possible to access it without using mod_perl?
Any help anyone can give would be appreciated.
--sjd;
------------------------------
Date: Wed, 06 Dec 2000 10:17:28 GMT
From: alrashedf@my-deja.com
Subject: Sockets in CGI
Message-Id: <90l3nl$sth$1@nnrp1.deja.com>
I am tring to write a CGI script to access a
telnet server from the web. How can I keep the
socket open after the page is sent back and the
scripts exits?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 10:19:01 GMT
From: alrashedf@my-deja.com
Subject: Sockets in CGI
Message-Id: <90l3qh$t54$1@nnrp1.deja.com>
I am trying to write a CGI script to access a telnet server from the
web. How can I keep the connection open after the page is sent back and
the scripts exits?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 10:43:34 GMT
From: SimBean <schneider@xtewa.de>
Subject: Re: Sockets in CGI
Message-Id: <90l58m$u2s$1@nnrp1.deja.com>
> I am trying to write a CGI script to access a telnet server from the
> web. How can I keep the connection open after the page is sent back
and
> the scripts exits?
In what way would you use the "connection" after the script exits??
What page is being send back? A web-page? Why using telnet then??
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 10:45:41 GMT
From: SimBean <schneider@xtewa.de>
Subject: Re: Sockets in CGI
Message-Id: <90l5ck$u4u$1@nnrp1.deja.com>
> I am tring to write a CGI script to access a
> telnet server from the web. How can I keep the
> socket open after the page is sent back and the
> scripts exits?
A glitch in the Matrix?
Or just deją vu?? ;)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 06 Dec 2000 05:29:14 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: tie()ing an entire namespace
Message-Id: <3A2DD214.117510F@home.com>
[posted & mailed]
Alan Barclay wrote:
>
> Is it possible to tie an entire name space, so that eg:
>
> package test;
> $a='value';
>
> would result in my tie'd method being called, without having to explictly
> tieing $test::a.
Unfortunately, no.
> I've tried tie'ing to $test::, and even though the tie worked, my
> TIEHASH was called, my STORE never was.
I assume you mean %test:: here. Although C<tie> will actually tie the
hash named %test:: to whatever object, I don't think it's the actual
stash (symbol table hash) that gets tied. The stash appears to be
hidden so that symrefs can't even be looked up.
It would be nice if this worked but there are some issues. I don't know
how difficult they are to tackle. The first is that symbols like
$Foo::bar;
or
package Foo;
$bar;
are resolved at compile time so a runtime tie of %Foo:: won't affect
them. This would mean you could only use symrefs like
${'Foo::bar'};
but if you're doing that you might as well use a regular hash.
IOW, a regular tie of the stash may not do what you want anyway. Recall
that the values of the stash are typeglobs. So when you say
$x = $Foo::{bar};
you would expect your FETCH method to be called and it should be
returning a typeglob. When you say
$Foo::bar = $x;
or
@Foo::bar = @x;
should FETCH be called? In the case of symrefs, maybe, since the
typeglob needs to be retrieved from $Foo::{bar}. But in the above case
it wouldn't make any more sense than expecting $obj->FETCH to be called
when accessing $foo in
$obj = tie %bar, 'test';
$bar{key} = \$foo;
$foo = 1;
Another issue is do you really want to play with typeglobs? Or do you
just want all scalars in a package to be tied. Tie'ing %Foo:: won't
give you any access to the rvalue in
$Foo::x = 42;
even if it resolves to
${ *{$Foo::{x}}{SCALAR} } = 42;
This would result in tied(%Foo::)->FETCH being called, not in any STORE
method being called.
But if this worked, maybe you could tie the scalar parts of symbols as
they were created in tied(%Foo::)->STORE? I don't know. I'm just
musing.
Unfortunately, I don't have an alternative to suggest to you either.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Wed, 06 Dec 2000 09:15:34 +0000
From: "Dela Lovecraft" <dela@nospam.ukonline.co.uk>
Subject: Re: which linux for Perl 5.6?
Message-Id: <YtnX5.133$4N5.2219@news2-win.server.ntlworld.com>
> FYI: Mandrake Linux (MDK) version 7.0 comes with Perl 5.005_03. The
> latest (MDK 7.2) _does_ have Perl 5.6.
>
> Please include all applicable version numbers when asking or answering
> questions. Many stores still have obsolete Linux distros; I saw RH 5
> right in a rather well-known chain of bookstores a couple weeks ago.
My mistake! It was one of those cases where I thought I had typed the version,
but obviously not. Mandrake 7.1 onwards are the ones with Perl 5.6, and as Tim
points out, earlier versions do not.
Dela
------------------------------
Date: Wed, 06 Dec 2000 07:45:46 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: Willing to review a 90 line Perl program?
Message-Id: <K8mX5.34729$88.5948826@typhoon.southeast.rr.com>
----- Original Message -----
From: Ted <ted_graham@my-deja.com>
Newsgroups: comp.lang.perl.misc
Sent: Tuesday, December 05, 2000 6:28 PM
Subject: Willing to review a 90 line Perl program?
[snip]
> close(IN); # close IN and reopen it to reset the file pointer
> open(IN, $file) || die "cannot open $file for reading: $!\n";
seek( IN, 0, 0 ); # accomplishes the same thing
> while( $line = <IN> )
This will work as long as you don't run across an empty line. You may want
something more like this:
while( defined($line = <IN>) ) {
if ($line eq '') {
warn "got an empty line";
next;
}
... do stuff here ...
}
> if($array[0] != $count) #check that it isn't already there.
> {
> $array[0] = $count . "," . $array[0];
> }
> $line = join(',',@array);
Why not just prepend $count to the array, then join all values at once.
This way, if you decide to change your delimiter, you only need to change it
in one place.
if ($array[0] != $count) {
unshift @array, $count;
}
$line = join(',', @array);
hth,
p
------------------------------
Date: Wed, 06 Dec 2000 11:35:41 +0100
From: Jochen Luig <jochen@c-lab.de>
Subject: Re: Zip files in a directory by zipping directory
Message-Id: <3A2E167D.2CC306BA@c-lab.de>
aldenave@hotmail.com wrote:
> a directoy with 5 thousand files. I want each file to be zipped but I
> do not want to go in and zip each file one at a time. Ask suggestions
> or recomendations? Zipping the entire directory proper is not an
> option. Each file must be seperately zipped. Thanks
perldoc File::Find
perldoc Archive::Zip
Jochen
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 5043
**************************************