Re: [Catalyst] Creating Catalyst Models from MSSQL
use freetds. On Tue, Aug 4, 2009 at 4:00 PM, k...@volny.cz wrote: Hi, state=1 line=1 server=MyServer text=Invalid object name 'sysrowsetcolumns'. [for Statement SELECT * FROM sysrowsetcolumns WHERE ( 1 = 0 )] at /usr/lib/perl5/site_perl/5.8.8/Catalyst/Helper/Model/DBIC/Schema.pm line 173' At least on MSSQL 2008 sysrowsetcolumns and some other views are hidden and cannot be queried like SELECT * FROM sysrowsetcolumns. The reported error is probably an issue somewhere in DBIx::Class::Schema::Loader (but they are not claiming to support MSSQL - unfortunately). I also seem to remember reading or hearing that DBD::ODBC may be a better solution for MSSQL, but don't quote me on that. DBD::ODBC is a pretty good option that I would recommend if you are on a Win32 system. I am afraid you will not be able to use DBD::ODBC for MSSQL connection from a UNIX system. -- kmx ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Why load modules two times?
Please check my error.log: I find the modules were loaded two times? Why? [Tue Aug 04 01:05:14 2009] [notice] caught SIGTERM, shutting down *[debug] Debug messages enabled* [debug] Statistics enabled [debug] Loaded plugins: .. | Catalyst::Plugin::ConfigLoader 0.20 blabla *[info] myapp powered by Catalyst 5.7014* *[debug] Debug messages enabled* [debug] Statistics enabled [debug] Loaded plugins: .. | Catalyst::Plugin::ConfigLoader 0.20 | blabla *[info] myapp powered by Catalyst 5.7014* [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Why load modules two times?
Thanks. On Tue, Aug 4, 2009 at 4:28 PM, Lars Balker Rasmussen l...@balker.dkwrote: On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modules were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Why load modules two times?
Thanks. But Apache2 has not ServerType option, how to set standalone? On Tue, Aug 4, 2009 at 4:28 PM, Lars Balker Rasmussen l...@balker.dkwrote: On Tue, Aug 4, 2009 at 10:07 AM, Malloyjackwor...@gmail.com wrote: I find the modules were loaded two times? [info] myapp powered by Catalyst 5.7014 [Tue Aug 04 01:05:18 2009] [notice] Apache/2.2.9 (Debian) DAV/2 SVN/1.5.1 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations That's how mod_perl rolls. I think you'll find that the standalone server doesn't load the modules twice. http://perl.apache.org/docs/2.0/user/handlers/server.html Best way to avoid this: don't use mod_perl. -- Lars Balker RasmussenConsult::Perl ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] how to set CATALYST_DEBUG
Hi All I removed -Debug, and set $ENV{CATALYST_DEBUG} =1 using PerlSetEnv CATALYST_DEBUG 1. But it doesn't work. I can't see the debug info in the apache log file. -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] how to set CATALYST_DEBUG
I can get $ENV{CATALYST_DEBUG} in my templates. But can't get it in lib/{App}.pm. #Use of uninitialized value $ENV{CATALYST_DEBUG} in print at /path/lib/{app}.pm line 38. And Catalyst is up to date. cpan install Catalyst Catalyst is up to date (5.80005). On Tue, Jun 30, 2009 at 2:45 AM, Tomas Doran bobtf...@bobtfish.net wrote: On 29 Jun 2009, at 14:34, Ian Wells wrote: I removed -Debug, and set $ENV{CATALYST_DEBUG} =1 using PerlSetEnv CATALYST_DEBUG 1. Malloy, try dumping $ENV{CATALYST_DEBUG} in your app code and seeing if it's actually set. Ideally, do that in lib/{App}.pm . This behavior sounds like you may be running 5.80001. If that's the case, please upgrade - you're hitting a bug which was fixed. Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] upgraded to latest catalyst runtime 5.8 and Catalyst::Plugin::Upload::Image::Magick::Thumbnail::Fixed cant be loaded
I'm very sorry to hear that. On Thu, Apr 30, 2009 at 9:40 PM, kakim...@tpg.com.au wrote: hi guys i thought i upgrade my server's catalyst runtime package to the latest one. When I tried running my app, i got this error: Could not load class (Catalyst::Plugin::Upload::Image::Magick::Thumbnail::Fixed) because : You are trying to modify Catalyst::Request::Upload, which has been made immutable, this is not supported. Try subclassing Catalyst::Request::Upload, rather than monkeypatching it at /usr/local/lib/perl5/site_perl/5.8.9/MooseX/Emulate/Class/Accessor/Fast.pm line 107 Catalyst::Component::mk_accessors('Catalyst::Request::Upload', '_thumbnail_fixed', '_thumbnail_temp') called at /usr/local/lib/perl5/site_perl/5.8.9/Catalyst/Plugin/Upload/Image/Magick/Thumbnail/Fixed.pm line 108 require Catalyst/Plugin/Upload/Image/Magick/Thumbnail/Fixed.pm called at /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/Class/MOP.pm line 136 ... This is what part of my lib/MyApp.pm looks like: use Catalyst qw( -Debug ConfigLoader Static::Simple StackTrace Authentication Authentication::Store::DBIC Authentication::Credential::Password Authorization::ACL Authorization::Roles Cache Cache::Store::FastMmap FormValidator Session Session::Store::FastMmap Session::State::Cookie Upload::Image::Magick Upload::Image::Magick::Thumbnail::Fixed ); Anyway, i went to lib/MyApp.pm and removed ' Upload::Image::Magick::Thumbnail::Fixed' and ran the app. Bear in mind I still had ' Upload::Image::Magick' there. When I tried to run script/myApp_server.pl again, I got this error: Could not load class (Catalyst::Plugin::Upload::Image::Magick) because : You are trying to modify Catalyst::Request::Upload, which has been made immutable, this is not supported. Try subclassing Catalyst::Request::Upload, rather than monkeypatching it at /usr/local/lib/perl5/site_perl/5.8.9/MooseX/Emulate/Class/Accessor/Fast.pm line 107 Catalyst::Component::mk_accessors('Catalyst::Request::Upload', '_image') called at /usr/local/lib/perl5/site_perl/5.8.9/Catalyst/Plugin/Upload/Image/Magick.pm line 50 require Catalyst/Plugin/Upload/Image/Magick.pm called at /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/Class/MOP.pm line 136 eval {...} called at /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/Class/MOP.pm line 136 Class::MOP::_try_load_one_class('Catalyst::Plugin::Upload::Image::Magick') called at /usr/local/lib/perl5/site_perl/5.8.9/x86_64-linux/Class/MOP.pm line 99 ... Try subclassing Catalyst::Request::Upload, -- What does it mean and how do I go about doing it? Then again, another question would be, is it a core issue? . thank you for your time. I look forward to hearing some comments. K. akimoto ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using mysql_enable_utf8
I set init_connect=utf8 in my.cnf. 2009/4/29 Octavian Rasnita orasn...@gmail.com Hi, I need to use C::M::DBI for a fulltext index with MySQL, and the tables contain UTF-8 data. I found that I can use mysql_enable_utf8 but I couldn't find how to use this option. I've tried to use it in the model in 2 places as: __PACKAGE__-config( dsn = 'dbi:mysql:database=intranet', user = 'root', password = undef, options = { mysql_enable_utf8 = 1, }, mysql_enable_utf8 = 1, ); And I also tried to use it in the controller as $dbh-{mysql_enable_utf8} = 1; But with no success. The data still appears not encoded to UTF-8. What am I doing wrong? Or do I need to make some other configurations? ---Octavian ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Which model is better, DBI or DBIC::Schema?
Which model is better, DBI or DBIC::Schema? Thanks. -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] so many 'sleep' process in mysql.
I use 'Catalyst::Model::DBIC::Schema'. But i find so many 'sleep' process in mysql. Is it normal? If not, why and how to avoid it? -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] about catalyst authentication
Thanks. I think so, too. But why Cache::FastMmap deletes it? Where can set it? I just use all config default. use Catalyst qw/-Debug ConfigLoader::MultiState Static::Simple StackTrace Authentication Session Session::Store::FastMmap Session::State::Cookie/; Plugin-Authentication.conf: $default_realm = 'default'; $realms = { 'default' = { 'credential' = { 'class' = 'Password', 'password_field' = 'password', 'password_type' = 'hashed', 'password_hash_type' = 'MD5', }, 'store' = { 'class' = 'DBI', 'user_table' = 'qy_user', 'user_key' = 'id', 'user_name' = 'username', 'user_password' = 'password', }, }, }; $use_session = 1; On Sat, Apr 18, 2009 at 2:52 PM, Andrew Rodland arodl...@comcast.netwrote: On Saturday 18 April 2009 01:28:30 am Malloy wrote: After restart apache, user must login again. I find $c-user_existsis not true. Why? Because you're using Session::Store::FastMmap and the session cache file didn't exist before your app started, so Cache::FastMmap deletes it on exit? Andrew ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] about catalyst authentication
Yep. but how to fix this problem? On Sat, Apr 18, 2009 at 3:22 PM, Devin Austin devin.aus...@gmail.comwrote: The point is, your sessions are going to be cleared out upon server restart. -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] about catalyst authentication
I find: debian:/tmp/qy# ls session_data debian:/tmp/qy# /etc/init.d/apache2 stop Stopping web server: apache2 ... waiting . debian:/tmp/qy# ls debian:/tmp/qy# The session file is cleared out when apache stop. How to fix this problem? On Sat, Apr 18, 2009 at 3:22 PM, Devin Austin devin.aus...@gmail.comwrote: The point is, your sessions are going to be cleared out upon server restart. -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] about catalyst authentication
I think something is wrong. Please check: I have two apps wc and qy: * WC:* debian:/tmp/wc# /etc/init.d/apache2 start Starting web server: apache2. debian:/tmp/wc# ls session_data debian:/tmp/wc# /etc/init.d/apache2 stop Stopping web server: apache2 ... waiting . debian:/tmp/wc# ls session_data *The session_data is there and user needn't login again.* use Catalyst qw/-Debug ConfigLoader Static::Simple StackTrace Authentication Session Session::Store::FastMmap Session::State::Cookie/; authentication default_realm dbic realms dbic credential # Note: this first definition would be the same as setting # __PACKAGE__-config-{authentication}-{realms}-{dbic} # -{credential} = 'Password' in lib/MyApp.pm # # Specify that we are going to do password-based auth class Password # This is the name of the field in the users table with the # password stored in it password_field password # Switch to more secure hashed passwords password_type hashed # Use the MD5 hashing algorithm password_hash_type MD5 /credential store # Use DBIC to retrieve username, password role information *class DBIx::Class* # This is the model object created by Catalyst::Model::DBIC # from your schema (you created 'MyApp::Schema::Result::User' # but as the Catalyst startup debug messages show, it was # loaded as 'MyApp::Model::DB::Users'). # NOTE: Omit 'MyApp::Model' here just as you would when using # '$c-model(DB::Users)' user_class WCDB::WcUser /store /dbic /realms /authentication * QY:* debian:/tmp/qy# /etc/init.d/apache2 start Starting web server: apache2. debian:/tmp/qy# ls session_data debian:/tmp/qy# /etc/init.d/apache2 stop Stopping web server: apache2 ... waiting . debian:/tmp/qy# ls debian:/tmp/qy# * The session_data is cleared out and user must login again. *use Catalyst qw/-Debug ConfigLoader::MultiState Static::Simple StackTrace Authentication Session Session::Store::FastMmap Session::State::URI Session::State::Cookie/; $default_realm = 'default'; $realms = { 'default' = { 'credential' = { 'class' = 'Password', 'password_field' = 'password', 'password_type' = 'hashed', 'password_hash_type' = 'MD5', }, 'store' = { * 'class' = 'DBI',* 'user_table' = 'qy_user', 'user_key' = 'id', 'user_name' = 'username', 'user_password' = 'password', }, }, }; $use_session = 1; On Sat, Apr 18, 2009 at 3:36 PM, Devin Austin devin.aus...@gmail.comwrote: If your data needs to be more persistent save it in the database -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] about catalyst authentication
Thanks all. It's ok now. -- Jack Malloy ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/