cppcms-users Mailing List for CppCMS C++ Web Framework (Page 103)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Marcel H. <ke...@co...> - 2011-11-25 20:10:29
|
What is the MysqlClient under Fedora? I nearly installed every packed that has something to do with mysql under fedora, but it still says me: "-- mysqlclient not found, disableing mysql backend" I can compile it without, but don't have the mysql features. What is your experience? |
From: Daniel V. <chi...@gm...> - 2011-11-25 04:16:04
|
Hello Ayrtom. I added (see attachment) a feature to cppcms::rpc::json_method and it's binders. The feature allow to bind parameters of type: const cppcms::json::value const & cppcms::json::object const & cppcms::json::array const & std::string const & The forwarding of these types are passed by reference (zero copy overhead). For Example we can add a json rpc method of type: void my_rpc::my_method(json::array const& a, json::object& o, json::value& v); ... bind("my_method", json_method(&my_rpc::my_method,this), json_rpc_server::method_role); ... In theory the changes no breaks backward compatibility and ABI. In practice my whole project compile with it without change. Please review the code if you wish. Thank you. |
From: 陈抒 <csf...@gm...> - 2011-11-20 11:51:33
|
Yes,you are right.I made a mistake,ignored one line code. Thank you. It works now. 陈抒 Best regards http://blog.csdn.net/sheismylife On Sun, Nov 20, 2011 at 7:32 PM, Artyom Beilis <art...@ya...> wrote: > response().out() << wrapper_function <<'('; > auto_ptr<cppdb::session> session = > sql_session_factory::create_session(); > shared_ptr<web_user> user = user_manager::login(*session,email,pwd); > if(user){ > BOOSTER_INFO("hello") << "login succeeded"; > this->session()["email"]=user->email; > response().out()<<"{result:\"Login successfully!\"}"; > > This is exactly the problem I described. You must set session value beforeyou call response().out() > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > > *To:* Artyom Beilis <art...@ya...>; > cpp...@li... > *Sent:* Sunday, November 20, 2011 1:17 PM > *Subject:* Re: [Cppcms-users] session question about cppcms > > I change my codes order like so,but I am using JSONP,Javascript code on > client-side calls hello::login method on server-side via JSONP and HTTP > POST. > I can see the transferred data between browser and server by using > Chromium debugger.No cookie found. > > > void hello::login(string str){ > if(request().request_method()=="POST") { > //string wrapper_function = request().get("callback"); > string email = request().post().find("email")->second; > string pwd = request().post().find("pwd")->second; > string wrapper_function = request().post().find("callback")->second; > BOOSTER_INFO("hello") << "email:" << email <<" pwd=" <<pwd <<" > callback="<< wrapper_function; > try{ > response().out() << wrapper_function <<'('; > auto_ptr<cppdb::session> session = > sql_session_factory::create_session(); > shared_ptr<web_user> user = user_manager::login(*session,email,pwd); > if(user){ > BOOSTER_INFO("hello") << "login succeeded"; > this->session()["email"]=user->email; > response().out()<<"{result:\"Login successfully!\"}"; > response().out() << ')'; > > BOOSTER_INFO("hello") <<"session has email > now:"<<this->session()["email"]; > }else{ > BOOSTER_INFO("hello") << "login failed"; > response().out()<<"{result:\"Login failed!\"}"; > response().out() << ')'; > } > }catch(std::exception const& ex){ > response().out() << wrapper_function <<'('; > response().out()<<"{result:\""<<ex.what()<<"\"}"; > response().out() << ')'; > } > } > } > > > > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sun, Nov 20, 2011 at 6:06 PM, Artyom Beilis <art...@ya...>wrote: > > Hello, > > > Make sure you update the session **before** any output is written. The > session > is saved on first access to response().out() as Cookies should be send in > HTTP > headers before the content. > > Also take a look on server response that sets the session see if it > includes proper > cookie. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: cpp...@li... > >Sent: Sunday, November 20, 2011 11:56 AM > >Subject: [Cppcms-users] session question about cppcms > > > > > >Hello, > > I try to save an email address of current user into session after he > logs into web server correctly.Here is my codes: > >... > >this->session()["email"]=user->email; > >BOOSTER_INFO("hello") <<"session has email > now:"<<this->session()["email"]; > >... > > > > Then I refresh the page,and debug into my application,but can't find > the email from session > > > >void hello::welcome(std::string url){ > > BOOSTER_INFO("hello") << "Enter welcome function"; > > if(session().is_set("email")){ > > string email = this->session().get(string("email")); > > c_.email = email; > > } > > render("my_skin","message",c_); > >} > > > > > > session().is_set("email") returns false; > > > > > >My session configuration looks like so: > > "session" : { > >"expire" : "renew", > >"timeout" : 600, > >"location" : "server", > >"server":{ > > "storage":"memory" > >} > > } > > > > > > > > > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > >------------------------------------------------------------------------------ > >All the data continuously generated in your IT infrastructure > >contains a definitive record of customers, application performance, > >security threats, fraudulent activity, and more. Splunk takes this > >data and makes sense of it. IT sense. And common sense. > >http://p.sf.net/sfu/splunk-novd2d > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2011-11-20 11:32:37
|
response().out() << wrapper_function <<'('; auto_ptr<cppdb::session> session = sql_session_factory::create_session(); shared_ptr<web_user> user = user_manager::login(*session,email,pwd); if(user){ BOOSTER_INFO("hello") << "login succeeded"; this->session()["email"]=user->email; response().out()<<"{result:\"Login successfully!\"}"; This is exactly the problem I described. You must set session value beforeyou call response().out() Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Sunday, November 20, 2011 1:17 PM >Subject: Re: [Cppcms-users] session question about cppcms > > >I change my codes order like so,but I am using JSONP,Javascript code on client-side calls hello::login method on server-side via JSONP and HTTP POST. >I can see the transferred data between browser and server by using Chromium debugger.No cookie found. > > > > >void hello::login(string str){ > if(request().request_method()=="POST") { >//string wrapper_function = request().get("callback"); >string email = request().post().find("email")->second; >string pwd = request().post().find("pwd")->second; >string wrapper_function = request().post().find("callback")->second; >BOOSTER_INFO("hello") << "email:" << email <<" pwd=" <<pwd <<" callback="<< wrapper_function; >try{ > response().out() << wrapper_function <<'('; > auto_ptr<cppdb::session> session = sql_session_factory::create_session(); > shared_ptr<web_user> user = user_manager::login(*session,email,pwd); > if(user){ >BOOSTER_INFO("hello") << "login succeeded"; >this->session()["email"]=user->email; >response().out()<<"{result:\"Login successfully!\"}"; >response().out() << ')'; > > >BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"]; > }else{ >BOOSTER_INFO("hello") << "login failed"; >response().out()<<"{result:\"Login failed!\"}"; >response().out() << ')'; > } >}catch(std::exception const& ex){ > response().out() << wrapper_function <<'('; > response().out()<<"{result:\""<<ex.what()<<"\"}"; > response().out() << ')'; >} > } >} > > > > > > > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sun, Nov 20, 2011 at 6:06 PM, Artyom Beilis <art...@ya...> wrote: > >Hello, >> >> >>Make sure you update the session **before** any output is written. The session >>is saved on first access to response().out() as Cookies should be send in HTTP >>headers before the content. >> >>Also take a look on server response that sets the session see if it includes proper >>cookie. >> >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.sf.net/ >>CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >> >> >>>________________________________ >>> From: 陈抒 <csf...@gm...> >>>To: cpp...@li... >>>Sent: Sunday, November 20, 2011 11:56 AM >>>Subject: [Cppcms-users] session question about cppcms >> >>> >>> >>>Hello, >>> I try to save an email address of current user into session after he logs into web server correctly.Here is my codes: >>>... >>>this->session()["email"]=user->email; >>>BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"]; >>>... >>> >>> Then I refresh the page,and debug into my application,but can't find the email from session >>> >>>void hello::welcome(std::string url){ >>> BOOSTER_INFO("hello") << "Enter welcome function"; >>> if(session().is_set("email")){ >>> string email = this->session().get(string("email")); >>> c_.email = email; >>> } >>> render("my_skin","message",c_); >>>} >>> >>> >>> session().is_set("email") returns false; >>> >>> >>>My session configuration looks like so: >>> "session" : { >>>"expire" : "renew", >>>"timeout" : 600, >>>"location" : "server", >>>"server":{ >>> "storage":"memory" >>>} >>> } >>> >>> >>> >>> >>> >>> >>>陈抒 >>>Best regards >>>http://blog.csdn.net/sheismylife >>> >>>------------------------------------------------------------------------------ >>>All the data continuously generated in your IT infrastructure >>>contains a definitive record of customers, application performance, >>>security threats, fraudulent activity, and more. Splunk takes this >>>data and makes sense of it. IT sense. And common sense. >>>http://p.sf.net/sfu/splunk-novd2d >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> >>> >> >>------------------------------------------------------------------------------ >>All the data continuously generated in your IT infrastructure >>contains a definitive record of customers, application performance, >>security threats, fraudulent activity, and more. Splunk takes this >>data and makes sense of it. IT sense. And common sense. >>http://p.sf.net/sfu/splunk-novd2d >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >All the data continuously generated in your IT infrastructure >contains a definitive record of customers, application performance, >security threats, fraudulent activity, and more. Splunk takes this >data and makes sense of it. IT sense. And common sense. >http://p.sf.net/sfu/splunk-novd2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-11-20 11:18:08
|
I change my codes order like so,but I am using JSONP,Javascript code on client-side calls hello::login method on server-side via JSONP and HTTP POST. I can see the transferred data between browser and server by using Chromium debugger.No cookie found. void hello::login(string str){ if(request().request_method()=="POST") { //string wrapper_function = request().get("callback"); string email = request().post().find("email")->second; string pwd = request().post().find("pwd")->second; string wrapper_function = request().post().find("callback")->second; BOOSTER_INFO("hello") << "email:" << email <<" pwd=" <<pwd <<" callback="<< wrapper_function; try{ response().out() << wrapper_function <<'('; auto_ptr<cppdb::session> session = sql_session_factory::create_session(); shared_ptr<web_user> user = user_manager::login(*session,email,pwd); if(user){ BOOSTER_INFO("hello") << "login succeeded"; this->session()["email"]=user->email; response().out()<<"{result:\"Login successfully!\"}"; response().out() << ')'; BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"]; }else{ BOOSTER_INFO("hello") << "login failed"; response().out()<<"{result:\"Login failed!\"}"; response().out() << ')'; } }catch(std::exception const& ex){ response().out() << wrapper_function <<'('; response().out()<<"{result:\""<<ex.what()<<"\"}"; response().out() << ')'; } } } 陈抒 Best regards http://blog.csdn.net/sheismylife On Sun, Nov 20, 2011 at 6:06 PM, Artyom Beilis <art...@ya...> wrote: > Hello, > > > Make sure you update the session **before** any output is written. The > session > is saved on first access to response().out() as Cookies should be send in > HTTP > headers before the content. > > Also take a look on server response that sets the session see if it > includes proper > cookie. > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > > >________________________________ > > From: 陈抒 <csf...@gm...> > >To: cpp...@li... > >Sent: Sunday, November 20, 2011 11:56 AM > >Subject: [Cppcms-users] session question about cppcms > > > > > >Hello, > > I try to save an email address of current user into session after he > logs into web server correctly.Here is my codes: > >... > >this->session()["email"]=user->email; > >BOOSTER_INFO("hello") <<"session has email > now:"<<this->session()["email"]; > >... > > > > Then I refresh the page,and debug into my application,but can't find > the email from session > > > >void hello::welcome(std::string url){ > > BOOSTER_INFO("hello") << "Enter welcome function"; > > if(session().is_set("email")){ > > string email = this->session().get(string("email")); > > c_.email = email; > > } > > render("my_skin","message",c_); > >} > > > > > > session().is_set("email") returns false; > > > > > >My session configuration looks like so: > > "session" : { > >"expire" : "renew", > >"timeout" : 600, > >"location" : "server", > >"server":{ > > "storage":"memory" > >} > > } > > > > > > > > > > > > > >陈抒 > >Best regards > >http://blog.csdn.net/sheismylife > > > > >------------------------------------------------------------------------------ > >All the data continuously generated in your IT infrastructure > >contains a definitive record of customers, application performance, > >security threats, fraudulent activity, and more. Splunk takes this > >data and makes sense of it. IT sense. And common sense. > >http://p.sf.net/sfu/splunk-novd2d > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2011-11-20 10:06:10
|
Hello, Make sure you update the session **before** any output is written. The session is saved on first access to response().out() as Cookies should be send in HTTP headers before the content. Also take a look on server response that sets the session see if it includes proper cookie. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ > From: 陈抒 <csf...@gm...> >To: cpp...@li... >Sent: Sunday, November 20, 2011 11:56 AM >Subject: [Cppcms-users] session question about cppcms > > >Hello, > I try to save an email address of current user into session after he logs into web server correctly.Here is my codes: >... >this->session()["email"]=user->email; >BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"]; >... > > Then I refresh the page,and debug into my application,but can't find the email from session > >void hello::welcome(std::string url){ > BOOSTER_INFO("hello") << "Enter welcome function"; > if(session().is_set("email")){ > string email = this->session().get(string("email")); > c_.email = email; > } > render("my_skin","message",c_); >} > > > session().is_set("email") returns false; > > >My session configuration looks like so: > "session" : { >"expire" : "renew", >"timeout" : 600, >"location" : "server", >"server":{ > "storage":"memory" >} > } > > > > > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > >------------------------------------------------------------------------------ >All the data continuously generated in your IT infrastructure >contains a definitive record of customers, application performance, >security threats, fraudulent activity, and more. Splunk takes this >data and makes sense of it. IT sense. And common sense. >http://p.sf.net/sfu/splunk-novd2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-11-20 09:56:43
|
Hello, I try to save an email address of current user into session after he logs into web server correctly.Here is my codes: ... this->session()["email"]=user->email; BOOSTER_INFO("hello") <<"session has email now:"<<this->session()["email"]; ... Then I refresh the page,and debug into my application,but can't find the email from session void hello::welcome(std::string url){ BOOSTER_INFO("hello") << "Enter welcome function"; if(session().is_set("email")){ string email = this->session().get(string("email")); c_.email = email; } render("my_skin","message",c_); } session().is_set("email") returns false; My session configuration looks like so: "session" : { "expire" : "renew", "timeout" : 600, "location" : "server", "server":{ "storage":"memory" } } 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: Artyom B. <art...@ya...> - 2011-11-18 17:34:38
|
Thanks, I'm glad you enjoy this framework. I had updated the wiki. Regards Artyom Beilis |
From: Artyom B. <art...@ya...> - 2011-11-18 17:32:36
|
Hello, Release notes can be found here: http://art-blog.no-ip.info/cppcms/blog/post/89 Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ |
From: 陈抒 <csf...@gm...> - 2011-11-18 02:57:01
|
Hello,Artyom: My team has developed two applications which based on your CppCMS and CppDB, one has been run over three weeks. the system is stable and the performance is good at present. We also have done the loading test at the program, and there is no memory leak and DB connection leak. This application called XBox, which is like a lottery system, and our website(L99.com) user may grab a box that flies from the bottom of the page. Then user could gain variety of awards, also including virtual and material.Perhaps you can change the product name from ‘developing new products using CppCMS’ into ‘XBox--a lottery system and still developing other new products using CppCMS’ on your wiki. Thank you very much that you bring such high-quality framework to the whole world. 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: Artyom B. <art...@ya...> - 2011-11-17 12:31:45
|
Currently there is no way to disable this timeout. However you can define very high value for example a month (24*3600* 30) See: http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_config#http.timeout Also I would strongly discourage from using infinite timeout as for example client closes the connection without notification (shutdown(2))you will **never** detect it or detect it after very long period of time which makes the application vulnerable. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ ----- Original Message ----- > From: Julian Pietron <ju...@wh...> > To: cpp...@li... > Cc: > Sent: Thursday, November 17, 2011 1:53 PM > Subject: [Cppcms-users] Howto disable HTTP timeout introduced with 0.99.10 > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hallo, > > is there a way to disable the HTTP timeout that has been introduced in > 0.99.10 and restore the old behaviour of having no timeouts at all? As > we are using COMET long polling over here, we'd require a connection > that doesn't time out. Automatically reconnect from client side is no > option here, as we send the reconnect command in our response and so the > client won't do anything if it receives an empty 200 Ok response. > > Thanks, > Julian > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.18 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQIcBAEBAgAGBQJOxPXDAAoJENidYKvYQHlQZPoP/3l+GivNAjNpYj4U1IxSdimq > r0Pief7a24/EZiOixSA2ZxB7Int3LEwMjHhFy2+TdrUGzkFBeZZnpKiajtCb9ZvG > 2Or+s8jkEAPIa4gybLPDEOhFGRg0BYmfaOHKlBiDoRSB4RFSOhb8eqn9ZjhaBZE6 > yRAKndAtoCzliH2nWYNf53aD4oGRfWhfxf/Mtu5hk9PSJpoM+fTndePR9iiJRm+Q > J6C7JyJ23tYGM0d2BTHJYFfs6ZkOaD56Lg2Ui2GadJGcejBoo8LKaqltxbHlSTMC > eJn/MpADHceM3AqMJtPRP/p+XwipHkZuqFCPh+WasKDxyoIffA0eP7r0GDugtAIE > f2Y8NJvODxFFvQmR1EuJRH1dVYDTGh9ShpRdQuP6lQxoEhiwCR4gbVXpgHXGS5aC > nrA8X67NY2QpjnPTJ+OlfFOXOsMCWyWsVXe/B3b4vTnsFy520cPpultJDVoieY1g > cLOhwtUeQwPPTOLX3vibjauYU4XVAUD6TqGXJ7QEHl/4tKI3epyH6ZV9u2+oaT0B > 4mNI7/4tYfLUpYpvd4j4kcSDsgoVv1jVqYyHykP7GrqE/C250wyYKTkDnXgnOZ1S > sj+EtpJMMYoM2lyOKc1gz9HE37BFFNL1dnPZ35tH+K9x5v1vKvlddNdVQ7DZXTln > 9a5D+rso8rAp+ZmXojQY > =08t0 > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Julian P. <ju...@wh...> - 2011-11-17 12:11:33
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hallo, is there a way to disable the HTTP timeout that has been introduced in 0.99.10 and restore the old behaviour of having no timeouts at all? As we are using COMET long polling over here, we'd require a connection that doesn't time out. Automatically reconnect from client side is no option here, as we send the reconnect command in our response and so the client won't do anything if it receives an empty 200 Ok response. Thanks, Julian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOxPXDAAoJENidYKvYQHlQZPoP/3l+GivNAjNpYj4U1IxSdimq r0Pief7a24/EZiOixSA2ZxB7Int3LEwMjHhFy2+TdrUGzkFBeZZnpKiajtCb9ZvG 2Or+s8jkEAPIa4gybLPDEOhFGRg0BYmfaOHKlBiDoRSB4RFSOhb8eqn9ZjhaBZE6 yRAKndAtoCzliH2nWYNf53aD4oGRfWhfxf/Mtu5hk9PSJpoM+fTndePR9iiJRm+Q J6C7JyJ23tYGM0d2BTHJYFfs6ZkOaD56Lg2Ui2GadJGcejBoo8LKaqltxbHlSTMC eJn/MpADHceM3AqMJtPRP/p+XwipHkZuqFCPh+WasKDxyoIffA0eP7r0GDugtAIE f2Y8NJvODxFFvQmR1EuJRH1dVYDTGh9ShpRdQuP6lQxoEhiwCR4gbVXpgHXGS5aC nrA8X67NY2QpjnPTJ+OlfFOXOsMCWyWsVXe/B3b4vTnsFy520cPpultJDVoieY1g cLOhwtUeQwPPTOLX3vibjauYU4XVAUD6TqGXJ7QEHl/4tKI3epyH6ZV9u2+oaT0B 4mNI7/4tYfLUpYpvd4j4kcSDsgoVv1jVqYyHykP7GrqE/C250wyYKTkDnXgnOZ1S sj+EtpJMMYoM2lyOKc1gz9HE37BFFNL1dnPZ35tH+K9x5v1vKvlddNdVQ7DZXTln 9a5D+rso8rAp+ZmXojQY =08t0 -----END PGP SIGNATURE----- |
From: Artyom B. <art...@ya...> - 2011-11-17 12:05:17
|
----- Original Message ----- > From: kpeo <sla...@ya...> > To: cpp...@li... > Cc: > Sent: Tuesday, November 15, 2011 8:16 PM > Subject: [Cppcms-users] plugins implementation > > Hello Artyom and all! > > Working on my project, I had to implement a plugins factory, that can be useful > in working on a new version of CppCMS. > It's in pre-alpha working version yet. > In my implementation, the JSON configuration file with plugins options is loaded > separately, but instead, it's easy to rewrite the code to use the CppCMS > settings() function. > > The code can be found here: http://tinyurl.com/cdpe8ny Nice. > > Also, think it would be nice to be able for dynamically load the application > views from inside of the application - for abilities of loading plugins with own > views embedded in application skin/namespace. > You can always load compiled view and it would automatically register itself Artyom |
From: Artyom B. <art...@ya...> - 2011-11-17 11:58:30
|
>From: 陈抒 <csf...@gm...> > > >It seems that my application based on CppCMS didn't receive any request. > > >>2011/11/17 04:47:23 [error] 2019#0: *46 open() "/usr/nginx/html/save_email" failed (2: No such file or directory), client: 124.207.104.18, server: localhost, request: "GET /sav\ >>e_email?content=send%20email%20test%20&callback=jQuery15107370382682420313_1321523058476&_=1321526506452 HTTP/1.1", host: "www.cmltechnology.com"; There is a problem with you nginx configuration. It does not forward the request to FastCGI application but rather try to handle it as a file Best, Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > |
From: 陈抒 <csf...@gm...> - 2011-11-17 11:33:24
|
It seems that my application based on CppCMS didn't receive any request. 陈抒 Best regards http://blog.csdn.net/sheismylife On Thu, Nov 17, 2011 at 7:15 PM, 陈抒 <csf...@gm...> wrote: > Hello,Artyom: > When I tried to use CppCMS with Nginx,the jsonp call doesn't work. > I look into my Nginx log files and list some info below: > > in access.log > 124.207.104.18 - - [17/Nov/2011:04:47:23 -0600] "GET > /save_email?content=send%20email%20test%20&callback=jQuery15107370382682420313_1321523058476&_=1321526506452 > HTTP/1.1" 404 \ > 168 "-" "curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e > zlib/1.2.3.4 libidn/1.22 librtmp/2.3" > > in error.log > > 2011/11/17 04:47:23 [error] 2019#0: *46 open() > "/usr/nginx/html/save_email" failed (2: No such file or directory), client: > 124.207.104.18, server: localhost, request: "GET /sav\ > e_email?content=send%20email%20test%20&callback=jQuery15107370382682420313_1321523058476&_=1321526506452 > HTTP/1.1", host: "www.cmltechnology.com" > > If I don't use Nginx and FastCGI with CppCMS,my jsonp function > works,here is my JavaScript function definition: > <script type="text/javascript"> > function save_email(){ > var message=document.getElementById("email_content").value; > $.ajax({ > "url": "http://www.cmltechnology.com/save_email?content= > "+message+"&callback=?", > type:"get", > dataType:"jsonp", > jsonp:"callback", > success:function(data){ > alert(data.result); > }, > error:function(err){ > alert(err.result); > }, > complete: function(msg){ > } > }); > } > </script> > > > Any idea? > > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > On Sun, Oct 2, 2011 at 9:32 AM, chenshu <csf...@gm...> wrote: > >> On 10/01/2011 10:10 PM, Artyom Beilis wrote: >> >>> Take a look on: >>> >>> http://art-blog.no-ip.info/**wikipp/en/page/cppcms_1x_**config#views<http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views> >>> >>> If you use more then one skin you need either: >>> >>> 1. To specify skin name explicitly render("myskin","message",**content) >>> >>> 2. To specify the default skin in configuration file. >>> >>> Also I'd suggest following: >>> >>> 1. If you have pages that have same base view (like same "theme") >>> then put them into same skin. Use some basic template that defines >>> general appearance of the page and extend it with inheritance >>> >>> to specific purposes. >>> 2. For totally different pages like "administrative interface" and >>> "public interface" use different skins. >>> >>> See: http://art-blog.no-ip.info/**wikipp/en/page/cppcms_1x_** >>> templates_gen<http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_templates_gen> >>> Artyom Beilis >>> -------------- >>> CppCMS - C++ Web Framework: http://cppcms.sf.net/ >>> CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/**cppdb/<http://cppcms.sf.net/sql/cppdb/> >>> >>> >>> ----- Original Message ----- >>> >>>> From: chenshu<csf...@gm...> >>>> To: cppcms-users@lists.**sourceforge.net<cpp...@li...> >>>> Cc: >>>> Sent: Saturday, October 1, 2011 3:26 PM >>>> Subject: [Cppcms-users] How to add second web page in CppCMS >>>> application? >>>> >>>> Hello, >>>> I have set up one simple web application >>>> here:http://www.**cmlelectronics.com:8080/kaimei<http://www.cmlelectronics.com:8080/kaimei> >>>> It only has one page and works.Now I try to add another new page for >>>> registering new user. >>>> I create register_client.tmpl in src folder,configure my CMakeLists.txt >>>> like so: >>>> >>>> //for my first page >>>> add_custom_command( >>>> OUTPUT ${CMAKE_SOURCE_DIR}/src/my_**skin.cpp >>>> COMMAND cppcms_tmpl_cc ${CMAKE_SOURCE_DIR}/src/**welcome.tmpl -o >>>> ${CMAKE_SOURCE_DIR}/src/my_**skin.cpp >>>> DEPENDS welcome.tmpl >>>> ) >>>> >>>> //for my second page >>>> add_custom_command( >>>> OUTPUT ${CMAKE_SOURCE_DIR}/src/**register_client.cpp >>>> COMMAND cppcms_tmpl_cc ${CMAKE_SOURCE_DIR}/src/** >>>> register_client.tmpl >>>> -o ${CMAKE_SOURCE_DIR}/src/**register_client.cpp >>>> DEPENDS register_client.tmpl >>>> ) >>>> >>>> AUX_SOURCE_DIRECTORY(${CMAKE_**SOURCE_DIR}/src CPP_LIST) >>>> add_executable(main ${CPP_LIST} my_skin.cpp register_client.cpp) >>>> >>>> The following is my config.js: >>>> >>>> { >>>> "service" : { >>>> "ip":"0.0.0.0", >>>> "api" : "http", >>>> "port" : 8080 >>>> }, >>>> "db" : { >>>> "name" : "fucai", >>>> "ip" : "myip", >>>> "user": "myusr", >>>> "password":"mypwd" >>>> }, >>>> "http" : { >>>> "script_names" : ["/kaimei"] >>>> }, >>>> "uri_config":{ >>>> "base":"http://www.**cmlelectronics.com<http://www.cmlelectronics.com> >>>> ", >>>> "jsonp":"http://localhost:8080**" >>>> } >>>> } >>>> >>>> >>>> I defined one class hello: >>>> class hello : public cppcms::application { >>>> public: >>>> hello(cppcms::service&srv); >>>> void save_email(std::string content); >>>> void welcome(std::string url); >>>> void register_client(std::string url); >>>> >>>> private: >>>> content::message c_; >>>> }; >>>> >>>> >>>> >>>> hello::hello(cppcms::service&**srv):cppcms::application(srv){ >>>> dispatcher().assign("/welcome" ,&hello::welcome , this , 1); >>>> dispatcher().assign("/**register" ,&hello::register_client , >>>> this , 2); >>>> dispatcher().assign("/save_**email?(.+)" ,&hello::save_email , >>>> >>>> this , 3); >>>> configuration& config = app_singleton_holder::** >>>> Instance().config(); >>>> c_.base_uri=config.base_uri; >>>> c_.jsonp= config.jsonp; >>>> } >>>> >>>> void hello::welcome(std::string url){ >>>> render("message",c_); >>>> } >>>> >>>> >>>> void hello::register_client(std::**string url){ >>>> render("message2",c_); >>>> } >>>> >>>> >>>> >>>> >>>> But always get the following error message when I want to open my pages >>>> via http://localhost:8080/kaimei/**welcome<http://localhost:8080/kaimei/welcome>or >>>> http://localhost:8080/kaimei/**register<http://localhost:8080/kaimei/register> >>>> >>>> 2011-10-01 12:22:14 GMT; cppcms, error: Caught exception [There is no >>>> such skin:] >>>> 0x7fa68cc3b434: cppcms::cppcms_error::cppcms_**error(std::string >>>> const&) + >>>> 0x64 in /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc7e907: cppcms::views_pool::render(**std::string, std::string, >>>> std::ostream&, cppcms::base_content&) + 0x12e7 in >>>> /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc65875: cppcms::application::render(**std::string, >>>> cppcms::base_content&) + 0x85 in /usr/lib/libcppcms.so.1 >>>> 0x40d866: hello::welcome(std::string) + 0x50 in ./main >>>> 0x40ef55: >>>> cppcms::url_dispatcher::**binder1<hello>::operator()(**std::string) >>>> const + >>>> 0x9b in ./main >>>> 0x40ede5: booster::function<void (std::string)>::callable_impl<**void, >>>> cppcms::url_dispatcher::**binder1<hello> >::call(std::string) + 0x3b >>>> in >>>> ./main >>>> 0x7fa68cc6b579: ??? + 0x8cc6b579 in /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc68a6d: cppcms::url_dispatcher::**dispatch(std::string) + 0x8d >>>> in >>>> /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc30884: cppcms::application::main(std:**:string) + 0x24 in >>>> /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc5e12e: >>>> cppcms::http::context::**dispatch(booster::intrusive_** >>>> ptr<cppcms::application>, >>>> >>>> std::string, bool) + 0x6e in /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc5ffec: booster::function<void ()>::callable_impl<void, >>>> cppcms_boost::_bi::bind_t<**void, void >>>> (*)(booster::intrusive_ptr<**cppcms::application>, std::string, bool), >>>> cppcms_boost::_bi::list3<**cppcms_boost::_bi::value<** >>>> booster::intrusive_ptr<cppcms:**:application> >>>> >>>> , cppcms_boost::_bi::value<std::**string>, >>>>> >>>> cppcms_boost::_bi::value<bool> > > >::call() + 0x4c in >>>> /usr/lib/libcppcms.so.1 >>>> 0x7fa68cc61112: cppcms::impl::thread_pool::**worker() + 0x82 in >>>> /usr/lib/libcppcms.so.1 >>>> 0x7fa68b256d2e: booster_thread_func + 0x1e in >>>> /usr/local/lib/libbooster.so.0 >>>> 0x7fa68b696d8c: ??? + 0x8b696d8c in /lib/x86_64-linux-gnu/** >>>> libpthread.so.0 >>>> 0x7fa68b99404d: clone + 0x6d in /lib/x86_64-linux-gnu/libc.so.**6 >>>> (http_context.cpp:150) >>>> >>>> >>>> welcome.tmpl file's content: >>>> >>>> <% c++ #include "content.h" %> >>>> <% skin my_skin %> >>>> <% view message uses content::message %> >>>> <% template render() %> >>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >>>> "http://www.w3.org/TR/xhtml1/**DTD/xhtml1-transitional.dtd<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> >>>> "> >>>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml> >>>> "> >>>> <head> >>>> <meta http-equiv="Content-Type" content="text/html; >>>> charset=utf-8" /> >>>> >>>> ... >>>> >>>> >>>> register.tmpl file's content: >>>> >>>> <% c++ #include "content.h" %> >>>> <% skin client %> >>>> <% view message2 uses content::message %> >>>> <% template render() %> >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >>>> "http://www.w3.org/TR/html4/**loose.dtd<http://www.w3.org/TR/html4/loose.dtd> >>>> "> >>>> <html> >>>> <head> >>>> <script src="http://c >>>> >>>> ...... >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------**------------------------------** >>>> ------------------ >>>> All of the data generated in your IT infrastructure is seriously >>>> valuable. >>>> Why? It contains a definitive record of application performance, >>>> security >>>> threats, fraudulent activity, and more. Splunk takes this data and makes >>>> sense of it. IT sense. And common sense. >>>> http://p.sf.net/sfu/splunk-**d2dcopy2<http://p.sf.net/sfu/splunk-d2dcopy2> >>>> ______________________________**_________________ >>>> Cppcms-users mailing list >>>> Cppcms-users@lists.**sourceforge.net<Cpp...@li...> >>>> https://lists.sourceforge.net/**lists/listinfo/cppcms-users<https://lists.sourceforge.net/lists/listinfo/cppcms-users> >>>> >>>> ------------------------------**------------------------------** >>> ------------------ >>> All of the data generated in your IT infrastructure is seriously >>> valuable. >>> Why? It contains a definitive record of application performance, security >>> threats, fraudulent activity, and more. Splunk takes this data and makes >>> sense of it. IT sense. And common sense. >>> http://p.sf.net/sfu/splunk-**d2dcopy2<http://p.sf.net/sfu/splunk-d2dcopy2> >>> ______________________________**_________________ >>> Cppcms-users mailing list >>> Cppcms-users@lists.**sourceforge.net<Cpp...@li...> >>> https://lists.sourceforge.net/**lists/listinfo/cppcms-users<https://lists.sourceforge.net/lists/listinfo/cppcms-users> >>> >> Oh,thanks.It works now. >> > > |
From: 陈抒 <csf...@gm...> - 2011-11-17 11:16:40
|
Hello,Artyom: When I tried to use CppCMS with Nginx,the jsonp call doesn't work. I look into my Nginx log files and list some info below: in access.log 124.207.104.18 - - [17/Nov/2011:04:47:23 -0600] "GET /save_email?content=send%20email%20test%20&callback=jQuery15107370382682420313_1321523058476&_=1321526506452 HTTP/1.1" 404 \ 168 "-" "curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3" in error.log 2011/11/17 04:47:23 [error] 2019#0: *46 open() "/usr/nginx/html/save_email" failed (2: No such file or directory), client: 124.207.104.18, server: localhost, request: "GET /sav\ e_email?content=send%20email%20test%20&callback=jQuery15107370382682420313_1321523058476&_=1321526506452 HTTP/1.1", host: "www.cmltechnology.com" If I don't use Nginx and FastCGI with CppCMS,my jsonp function works,here is my JavaScript function definition: <script type="text/javascript"> function save_email(){ var message=document.getElementById("email_content").value; $.ajax({ "url": "http://www.cmltechnology.com/save_email?content= "+message+"&callback=?", type:"get", dataType:"jsonp", jsonp:"callback", success:function(data){ alert(data.result); }, error:function(err){ alert(err.result); }, complete: function(msg){ } }); } </script> Any idea? 陈抒 Best regards http://blog.csdn.net/sheismylife On Sun, Oct 2, 2011 at 9:32 AM, chenshu <csf...@gm...> wrote: > On 10/01/2011 10:10 PM, Artyom Beilis wrote: > >> Take a look on: >> >> http://art-blog.no-ip.info/**wikipp/en/page/cppcms_1x_**config#views<http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#views> >> >> If you use more then one skin you need either: >> >> 1. To specify skin name explicitly render("myskin","message",**content) >> >> 2. To specify the default skin in configuration file. >> >> Also I'd suggest following: >> >> 1. If you have pages that have same base view (like same "theme") >> then put them into same skin. Use some basic template that defines >> general appearance of the page and extend it with inheritance >> >> to specific purposes. >> 2. For totally different pages like "administrative interface" and >> "public interface" use different skins. >> >> See: http://art-blog.no-ip.info/**wikipp/en/page/cppcms_1x_** >> templates_gen<http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_templates_gen> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.sf.net/ >> CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/**cppdb/<http://cppcms.sf.net/sql/cppdb/> >> >> >> ----- Original Message ----- >> >>> From: chenshu<csf...@gm...> >>> To: cppcms-users@lists.**sourceforge.net<cpp...@li...> >>> Cc: >>> Sent: Saturday, October 1, 2011 3:26 PM >>> Subject: [Cppcms-users] How to add second web page in CppCMS application? >>> >>> Hello, >>> I have set up one simple web application >>> here:http://www.**cmlelectronics.com:8080/kaimei<http://www.cmlelectronics.com:8080/kaimei> >>> It only has one page and works.Now I try to add another new page for >>> registering new user. >>> I create register_client.tmpl in src folder,configure my CMakeLists.txt >>> like so: >>> >>> //for my first page >>> add_custom_command( >>> OUTPUT ${CMAKE_SOURCE_DIR}/src/my_**skin.cpp >>> COMMAND cppcms_tmpl_cc ${CMAKE_SOURCE_DIR}/src/**welcome.tmpl -o >>> ${CMAKE_SOURCE_DIR}/src/my_**skin.cpp >>> DEPENDS welcome.tmpl >>> ) >>> >>> //for my second page >>> add_custom_command( >>> OUTPUT ${CMAKE_SOURCE_DIR}/src/**register_client.cpp >>> COMMAND cppcms_tmpl_cc ${CMAKE_SOURCE_DIR}/src/**register_client.tmpl >>> -o ${CMAKE_SOURCE_DIR}/src/**register_client.cpp >>> DEPENDS register_client.tmpl >>> ) >>> >>> AUX_SOURCE_DIRECTORY(${CMAKE_**SOURCE_DIR}/src CPP_LIST) >>> add_executable(main ${CPP_LIST} my_skin.cpp register_client.cpp) >>> >>> The following is my config.js: >>> >>> { >>> "service" : { >>> "ip":"0.0.0.0", >>> "api" : "http", >>> "port" : 8080 >>> }, >>> "db" : { >>> "name" : "fucai", >>> "ip" : "myip", >>> "user": "myusr", >>> "password":"mypwd" >>> }, >>> "http" : { >>> "script_names" : ["/kaimei"] >>> }, >>> "uri_config":{ >>> "base":"http://www.**cmlelectronics.com<http://www.cmlelectronics.com> >>> ", >>> "jsonp":"http://localhost:8080**" >>> } >>> } >>> >>> >>> I defined one class hello: >>> class hello : public cppcms::application { >>> public: >>> hello(cppcms::service&srv); >>> void save_email(std::string content); >>> void welcome(std::string url); >>> void register_client(std::string url); >>> >>> private: >>> content::message c_; >>> }; >>> >>> >>> >>> hello::hello(cppcms::service&**srv):cppcms::application(srv){ >>> dispatcher().assign("/welcome" ,&hello::welcome , this , 1); >>> dispatcher().assign("/**register" ,&hello::register_client , >>> this , 2); >>> dispatcher().assign("/save_**email?(.+)" ,&hello::save_email , >>> >>> this , 3); >>> configuration& config = app_singleton_holder::**Instance().config(); >>> c_.base_uri=config.base_uri; >>> c_.jsonp= config.jsonp; >>> } >>> >>> void hello::welcome(std::string url){ >>> render("message",c_); >>> } >>> >>> >>> void hello::register_client(std::**string url){ >>> render("message2",c_); >>> } >>> >>> >>> >>> >>> But always get the following error message when I want to open my pages >>> via http://localhost:8080/kaimei/**welcome<http://localhost:8080/kaimei/welcome>or >>> http://localhost:8080/kaimei/**register<http://localhost:8080/kaimei/register> >>> >>> 2011-10-01 12:22:14 GMT; cppcms, error: Caught exception [There is no >>> such skin:] >>> 0x7fa68cc3b434: cppcms::cppcms_error::cppcms_**error(std::string >>> const&) + >>> 0x64 in /usr/lib/libcppcms.so.1 >>> 0x7fa68cc7e907: cppcms::views_pool::render(**std::string, std::string, >>> std::ostream&, cppcms::base_content&) + 0x12e7 in >>> /usr/lib/libcppcms.so.1 >>> 0x7fa68cc65875: cppcms::application::render(**std::string, >>> cppcms::base_content&) + 0x85 in /usr/lib/libcppcms.so.1 >>> 0x40d866: hello::welcome(std::string) + 0x50 in ./main >>> 0x40ef55: >>> cppcms::url_dispatcher::**binder1<hello>::operator()(**std::string) >>> const + >>> 0x9b in ./main >>> 0x40ede5: booster::function<void (std::string)>::callable_impl<**void, >>> cppcms::url_dispatcher::**binder1<hello> >::call(std::string) + 0x3b in >>> ./main >>> 0x7fa68cc6b579: ??? + 0x8cc6b579 in /usr/lib/libcppcms.so.1 >>> 0x7fa68cc68a6d: cppcms::url_dispatcher::**dispatch(std::string) + 0x8d >>> in >>> /usr/lib/libcppcms.so.1 >>> 0x7fa68cc30884: cppcms::application::main(std:**:string) + 0x24 in >>> /usr/lib/libcppcms.so.1 >>> 0x7fa68cc5e12e: >>> cppcms::http::context::**dispatch(booster::intrusive_** >>> ptr<cppcms::application>, >>> >>> std::string, bool) + 0x6e in /usr/lib/libcppcms.so.1 >>> 0x7fa68cc5ffec: booster::function<void ()>::callable_impl<void, >>> cppcms_boost::_bi::bind_t<**void, void >>> (*)(booster::intrusive_ptr<**cppcms::application>, std::string, bool), >>> cppcms_boost::_bi::list3<**cppcms_boost::_bi::value<** >>> booster::intrusive_ptr<cppcms:**:application> >>> >>> , cppcms_boost::_bi::value<std::**string>, >>>> >>> cppcms_boost::_bi::value<bool> > > >::call() + 0x4c in >>> /usr/lib/libcppcms.so.1 >>> 0x7fa68cc61112: cppcms::impl::thread_pool::**worker() + 0x82 in >>> /usr/lib/libcppcms.so.1 >>> 0x7fa68b256d2e: booster_thread_func + 0x1e in >>> /usr/local/lib/libbooster.so.0 >>> 0x7fa68b696d8c: ??? + 0x8b696d8c in /lib/x86_64-linux-gnu/** >>> libpthread.so.0 >>> 0x7fa68b99404d: clone + 0x6d in /lib/x86_64-linux-gnu/libc.so.**6 >>> (http_context.cpp:150) >>> >>> >>> welcome.tmpl file's content: >>> >>> <% c++ #include "content.h" %> >>> <% skin my_skin %> >>> <% view message uses content::message %> >>> <% template render() %> >>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >>> "http://www.w3.org/TR/xhtml1/**DTD/xhtml1-transitional.dtd<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> >>> "> >>> <html xmlns="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml> >>> "> >>> <head> >>> <meta http-equiv="Content-Type" content="text/html; >>> charset=utf-8" /> >>> >>> ... >>> >>> >>> register.tmpl file's content: >>> >>> <% c++ #include "content.h" %> >>> <% skin client %> >>> <% view message2 uses content::message %> >>> <% template render() %> >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >>> "http://www.w3.org/TR/html4/**loose.dtd<http://www.w3.org/TR/html4/loose.dtd> >>> "> >>> <html> >>> <head> >>> <script src="http://c >>> >>> ...... >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ------------------------------**------------------------------** >>> ------------------ >>> All of the data generated in your IT infrastructure is seriously >>> valuable. >>> Why? It contains a definitive record of application performance, security >>> threats, fraudulent activity, and more. Splunk takes this data and makes >>> sense of it. IT sense. And common sense. >>> http://p.sf.net/sfu/splunk-**d2dcopy2<http://p.sf.net/sfu/splunk-d2dcopy2> >>> ______________________________**_________________ >>> Cppcms-users mailing list >>> Cppcms-users@lists.**sourceforge.net<Cpp...@li...> >>> https://lists.sourceforge.net/**lists/listinfo/cppcms-users<https://lists.sourceforge.net/lists/listinfo/cppcms-users> >>> >>> ------------------------------**------------------------------** >> ------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-**d2dcopy2<http://p.sf.net/sfu/splunk-d2dcopy2> >> ______________________________**_________________ >> Cppcms-users mailing list >> Cppcms-users@lists.**sourceforge.net <Cpp...@li...> >> https://lists.sourceforge.net/**lists/listinfo/cppcms-users<https://lists.sourceforge.net/lists/listinfo/cppcms-users> >> > Oh,thanks.It works now. > |
From: kpeo <sla...@ya...> - 2011-11-15 18:16:35
|
Hello Artyom and all! Working on my project, I had to implement a plugins factory, that can be useful in working on a new version of CppCMS. It's in pre-alpha working version yet. In my implementation, the JSON configuration file with plugins options is loaded separately, but instead, it's easy to rewrite the code to use the CppCMS settings() function. The code can be found here: http://tinyurl.com/cdpe8ny Also, think it would be nice to be able for dynamically load the application views from inside of the application - for abilities of loading plugins with own views embedded in application skin/namespace. |
From: 陈抒 <csf...@gm...> - 2011-11-08 13:17:09
|
It only happened one time.I will use 1st point in my log and see if it can happen again. Thanks. 陈抒 Best regards http://blog.csdn.net/sheismylife On Tue, Nov 8, 2011 at 8:54 PM, Artyom Beilis <art...@ya...> wrote: > Two points: > > 1.Add std::cerr<<booster::trace(ex) << std::endl; in the catch statement > so you'll be able to see the stack trace > of the exception where exactly it comes from. (or write it to log > instead of cerr). > 2. Does it happen all the time or once in a while? > > Because this is an exception that is thrown by booster::aio::endpoint > when you try to create it from > an invalid IP address. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Tuesday, November 8, 2011 2:05 PM > *Subject:* Re: [Cppcms-users] exception from cppcms > > Unfortunately,I can't reproduce this case.But I am afraid that the case > occurs in my product environment. > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Tue, Nov 8, 2011 at 7:48 PM, 陈抒 <csf...@gm...> wrote: > > Hello, > I got the following error log today: > 2011-11-08 10:00:26 GMT; main, error: exception in main,ex:aio::: invalid > endpoint (main.cpp:61) > > My code looks like so: > > int main(int argc,char ** argv){ > // init_log(); > cppcms::json::value config_json; > my_application& app= app_singleton_holder::Instance(); > configuration* config = new configuration(); > > try{ > .... > ..... > cppcms::service srv(argc,argv); > > srv.applications_pool().mount(cppcms::applications_factory<rest::prize_service>()); > srv.run(); > }catch(std::exception const& ex) { > BOOSTER_ERROR("main") << "exception in main,ex:" <<ex.what(); > return 3; > } > } > > I don't know what causes the exception(red above),but it causes my > application to quit. > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2011-11-08 12:54:17
|
Two points: 1.Add std::cerr<<booster::trace(ex) << std::endl; in the catch statement so you'll be able to see the stack trace of the exception where exactly it comes from.(or write it to log instead of cerr). 2. Does it happen all the time or once in a while? Because this is an exception that is thrown by booster::aio::endpoint when you try to create it from an invalid IP address. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: 陈抒 <csf...@gm...> >To: cpp...@li... >Sent: Tuesday, November 8, 2011 2:05 PM >Subject: Re: [Cppcms-users] exception from cppcms > > >Unfortunately,I can't reproduce this case.But I am afraid that the case occurs in my product environment. >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Tue, Nov 8, 2011 at 7:48 PM, 陈抒 <csf...@gm...> wrote: > >Hello, >>I got the following error log today: >>2011-11-08 10:00:26 GMT; main, error: exception in main,ex:aio::: invalid endpoint (main.cpp:61) >> >> >>My code looks like so: >> >> >>int main(int argc,char ** argv){ >> // init_log(); >> cppcms::json::value config_json; >> my_application& app= app_singleton_holder::Instance(); >> configuration* config = new configuration(); >> >> >> try{ >>.... >> ..... >>cppcms::service srv(argc,argv); >>srv.applications_pool().mount(cppcms::applications_factory<rest::prize_service>()); >>srv.run(); >> }catch(std::exception const& ex) { >>BOOSTER_ERROR("main") << "exception in main,ex:" <<ex.what(); >>return 3; >> } >>} >> >> >>I don't know what causes the exception(red above),but it causes my application to quit. >> >>陈抒 >>Best regards >>http://blog.csdn.net/sheismylife >> > >------------------------------------------------------------------------------ >RSA(R) Conference 2012 >Save $700 by Nov 18 >Register now >http://p.sf.net/sfu/rsa-sfdev2dev1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-11-08 12:06:21
|
Unfortunately,I can't reproduce this case.But I am afraid that the case occurs in my product environment. 陈抒 Best regards http://blog.csdn.net/sheismylife On Tue, Nov 8, 2011 at 7:48 PM, 陈抒 <csf...@gm...> wrote: > Hello, > I got the following error log today: > 2011-11-08 10:00:26 GMT; main, error: exception in main,ex:aio::: invalid > endpoint (main.cpp:61) > > My code looks like so: > > int main(int argc,char ** argv){ > // init_log(); > cppcms::json::value config_json; > my_application& app= app_singleton_holder::Instance(); > configuration* config = new configuration(); > > try{ > .... > ..... > cppcms::service srv(argc,argv); > > srv.applications_pool().mount(cppcms::applications_factory<rest::prize_service>()); > srv.run(); > }catch(std::exception const& ex) { > BOOSTER_ERROR("main") << "exception in main,ex:" <<ex.what(); > return 3; > } > } > > I don't know what causes the exception(red above),but it causes my > application to quit. > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > |
From: 陈抒 <csf...@gm...> - 2011-11-08 11:49:02
|
Hello, I got the following error log today: 2011-11-08 10:00:26 GMT; main, error: exception in main,ex:aio::: invalid endpoint (main.cpp:61) My code looks like so: int main(int argc,char ** argv){ // init_log(); cppcms::json::value config_json; my_application& app= app_singleton_holder::Instance(); configuration* config = new configuration(); try{ .... ..... cppcms::service srv(argc,argv); srv.applications_pool().mount(cppcms::applications_factory<rest::prize_service>()); srv.run(); }catch(std::exception const& ex) { BOOSTER_ERROR("main") << "exception in main,ex:" <<ex.what(); return 3; } } I don't know what causes the exception(red above),but it causes my application to quit. 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2011-11-03 13:44:36
|
OK! I will do it in some days. 陈抒 Best regards http://blog.csdn.net/sheismylife On Thu, Nov 3, 2011 at 9:31 PM, Artyom Beilis <art...@ya...> wrote: > Hello, > > To be honest I'm not familiar with facebook Scribe. So I not planning to > implement it for booster::log :-) > > If you implement it and you can contribute it to the CppCMS project and it > would be one of > "plugins" for it. > > I've already have some "contrib" directory withing CppCMS for different > tools that are not > directly part of CppCMS. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Thursday, November 3, 2011 2:25 PM > *Subject:* [Cppcms-users] Booster::log for facebook Scribe > > Hello,Artyom: > > I used a few log frameworks before,e.g. ACE,boost::logging and Log4cxx,etc. > I really like your log,very easy and clear. > I am about to build up distributed log server using facebook Scribe to > analyse users' behavior. > But I still want to use booster::log,just add one sink to connect to > Scribe server. > I believe this is very important for those Internet companies that want to > save and process large amount of logs,and implementing this sink is not a > hard job. > Before implementing my own sink,I want to know do you have any plan to > support it in booster::log framework. > > Thanks. > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2011-11-03 13:31:21
|
Hello, To be honest I'm not familiar with facebook Scribe. So I not planning to implement it for booster::log :-) If you implement it and you can contribute it to the CppCMS project and it would be one of "plugins" for it. I've already have some "contrib" directory withing CppCMS for different tools that are not directly part of CppCMS. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: 陈抒 <csf...@gm...> >To: cpp...@li... >Sent: Thursday, November 3, 2011 2:25 PM >Subject: [Cppcms-users] Booster::log for facebook Scribe > > >Hello,Artyom: > > >I used a few log frameworks before,e.g. ACE,boost::logging and Log4cxx,etc. >I really like your log,very easy and clear. >I am about to build up distributed log server using facebook Scribe to analyse users' behavior. >But I still want to use booster::log,just add one sink to connect to Scribe server. >I believe this is very important for those Internet companies that want to save and process large amount of logs,and implementing this sink is not a hard job. >Before implementing my own sink,I want to know do you have any plan to support it in booster::log framework. > > >Thanks. >陈抒 >Best regards >http://blog.csdn.net/sheismylife > >------------------------------------------------------------------------------ >RSA(R) Conference 2012 >Save $700 by Nov 18 >Register now >http://p.sf.net/sfu/rsa-sfdev2dev1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-11-03 12:25:39
|
Hello,Artyom: I used a few log frameworks before,e.g. ACE,boost::logging and Log4cxx,etc. I really like your log,very easy and clear. I am about to build up distributed log server using facebook Scribe to analyse users' behavior. But I still want to use booster::log,just add one sink to connect to Scribe server. I believe this is very important for those Internet companies that want to save and process large amount of logs,and implementing this sink is not a hard job. Before implementing my own sink,I want to know do you have any plan to support it in booster::log framework. Thanks. 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2011-11-02 11:17:00
|
OK.I added a new feature. 陈抒 Best regards http://blog.csdn.net/sheismylife On Wed, Nov 2, 2011 at 5:28 PM, Artyom Beilis <art...@ya...> wrote: > > > > Another question, we are in GMT+8(Beijing),but the time zone in log > file is GMT 0 , > > so how can I config it to another time zone? > > Currently GMT is hard coded. > Actually it should be not hard to make it configurable. > and it would be very good to add this to logging system. > > > Open a feature request in bug tracking system so I will not forget. > > Meanwhile you can only implement your own sink... > > Artyom > > > > ------------------------------------------------------------------------------ > RSA® Conference 2012 > Save $700 by Nov 18 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |