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 textmysql> 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!