I have an old NAS from Buffalo with MySQL and WebServer with Perl.
But I can't get a Perl script to read or write to the MySQL database.
The server does not support the module DBI (use dbi).
After I have output the modules via Perl script, I only find the possibility to solve this with the following modules.
- Session
- Session/Driver
- Session/Driver/MySQL
I am a real beginner with Perl (which does not happen often)
Thanks
[Help] CGI Perl with MySQL for Spiderbasic
Re: [Help] CGI Perl with MySQL for Spiderbasic
Is there no chance to install the DBI and the DBD-mysql modules? For example using ssh login?
I work(ed) a lot with perl, use(d) the DBI and DBD-mysql, and would love to help you, through pm or mail in german, as you are such a big help for PB.
I work(ed) a lot with perl, use(d) the DBI and DBD-mysql, and would love to help you, through pm or mail in german, as you are such a big help for PB.
Re: [Help] CGI Perl with MySQL for Spiderbasic
I have the module : /usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/DBI.pm
But the perl examples from internet not working.
I think I have to create a valid session first
Perl Script for output all moduls
But the perl examples from internet not working.
I think I have to create a valid session first
Perl Script for output all moduls
Code: Select all
use CGI::Carp qw/fatalsToBrowser/;
use strict;
use File::Find qw/find/;
print "Content-type: text/html\n\n";
print "<html><head><title>NAS Module Lister</title></head>";
print "<body><h1>NAS Module Lister.</h1>\n";
print "<p>The values in \@INC:</p>\n";
print "<p><ul>\n";
foreach ( @INC ) {
print "<li>$_</li>\n";
}
print "</p></ul>\n";
print "<p>The installed modules:</p><ul>\n";
find ( \&wanted, @INC );
print "</ul>";
sub wanted {
print "<li>$File::Find::name</li>\n";
}
Re: [Help] CGI Perl with MySQL for Spiderbasic
Part of output
Code: Select all
/usr/lib/perl5/vendor_perl/5.8.8/CGI
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Push.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Fast.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/SpeedyCGI.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Apache.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Pretty.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Cookie.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Switch.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Util.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Carp.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/ErrorHandler.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Tutorial.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Test
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Test/Default.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Serialize
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Serialize/default.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Serialize/storable.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Serialize/freezethaw.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/postgresql.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/mysql.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/file.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/sqlite.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/db_file.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/Driver/DBI.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/ID
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/ID/incr.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/ID/static.pm
/usr/lib/perl5/vendor_perl/5.8.8/CGI/Session/ID/md5.pm
Re: [Help] CGI Perl with MySQL for Spiderbasic
Do you have SSH access (as root?) and are the make tools installed?
Then please try:
The Makefile.PL call of the DBD module normally wants a parameter like
where the general config file of mysql could be find, maybe you have to search for the file mysql_config and set it, but maybe it will work without.
This is the manually way I use when installing linux servers without package tools.
Then please try:
Code: Select all
wget https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/DBI-1.647.tgz
tar -xzf DBI-1.647.tgz
cd DBI-1.647
perl Makefile.PL
make
make test
make install
wget https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/DBD-mysql-5.011.tar.gz
tar -xzf DBD-mysql-5.011.tar.gz
cd DBD-mysql-5.011
perl Makefile.PL
make
make test
make install
Code: Select all
perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config
This is the manually way I use when installing linux servers without package tools.
Re: [Help] CGI Perl with MySQL for Spiderbasic
DBI is available under Session.
But I can't figure out how to work with Session->Driver->DBI.
But I can't figure out how to work with Session->Driver->DBI.