Re: [sqlite] DBD::SQLite reporting corruption sqlite3 CL program does not
Craig Talbert wrote: >>From Perl, when I attempt to make a database connection using SQLite, > I get the following error: > > [Tue Jun 23 17:10:22 2009] projectory.cgi: > DBI->connect(dbname=projectory.sqlite3) failed: database disk image is > malformed at ./projectory.cgi line 1577 > > At line 1577 it is executing this code > > $dbh = DBI->connect("dbi:SQLite:dbname=projectory.sqlite3","","") or > die "$DBI::errstr\n"; > > When I use the sqlite3 tool to do an integrity check, I get the following: > > rintintin> sqlite3 projectory.sqlite3 > SQLite version 3.6.15 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> PRAGMA integrity_check; > ok > sqlite> .exit Pretty obvious, but: since your dbname is unqualified, are you sure your working directory in your code is the same as your current directory when using the command line? Also, what version of SQLite is linked into your DBD::SQLite3? (if you're using DBD::SQLite, make sure it's not so old as to be using SQLite v2; I forget when the naming change was made). ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] DBD::SQLite reporting corruption sqlite3 CL program does not
Not sure if this will help, running this through the debugger the error is being generated from DBD::SQLite::db::_login which is in the XS/C code. main::getDBConnection(projectory.cgi:1577): 1577: $dbh = DBI->connect("dbi:SQLite:dbname=projectory.sqlite3","","") or die "$DBI::errstr\n"; . . . DBI::connect(/home/talbert/lib/perl5/sun4-solaris/DBI.pm:471): 471:unless ($dbh = $drh->$connect_meth($dsn, $user, $pass, $attr)) { DB<2> p $drh DBI::dr=HASH(0x5d069c) DB<3> p $dsn dbname=projectory.sqlite3 DB<4> p $user DB<5> p $pass DB<6> p $attr HASH(0x5a5b04) . . . DBD::SQLite::dr::connect(/home/talbert/lib/perl5/sun4-solaris/DBD/SQLite.pm:57): 57: DBD::SQLite::db::_login($dbh, $real_dbname, $user, $auth) 58: or return undef; . . . DB<7> p $dbh DBI::db=HASH(0x9c92bc) DB<8> p $real_dbname projectory.sqlite3 DB<9> p $user DB<10> p $auth DB<11> On Tue, Jun 23, 2009 at 5:27 PM, Craig Talbertwrote: > From Perl, when I attempt to make a database connection using SQLite, > I get the following error: > > [Tue Jun 23 17:10:22 2009] projectory.cgi: > DBI->connect(dbname=projectory.sqlite3) failed: database disk image is > malformed at ./projectory.cgi line 1577 > > At line 1577 it is executing this code > > $dbh = DBI->connect("dbi:SQLite:dbname=projectory.sqlite3","","") or > die "$DBI::errstr\n"; > > When I use the sqlite3 tool to do an integrity check, I get the following: > > rintintin> sqlite3 projectory.sqlite3 > SQLite version 3.6.15 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> PRAGMA integrity_check; > ok > sqlite> .exit > > What are some other reasons why from perl it may get the database disk > image malformed error? > > - Craig > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] DBD::SQLite reporting corruption sqlite3 CL program does not
>From Perl, when I attempt to make a database connection using SQLite, I get the following error: [Tue Jun 23 17:10:22 2009] projectory.cgi: DBI->connect(dbname=projectory.sqlite3) failed: database disk image is malformed at ./projectory.cgi line 1577 At line 1577 it is executing this code $dbh = DBI->connect("dbi:SQLite:dbname=projectory.sqlite3","","") or die "$DBI::errstr\n"; When I use the sqlite3 tool to do an integrity check, I get the following: rintintin> sqlite3 projectory.sqlite3 SQLite version 3.6.15 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> PRAGMA integrity_check; ok sqlite> .exit What are some other reasons why from perl it may get the database disk image malformed error? - Craig ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users