Leser: 25
1 2 3 4 5 6
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use CGI::Session; $session = new CGI::Session(); # print "content-type: text/html\n\n1";
$CGISESSID = $session->id();
QuoteCan't call method "id" on an undefined value at /home/strato/http/premium/web8/43/39/534539/htdocs/cgi-bin/test.cgi line 5.
QuotePerl-Var $^V => This is perl, version 5.004_05 built for sun4-solaris
SERVER_SOFTWARE => Apache/2.2.11 (Unix) mod_fastcgi/2.4.6
INC-Pfade => /opt/KQperl/lib/sun4-solaris/5.00405, /opt/KQperl/lib, /opt/KQperl/lib/site_perl/sun4-solaris, /opt/KQperl/lib/site_perl, .
$session = new CGI::Session() or die CGI::Session->errstr();
Quotenew(): failed: couldn't load CGI::Session::Driver::file: [Mon Aug 24 04:43:54 2009] test.cgi: [Mon Aug 24 04:43:54 2009] test_session.cgi: Can't continue after import errors at CGI/Session/Driver/file.pm line 9 [Mon Aug 24 04:43:54 2009] test_session.cgi: [Mon Aug 24 04:43:54 2009] test_session.cgi: BEGIN failed--compilation aborted at CGI/Session/Driver/file.pm line 9.
Guest smanDie Fehlermeldung ist jetzt folgende
Quotenew(): failed: couldn't load CGI::Session::Driver::file: [Mon Aug 24 04:43:54 2009] test.cgi: [Mon Aug 24 04:43:54 2009] test_session.cgi: Can't continue after import errors at CGI/Session/Driver/file.pm line 9 [Mon Aug 24 04:43:54 2009] test_session.cgi: [Mon Aug 24 04:43:54 2009] test_session.cgi: BEGIN failed--compilation aborted at CGI/Session/Driver/file.pm line 9.
Anscheinend gibt es Fehler bei file.pm. Kann es was damit zutun haben, dass man als normaler Kunde auf dem Strato-Server nicht genug Schreibrechte in root, /Temp/, usw. hat? Kann ich das irgendwie umgehen?
$s = CGI::Session->new("driver:file", $sid, {Directory=>'/irgendein/verzeichnis/auf/das/du/zugriff/hast/'});
Guest smanDa das Modul installiert werden muss (kompiliert),
Quotenutzt es nichts es einfach dateiweise per FTP in den cgi-bin Ordner zu kopieren. Das führt zu massig Fehlermeldungen beim Ausführen.
QuoteMein Ansatz war also, das aktuelle CPAN Session Modul auf meinem Windows2000 zu installieren, damit ist es kompiliert und ich kann den ganzen Session-Ordner samt Modul per FTP nach /cgi-bin/CGI/ kopieren.
1
2
3
4
5
6
/
/otherwwwfiles
/cgi-bin/test.cgi
/cgi-bin/CGI/Session/Session.pm
/cgi-bin/CGI/Session/Session/other-dirs-and-files
/cgi-bin/auto/CGI/Session/some-alien-al-and-ix-files
1
2
3
/usr/bin/perl5 -I/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib Makefile.PL PREFIX=/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib LIB=/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib 2>&1:
Not enough arguments for mkdir at Makefile.PL line 145, near "))"
BEGIN not safe after errors--compilation aborted at Makefile.PL line 150.
mkdir(File::Spec->catfile('t', 'sessiondata'),0666);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/usr/bin/perl5 -I/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib Makefile.PL PREFIX=/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib LIB=/home/strato/www/me/www.meinedomain.de/htdocs/cgi-bin/cgipan/mylib 2>&1:
Warning: prerequisite CGI 3.26 not found at (eval 2) line 222.
Warning: prerequisite Data::Dumper not found at (eval 2) line 222.
Warning: prerequisite Digest::MD5 not found at (eval 2) line 222.
Warning: prerequisite Scalar::Util not found at (eval 2) line 222.
Warning: prerequisite Test::More not found at (eval 2) line 222.
----------------------------------------
#### WARNING ####
If you are using custom CGI::Session drivers they may not be compatible
with the current driver specifications. You will need to make some changes
to your drivers' code before proceeding with this installation to make it
compatible with CGI::Session 4.x.
Fortunately, current driver specifications are a lot easier to adapt to.
Should you have any assistance re-coding your current drivers, please let
me know.
Current driver specs are documented in CGI/Session/Driver.pm
#### TESTING #####
You are encouraged to run tests for the backend you will be using. The
database backends that need a customized connection string won't run by
default. To run them, some environment variables must be set.
The simplest method is to use the standard "DBI_DSN/DBI_USER/DBI_PASS"
environment variables.
Otherwise, you can set these variables:
For PostgreSQL:
CGISESS_PG_DSN
CGISESS_PG_USER
CGISESS_PG_PASS
For MySQL:
CGISESS_MYSQL_DSN
CGISESS_MYSQL_USER
CGISESS_MYSQL_PASS
CGISESS_MYSQL_SOCKET
----------------------------------------
Warning: Module::Metadata::Changes's ini.report.pl failed to generate or update Changelog.ini.
----------------------------------------
'ABSTRACT' is not a known MakeMaker parameter name.
'AUTHOR' is not a known MakeMaker parameter name.
'EXTRA_META' is not a known MakeMaker parameter name.
Writing Makefile for CGI::Session
I didn't find CGI (version 3.26). You may find it here: CGI
1 2 3 4
#!/usr/bin/perl print "content-type:text/plain\n\n"; print "Perl Version: $]\n"; print `perl --version`;
1
2
3
4
Perl Version: 5.00405
This is perl, version 5.004_05 built for sun4-solaris
Copyright 1987-1998, Larry Wall
...
Guest smanDann kam der Fehler "Cant use an undefined value as a Symbol reference", behoben durch auskommentieren von "use strict;"
opendir my $dir, "."; ... readdir $dir; ... close $dir;
opendir DIR, "."; ... readdir DIR; ... close DIR;
1 2 3 4 5 6 7 8 9 10 11
sub read_cwdir { if(opendir(my $dir, ".")) { my @list=readdir $dir; close $dir; return wantarray?@list:shift(@list); } else { return wantarray?():undef; } }
QuoteAuthen::SASL (2.11)
CGI::FastTemplate (1.09)
CGI::Screen (0.122)
Compress::Zlib (1.41)
Curses (1.06)
DBD::CSV (0.22)
DBD::SQLite (1.14)
DBD::mysql (4.008)
DBI (1.56)
Data::Dumper (2.121)
Data::ShowTable
Date::Calc (5.4)
Digest::HMAC (1.01)
Digest::SHA1 (2.11)
FCGI (0.67)
GD (2.41)
HTML::Parser (3.56)
HTML::Tagset (3.20)
HTML::Template (2.9)
IO-stringy
IO::Stringy (2.110)
Image::Size (3.100001)
LWP (5.814)
MIME-tools
MIME::Lite (3.01)
Net::DNS (0.63)
Net::SMTP_auth (0.08)
Net::SSLeay
PDF::API2 (2.015)
Parse::RecDescent (1.94)
Perl
RPC::XML (1.36)
SHA (2.01)
SOAP::Lite (0.69)
SQL::Statement (1.15)
Spreadsheet::WriteExcel (2.14)
Sprite (3.21)
Text::CSV_XS (0.23)
TimeDate
URI (1.35)
XML::CanonicalizeXML (0.03)
XML::Filter::BufferText (1.01)
XML::LibXML (1.66)
XML::LibXML::Common (0.13)
XML::LibXSLT (1.66)
XML::NamespaceSupport (1.09)
XML::Parser (2.34)
XML::SAX (0.96)
XML::Simple (2.18)
XML::Validator::Schema
XML::XPath (1.13)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/usr/bin/perl use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI::Session; my $cgi=CGI->new(); print $cgi->header(); warningsToBrowser(1); my $session = CGI::Session->new(); my $id=$session->id(); my $header=$session->header(); print <<EOH; <html> <head><title>TESTS<title></head> <body> <h3>OUTPUT:</h3> <pre> $id $header </pre> </body> </html> EOH
[Mon Aug 24 22:48:32 2009] Session.pm: [Mon Aug 24 22:48:32 2009] Session.pm: Can't use global $1 in "my" at CGI/Session.pm line 809. BEGIN failed--compilation aborted at /home/strato/http/premium/web8/43/39/534539/htdocs/cgi-bin/test.cgi line 6.
$dsn->{ $plug } = $mod_name = $1;