Skip Menu |

This queue is for tickets about the Apache2-ASP CPAN distribution.

Report information
The Basics
Id: 51677
Status: open
Priority: 0/
Queue: Apache2-ASP

People
Owner: jdrago_999 [...] yahoo.com
Requestors: fred [...] redhotpenguin.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.44
Fixed in: (no value)



Subject: asphelper fails to create initial sqlite table schema
I used the asphelper program to create a new application for Apache2::ASP. I started the application with mod_perl in single user mode, and got the following error. DBD::SQLite::db prepare_cached failed: no such table: asp_applications at /Users/phred/dev/perl-5.10.1/lib/site_perl/5.10.1/Apache2/ASP/ApplicationStateManager.pm line 74. Please let me know what additional information I need to provide.
On Wed Nov 18 18:48:07 2009, http://redhotpenguin.myopenid.com/ wrote: Show quoted text
> I used the asphelper program to create a new application for > Apache2::ASP. I started the application with mod_perl in single user > mode, and got the following error. > > DBD::SQLite::db prepare_cached failed: no such table: asp_applications > at > /Users/phred/dev/perl- > 5.10.1/lib/site_perl/5.10.1/Apache2/ASP/ApplicationStateManager.pm > line 74. > > Please let me know what additional information I need to provide.
The use of SQLite is limited strictly to testing, since (AFAIK) SQLite doesn't function quite the same as MySQL or similar. The steps for asphelper are: 1) Create your database in mysql like this: mysql -u root -p (login) Show quoted text
mysql> create database mydatabase; mysql> quit
2) Then - run asphelper and when it asks you for your DSN for Application, Session and Main, type: 3) DBI:mysql:mydatabase:localhost It will login to your mysql database and create the necessary tables (eg: asp_sessions and asp_applications). *** NOTE: The first lines of the httpd.conf that asphelper generates should be removed. The lines in question look like: # Needed for CGI::Apache2::Wrapper to work properly: LoadModule apreq_module modules/mod_apreq2.so The apreq_module (libapreq2) is no longer required. And, since you asked, here is the SQL to create the tables on your own if you want: CREATE TABLE `asp_sessions` ( `session_id` char(32) NOT NULL, `session_data` blob, `created_on` datetime default NULL, `modified_on` datetime default NULL, PRIMARY KEY (`session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `asp_applications` ( `application_id` varchar(100) NOT NULL, `application_data` blob, PRIMARY KEY (`application_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Thanks for using Apache2::ASP!
Subject: Re: [rt.cpan.org #51677] asphelper fails to create initial sqlite table schema
Date: Fri, 20 Nov 2009 21:54:20 -0800
To: bug-Apache2-ASP [...] rt.cpan.org
From: Fred Moyer <fred [...] redhotpenguin.com>
Unfortunately, I don't have MySQL access in the production environment. I'm having to use Apache2::ASP, but need a local datastore such as sqlite or mldbm or the like. Any suggestions? Do I have to have a relational database here? On Fri, Nov 20, 2009 at 9:04 PM, John Drago via RT <bug-Apache2-ASP@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=51677 > > > On Wed Nov 18 18:48:07 2009, http://redhotpenguin.myopenid.com/ wrote:
>> I used the asphelper program to create a new application for >> Apache2::ASP.  I started the application with mod_perl in single user >> mode, and got the following error. >> >> DBD::SQLite::db prepare_cached failed: no such table: asp_applications >> at >> /Users/phred/dev/perl- >> 5.10.1/lib/site_perl/5.10.1/Apache2/ASP/ApplicationStateManager.pm >> line 74. >> >> Please let me know what additional information I need to provide.
> > > The use of SQLite is limited strictly to testing, since (AFAIK) SQLite > doesn't function quite the same as MySQL or similar. > > The steps for asphelper are: > > 1) Create your database in mysql like this: > > mysql -u root -p > (login)
> mysql> create database mydatabase; > mysql> quit
> > 2) Then - run asphelper and when it asks you for your DSN for > Application, Session and Main, type: > > 3) DBI:mysql:mydatabase:localhost > > It will login to your mysql database and create the necessary tables > (eg: asp_sessions and asp_applications). > > > *** NOTE: The first lines of the httpd.conf that asphelper generates > should be removed.  The lines in question look like: > > # Needed for CGI::Apache2::Wrapper to work properly: > LoadModule apreq_module    modules/mod_apreq2.so > > > The apreq_module (libapreq2) is no longer required. > > > > And, since you asked, here is the SQL to create the tables on your own > if you want: > >  CREATE TABLE `asp_sessions` ( >    `session_id` char(32) NOT NULL, >    `session_data` blob, >    `created_on` datetime default NULL, >    `modified_on` datetime default NULL, >    PRIMARY KEY  (`session_id`) >  ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > >  CREATE TABLE `asp_applications` ( >    `application_id` varchar(100) NOT NULL, >    `application_data` blob, >    PRIMARY KEY  (`application_id`) >  ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > > > Thanks for using Apache2::ASP! > >
On Sat Nov 21 00:54:42 2009, fred@redhotpenguin.com wrote: Show quoted text
> Unfortunately, I don't have MySQL access in the production > environment. I'm having to use Apache2::ASP, but need a local > datastore such as sqlite or mldbm or the like. > > Any suggestions? Do I have to have a relational database here? >
Hi, I have some time this weekend for some Apache2::ASP hacking. Should be relatively easy to make SQLite happen. Hang tight!