Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 559 forks source link

Perl bug #2252

Closed p5pRT closed 21 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#3570 (status was 'resolved')

Searchable as RT3570$

p5pRT commented 24 years ago

From servicep@kotilo.saunalahti.fi

Created by janne.rytisalo@serviceparts.net

Dear Helper\,

I've a following problem with the StatPlus 1.25\, www.uninetsolutions.com

I've red files about installing Statplus 1.25\, but this CGI-program doesn't work.

This is what I get when I start the program by typing ./stat2.pl

[18​:03] simpukka /www/serviceparts/cgi-bin % ./stat2.pl Can't modify subroutine entry in scalar assignment at ./stat2.pl line 43\, near " "/www/serviceparts/yllapito/all_logins/access_log-20000718";" Execution of ./stat2.pl aborted due to compilation errors. [18​:19] simpukka /www/serviceparts/cgi-bin %

Could you please help me

This is my script​:

#!/opt/perl/bin/perl # ^ # / \ # | Modify the line the arrow is pointing to\, to the correct # | location of Perl v5 or better. Uninet####################################################################### # UNINET PERL COMPANY(TM) PRESENTS # # StatsPlus 1.25 # # A simple statistical solution. # # ------------------------------------------------------------------------- # # (C)1997-98 Uninet Communications Co.\, All Rights Reserved. # # # # This program is free software; you can redistribute it and/or # # modify it under the terms of the GNU General Public License # # as published by the Free Software Foundation; either version 2 # # of the License\, or (at your option) any later version. WITH THE # # FOLLOWING EXCEPTION​: ALL LINKS TO UNINET PERL CO. MUST REMAIN INTACT. #
# # # This program is distributed in the hope that it will be useful\, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not\, write to the # # Free Software Foundation\, Inc. # # 59 Temple Place - Suite 330 # # Boston\, MA 02111-1307\, USA. # # # # -->A full copy of the GNU General Public License is included in gpl.txt # # ------------------------------------------------------------------------- # # Need Support? Email support@​twn.perlscripts.com # # ------------------------------------------------------------------------- # # Modification History​: # # 1.0​: 4/8/1997 StatsPlus released. Product based on Uninet Countran 1.0 # # 1.25​: 4/30/97 Updated to have easy links to the referer. # ############################################################################# #Just follow the instructions​: #When typing type inside " and ". #Setup Part 1/2 - Steps 1 to 7 #1/5 Type The absolute of the the LOG file. $log = "/www/serviceparts/yllapito/all_logins/access_log-20000718";

#2/5 Type the absolute path to the counter file. $count = "num.txt";

#3/5 Type the path to the date command $datecommand = "/home/s/e/servicep/";

#4/5 Type name of your site $name = "http​://www.serviceparts.net";

#5/5Where will the statistics page be? $stat = "stat.html"; ######################################################### #Setup Part 2/2 - Steps 1 to 3 #Place all files in their respective directory. #1/3 Now chmod 'cstat.pl' 775 #2/3 Then chmod 'log.txt'\, 'num.txt'\, and 'stat.htm' 777 #3/3 Now add \<!--#exec cgi="cgi-bin/stat.pl" --> to the location in your # webpage where you want the counter. #To see your stats run the page you specified (by default stat.html). # ## ## # # ### # # # # # ## # # # # # # # # # # ### # # # # # # ## #
# ## ## # # ### # ######################################################### #Remember to upload the files in ASCII. # #Your done REALLY... So go save this file and leave! # #You just don't give up do you? :-) ######################################################### #Testing Date @​months = ('Jan'\,'Feb'\,'Mar'\,'Apr'\,'May'\,'June'\,   'July'\,'Aug'\,'Sept'\,'Oct'\,'Nov'\,'Dec');

@​days = ('Sun'\,'Mon'\,'Tue'\,'Wed'\,'Thu'\,'Fri'\,'Sat');

($sec\,$min\,$hour\,$mday\,$mon\,$year\,$wday) = (localtime(time))[0\,1\,2\,3\,4\,5\,6]; $date = " $days[$wday]\, $months[$mon]/$mday/$year $hour​:$min​:$sec"; # Get Count open (CD\, "$count"); $counter = \; close (CD); chop ($counter) if $count =~ /\n$/; # Increase Count $counter += 1; open (CD\, ">$count"); print CD ("$counter"); close (CD); print ("Content-type​: text/html\n\n"); print "\<!-- Processed by StatPlus on $date-->"; #Logging open (datk\, ">>$log"); print datk "\$counter\\$ENV{'HTTP_REFERER'}\\$ENV{'REMOTE_ADDR'}\\$date\\$ENV{'HTTP_USER_AGENT'}\\"; close (datk); open (datk\, "$log"); $data = \; close (datk); #Should tell user about update open (UP\,"http​://www.serve.com/twn/upd.html"); $upd = \; close (up); #Print Sheet open (logs\,">$stat"); print logs "\\\Statistics for $name.\\\You currently have had $counter hits.\
\<table border = 1>\Hit No.\\Referer\\IP address\\date\\client\\$data\\
(C)1997 TWN Perl Company. Count Stat V1.0 .\
$upd\
\$ENV{'SERVER_SOFTWARE'}\ \\"; close (logs);

PS. Here is the path for stat2.pl and access_log-files

/www/serviceparts/cgi-bin/stat2.pl

/www/serviceparts/yllapito/all_logins/

With best regards\,

Janne Rytisalo Service Parts Trading Oy tel.center +3582 276 6060 fax. +3582 276 6065 e-mail​: janne.rytisalo@​serviceparts.net www.serviceparts.net

Perl Info ``` Site configuration information for perl 5.00404: Configured by root at Tue Jun 2 13:41:38 EET DST 1998. Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos borg 5.6 generic_105181-04 sun4u sparc sunw,ultra-1 ' hint=recommended, useposix=true, d_sigaction=define bincompat3=n useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-xO5 -xtarget=ultra', gccversion= cppflags='-I/usr/local/include -I/opt/gnu/include' ccflags ='-I/usr/local/include -I/opt/gnu/include' stdchar='unsigned char', d_stdstdio=define, usevfork=false voidflags=15, castflags=0, d_casti32=define, d_castneg=define intsize=4, alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib' libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /opt/perl/lib/sun4-solaris/5.00404/CORE' cccdlflags='-Kpic', lddlflags='-G -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib' Locally applied patches: @INC for perl 5.00404: /opt/perl/lib/sun4-solaris/5.00404 /opt/perl/lib /opt/perl/lib/site_perl/sun4-solaris /opt/perl/lib/site_perl . Environment for perl 5.00404: HOME=/home/s/e/servicep LANG (unset) LC_COLLATE=en_UK LC_CTYPE=iso_8859_1 LC_MESSAGES=C LC_MONETARY=en_UK LC_NUMERIC=en_UK LC_TIME=en_UK LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/sbin:/etc:/bin:/opt/SUNWspro/bin:/usr/5bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/openwin/bin:/usr/proc/bin:/usr/dt/bin:/usr/vmsys/bin:/usr/opt/SUNWmd/sbin:/opt/domain/bin:/opt/domain/sbin:/opt/games/bin:/opt/gcc/bin:/opt/gnu/bin:/opt/local/bin:/o pt/lynx/bin:/opt/mail/bin:/opt/mh/bin:/opt/misc/bin:/opt/mutt/bin:/opt/net/bin:/opt/net/sbin:/opt/news/bin:/opt/perl/bin:/opt/python/bin:/opt/sendmail/bin:/opt/ssh-koe/bin:/opt/ssh-koe/sbin:/opt/ssh/bin:/opt/ssh/sbin:/opt/SUNWrtvc/bin:/opt/SUNWspro/bin:/o pt/SUNWste/bin:/opt/SUNWsymon/bin:/opt/SUNWsymon/sbin:/opt/SUNWvts/bin:/opt/tcl/bin:/usr/ucb PERL_BADLANG (unset) SHELL=/bin/zsh ```
p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

At 10​:17 +0300 2000-07-24\, Service-Parts Trading-Oy wrote​:

Could you please help me

Sorry\, no. You sent your request to an address used for reporting bugs in the Perl interpreter. You should probably instead have contacted the address contained in the script you sent​:

# Need Support? Email support@​twn.perlscripts.com

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

[Resent only to p5p. Original probably got through to "Service-Parts Trading-Oy" but seems to have fallen down a hole at perl.org. Oh\, yes\, while I'm here​: is there now a bug-squashing crew which sends replies like that which follows without cluttering up p5p?]

At 10​:17 +0300 2000-07-24\, Service-Parts Trading-Oy wrote​:

Could you please help me

Sorry\, no. You sent your request to an address used for reporting bugs in the Perl interpreter. You should probably instead have contacted the address contained in the script you sent​:

# Need Support? Email support@​twn.perlscripts.com

p5pRT commented 21 years ago

From The RT System itself

'\n'