Hi Octavian, On 19 July 2010 06:07, Octavian Rasnita <orasn...@gmail.com> wrote: > Does the $dsn contain the full path to the database?
Yes. The dsn line is declared like this: #### DBI SQLite3 ### my $dsn = 'dbi:SQLite:dbname=/var/db/MyApp/myapp.db'; It's outside the constructor which I am not sure is good practise. I created the /var/db/MyApp directory and made it's owner apache:apache with permissions at 0777: drwxrwxrwx 2 apache apache 4096 Jul 16 16:38 /var/db/MyApp/ -rwxrwxrwx 1 apache apache 97907712 Jul 16 11:30 myapp.db I have tried in enable trace but I am not getting any the details to the httpd log. This is all I see in the logs: 7:24:1 [19/7/2010] About to updateDB for c006/9219 [Mon Jul 19 17:24:01 2010] -e: DBD::SQLite::db prepare failed: not an error at /etc/perl/Foo.pm line 186. [Mon Jul 19 17:24:01 2010] -e: Use of uninitialized value in concatenation (.) or string at /etc/perl/Foo.pm line 187. STH= DBH=DBI::db=HASH(0x9d175c8) Which refers to these lines: my $sql = qq(SELECT * FROM lowres where path = ?); my $sth = $self->dbh->prepare($sql) or cluck "Error happening\n" . $self->dbh->errstr ." DBI->errstr\n"; # line 187 print STDERR "STH=$sth DBH=".$self->dbh."\n"; $sth->execute($self->file) or confess "Can't prepare: ". $self->dbh->errstr."\n"; while (my $href = $sth->fetchrow_hashref ) { print STDERR "Record found $href->{id} Rows=". $sth->rows."\n" if $self->{debug}; $self->{image} = $href; } I did finally manage to get my DBI trace to appear in the logs (needed to restart the server) but the details are not much more revealing. Still the statement handler is undef before execution and I can't not see any reference to the dbname file. The most telling messge is " DBI::st=HASH(0x9d7002c) ignored - handle not initialised" dbih_setup_attrib(DBI::st=HASH(0x9d7002c), FetchHashKeyName, DBI::db=HASH(0x9d6fd5c)) 'NAME' (already defined) dbih_setup_attrib(DBI::st=HASH(0x9d7002c), HandleSetErr, DBI::db=HASH(0x9d6fd5c)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0x9d7002c), HandleError, DBI::db=HASH(0x9d6fd5c)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0x9d7002c), ReadOnly, DBI::db=HASH(0x9d6fd5c)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0x9d7002c), Profile, DBI::db=HASH(0x9d6fd5c)) undef (not defined) sqlite trace: prepare statement: SELECT * FROM lowres where path = ? at dbdimp.c line 425 sqlite error 21 recorded: not an error at dbdimp.c line 435 >> DESTROY DISPATCH (DBI::st=HASH(0x9d7008c) rc1/1 @1 g0 ima10004 pid#1086) at /etc/perl/Foo.pm line 187 via at /etc/perl/Foo.pm line 187 <> DESTROY(DBI::st=HASH(0x9d7008c)) ignored for outer handle (inner DBI::st=HASH(0x9d7002c) has ref cnt 1) >> DESTROY DISPATCH (DBI::st=HASH(0x9d7002c) rc1/1 @1 g0 ima10004 pid#1086) at /etc/perl/Foo.pm line 187 via at /etc/perl/Foo.pm line 187 -> DESTROY for DBD::SQLite::st (DBI::st=HASH(0x9d7002c)~INNER) thr#8a2fb48 DESTROY for DBI::st=HASH(0x9d7002c) ignored - handle not initialised ERROR: '21' 'not an error' (err#1) <- DESTROY= undef at /etc/perl/Foo.pm line 187 via at /etc/perl/Foo.pm line 187 DESTROY (dbih_clearcom) (sth 0x9d7002c, com 0x9f25b28, imp DBD::SQLite::st): FLAGS 0x100111: COMSET Warn PrintError PrintWarn ERR '21' ERRSTR 'not an error' PARENT DBI::db=HASH(0x9d6fd5c) KIDS 0 (0 Active) NUM_OF_FIELDS -1 NUM_OF_PARAMS 0 dbih_clearcom 0x9d7002c (com 0x9f25b28, type 3) done. !! ERROR: '21' 'not an error' (err#0) <- prepare= undef at /etc/perl/Foo.pm line 187 via at /etc/perl/Foo.pm line 149 DBD::SQLite::db prepare failed: not an error at /etc/perl/Foo.pm line 187. -> errstr in DBD::_::common for DBD::SQLite::db (DBI::db=HASH(0x9d6fdbc)~0x9d6fd5c) thr#8a2fb48 ERROR: '21' 'not an error' (err#0) <- errstr= 'not an error' at /etc/perl/Foo.pm line 187 via at /etc/perl/Foo.pm line 149 Error happening not an error DBI->errstr at /etc/perl/Foo.pm line 187 SPL::Image::get_record('SPL::Image=HASH(0x9c00cc8)') called at /etc/perl/Foo.pm line 149 SPL::Image::_verify('SPL::Image=HASH(0x9c00cc8)') called at /etc/perl/Foo.pm line 142 SPL::Image::verify('SPL::Image=HASH(0x9c00cc8)') called at /etc/perl/Foo.pm line 110 SPL::Image::update_or_create('Foo=HASH(0x9c00cc8)') called at /var/www/soap/ProcessImage.pl line 123 Images::updateDB('spl_number', 'c006/9219') called at /var/www/soap/ProcessImage.pl line 84 Images::ProcessTiff('Images', '/transfer/c0069219.tif') called at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 2569 eval {...} called at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 2557 eval {...} called at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 2526 SOAP::Server::handle('SOAP::Transport::HTTP::CGI=HASH(0x9af7094)', '<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xs...') called at /usr/lib/perl5/site_perl/5.8.8/SOAP/Transport/HTTP.pm line 327 SOAP::Transport::HTTP::Server::handle('SOAP::Transport::HTTP::CGI=HASH(0x9af7094)') called at /usr/lib/perl5/site_perl/5.8.8/SOAP/Transport/HTTP.pm line 423 SOAP::Transport::HTTP::CGI::handle('SOAP::Transport::HTTP::CGI=HASH(0x9af7094)') called at /var/www/soap/ProcessImage.pl line 3 ModPerl::ROOT::ModPerl::Registry::var_www_soap_ProcessImage_2epl::handler('Apache2::RequestRec=SCALAR(0x90c7a9c)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 203 eval {...} called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 203 ModPerl::RegistryCooker::run('ModPerl::Registry=HASH(0x90c4054)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/RegistryCooker.pm line 169 ModPerl::RegistryCooker::default_handler('ModPerl::Registry=HASH(0x90c4054)') called at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/Registry.pm line 30 ModPerl::Registry::handler('ModPerl::Registry', 'Apache2::RequestRec=SCALAR(0x90c7a9c)') called at -e line 0 eval {...} called at -e line 0 Use of uninitialized value in concatenation (.) or string at /etc/perl/Foo.pm line 188 (#2) STH= DBH=DBI::db=HASH(0x9d6fdbc) -> DESTROY for DBD::SQLite::db (DBI::db=HASH(0x9d6fd5c)~INNER) thr#8a2fb48 ERROR: '21' 'not an error' (err#0) I'm completely stuck at this point and am going to have to think about work a around. Thanx, Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/