cppcms-users Mailing List for CppCMS C++ Web Framework (Page 105)
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: chenshu <csf...@gm...> - 2011-10-12 01:15:18
|
Hi, I tried daemon configuration last night.See below: "daemon":{ "enable":true, "lock":"km_process", "fdlimit":1024 } "enable":true works fine,it forks a new process and I don't need to type '&' command now. but km_process file is not generated.Why? |
From: Artyom B. <art...@ya...> - 2011-10-03 22:08:07
|
Of course ./hello -c config.js cppcms_run is just helper script to automatically configure web server. Nothing more. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: Richard Catlin <ric...@gm...> >To: cpp...@li... >Sent: Monday, October 3, 2011 11:16 PM >Subject: [Cppcms-users] How do I start the example hello service to respond to nginx? > > >In the docs, it says the service should be started independently. How should I start the hello_world service by: >./hello -c config.js >or >cppcms_run -S nginx -p 80 hello -c config.js > > >Richard > > >Referencing docs at: >And the usual CppCMS's config: > 1. { > 2. "service" : { > 3. "api" : "fastcgi", > 4. "socket" : "/tmp/hello-fcgi-socket" > 5. } > 6. } >Of course the CppCMS's service should be started independently. >------------------------------------------------------------------------------ >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. Business sense. IT sense. Common sense. >http://p.sf.net/sfu/splunk-d2dcopy1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Richard C. <ric...@gm...> - 2011-10-03 21:16:38
|
In the docs, it says the service should be started independently. How should I start the hello_world service by: ./hello -c config.js or cppcms_run -S nginx -p 80 hello -c config.js Richard Referencing docs at: And the usual CppCMS's config: { "service" : { "api" : "fastcgi", "socket" : "/tmp/hello-fcgi-socket" } } Of course the CppCMS's service should be started independently. |
From: Artyom B. <art...@ya...> - 2011-10-03 19:56:46
|
Hello, Ok I see... This happens with newer versions of nginx. The problem that some nginx options had changed and it does not work as it was before. 1. You must start it as root (otherwise it would fail to write to logs) 2. Then it forks of to undefined user and can't open a socket that the cppcms application creates - as it runs as root. So you have two options: 1. Use TCP/IP - instead of Unix domain sockets: switch "socket" : "/tmp/hello-fcgi-socket" to "port" : 9000 so you will not have permission options. 2. Configure nginx manually such that it and the cppcms service run in same user:group instead of using cppcms_run. You can configure it instantly for some socket or TCP ip port and then run application as any other applications. ./hello.fcgi -c config.js And the web server connect it. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: Richard Catlin <ric...@gm...> >To: cpp...@li... >Sent: Monday, October 3, 2011 6:57 PM >Subject: [Cppcms-users] Hello_world with Nginx 502 Bad Gateway > > >I'm trying to run the hello_world example with Nginx. It looks like everything is working right, but when I go to >http://localhost/hello.fcgi it tells me "502 Bad Gateway" > > >Richard-Catlins-MacBook-Pro:hello_world richardcatlin$ sudo /usr/local/bin/cppcms_run -S nginx -p 80 -h 127.0.0.1 hello.fcgi -c config.js >Password: >Web Server Host:127.0.0.1 >Web Server Port:80 >Document Root:/Users/richardcatlin/C++Projects/cppcms/examples/hello_world >Script:/hello.fcgi >Api:fastcgi >Socket:/tmp/hello-fcgi-socket >Server:/usr/local/nginx/sbin/nginx -c /Users/richardcatlin/C++Projects/cppcms/examples/hello_world/cppcms_rundir/cppcms-nginx.conf >Starting Application Server:/hello.fcgi >Application Server PID:343 >Starting Web Server >Web Server PID:345 > >------------------------------------ >- Press Any Key To Stop The Server - >------------------------------------ > > >------------------------------------------------------------------------------ >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. Business sense. IT sense. Common sense. >http://p.sf.net/sfu/splunk-d2dcopy1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Richard C. <ric...@gm...> - 2011-10-03 16:58:08
|
I'm trying to run the hello_world example with Nginx. It looks like everything is working right, but when I go to http://localhost/hello.fcgi it tells me "502 Bad Gateway" Richard-Catlins-MacBook-Pro:hello_world richardcatlin$ sudo /usr/local/bin/cppcms_run -S nginx -p 80 -h 127.0.0.1 hello.fcgi -c config.js Password: Web Server Host:127.0.0.1 Web Server Port:80 Document Root:/Users/richardcatlin/C++Projects/cppcms/examples/hello_world Script:/hello.fcgi Api:fastcgi Socket:/tmp/hello-fcgi-socket Server:/usr/local/nginx/sbin/nginx -c /Users/richardcatlin/C++Projects/cppcms/examples/hello_world/cppcms_rundir/cppcms-nginx.conf Starting Application Server:/hello.fcgi Application Server PID:343 Starting Web Server Web Server PID:345 ------------------------------------ - Press Any Key To Stop The Server - ------------------------------------ |
From: Alec T. <ale...@gm...> - 2011-10-02 08:43:21
|
Haha Just suggest a different name to them On Fri, Sep 23, 2011 at 12:52 AM, Daniel Rios <dan...@li...> wrote: > Hello there! > On my daily surfing I cross with this new project: > https://bitbucket.org/nileshgr/cppcms/overview > It has the same name as our CppCMS ! On the page it says they're > considering to rename their project : > > Please note: This project has no relation with the C++ Web Development > Framework as described at http://en.wikipedia.org/wiki/CppCMS and > http://cppcms.sf.net. We are considering a rename on this and a decision > will be taken soon. > > What we can do about it ? sue them perhaps? hehehe > > Cheers ! > > Daniel > > ------------------------------------------------------------------------------ > 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. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: chenshu <csf...@gm...> - 2011-10-02 01:32:23
|
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 > > 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 > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > > ----- Original Message ----- >> From: chenshu<csf...@gm...> >> To: 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 >> 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", >> "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 or >> 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"> >> <html xmlns="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"> >> <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 >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> 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 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users Oh,thanks.It works now. |
From: Artyom B. <art...@ya...> - 2011-10-01 14:10:16
|
Take a look on: 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 Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ ----- Original Message ----- > From: chenshu <csf...@gm...> > To: 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 > 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", > "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 or > 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"> > <html xmlns="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"> > <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 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: chenshu <csf...@gm...> - 2011-10-01 12:26:34
|
Hello, I have set up one simple web application here: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", "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 or 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"> <html xmlns="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"> <html> <head> <script src="http://c ...... |
From: Artyom B. <art...@ya...> - 2011-10-01 08:10:44
|
> On Thu, 2011-09-29 at 20:54 -0700, Richard Catlin wrote: >> Is there a native way to share data between two cppCMS instances on an RPC > basis? >> >> Has anybody integrated Apache Thrift with cppCMS? If so, how? > > I use a thrift CLIENT into cppcms application and works as expected. > > The example is the same as normal thrift client instantiation. > > If you want to create a thrift server instance, I think you should need > another thread for running that instance. > Small note, if the Server can be used asynchronously (i.e. it can use some foreign even-loop - i.e. polling service) it can be integrated into CppCMS's event loop using booster::aio::basic_io_device object or booster::aio::stream_socket object. Artyom |
From: Daniel V. <chi...@gm...> - 2011-09-30 19:39:09
|
Hello. I use a thrift CLIENT into cppcms application and works as expected. The example is the same as normal thrift client instantiation. If you want to create a thrift server instance, I think you should need another thread for running that instance. Good Bye. On Thu, 2011-09-29 at 20:54 -0700, Richard Catlin wrote: > Is there a native way to share data between two cppCMS instances on an RPC basis? > > Has anybody integrated Apache Thrift with cppCMS? If so, how? > > Richard > ------------------------------------------------------------------------------ > 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 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Richard C. <ric...@gm...> - 2011-09-30 03:54:54
|
Is there a native way to share data between two cppCMS instances on an RPC basis? Has anybody integrated Apache Thrift with cppCMS? If so, how? Richard |
From: augustin <aug...@ov...> - 2011-09-28 07:07:40
|
On Wednesday, September 28, 2011 01:39:09 PM Richard Catlin wrote: > The libbooster and libcppcms shared objects are in /usr/local/lib. > cppcms does not see them. How can I fix this? did you try: sudo ldconfig check man ldconfig and make sure the path /usr/local/lib is enabled. Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://3enjeux.overshoot.tv/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://www.wechange.org/ http://searching911.info/ . |
From: Richard C. <ric...@gm...> - 2011-09-28 05:39:17
|
The libbooster and libcppcms shared objects are in /usr/local/lib. cppcms does not see them. How can I fix this? Thank you. Richard Catlin [ec2-user@ip-10-196-230-32 hello_world]$ cppcms_run hello -c config.js cppcms_config_find_param: error while loading shared libraries: libbooster.so.0: cannot open shared object file: No such file or directory cppcms_config_find_param: error while loading shared libraries: libbooster.so.0: cannot open shared object file: No such file or directory cppcms_config_find_param: error while loading shared libraries: libbooster.so.0: cannot open shared object file: No such file or directory cppcms_config_find_param: error while loading shared libraries: libbooster.so.0: cannot open shared object file: No such file or directory Can't find service.api or service.socket in config.js Aborting [ec2-user@ip-10-196-230-32 hello_world]$ cppcms_run hello -L /usr/local/lib -c config.js Usage cppcms_run [-e] [ -S server ] [-p port] [-h host] \ [-r /document/root ] [-s /script ] program -c config.txt [ additional parameters ] -c configuration file of cppcms executable -p port to start the server on, default 8080 -s fastcgi script name, default '/'+your program name -h host to bind, default 127.0.0.1 -r document root (default .) -S (lighttpd|nginx|apache2) - web server you want to run -e Do not start application, started externaly (for debugging) [ec2-user@ip-10-196-230-32 hello_world]$ cd /usr/local/lib [ec2-user@ip-10-196-230-32 lib]$ ls libbooster.a libbooster.so libbooster.so.0 libbooster.so.0.0.0 libcppcms.a libcppcms.so libcppcms.so.1 libcppcms.so.1.0.0 perl5 [ec2-user@ip-10-196-230-32 lib]$ |
From: Artyom B. <art...@ya...> - 2011-09-27 06:22:22
|
Read this: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_build#req You are missing two important dependencies: 1. pcre library - mandatory 2. zlib library - strongly recommended dependency but can be disabled with-DDISABLE_GZIP=ON Install these two libraries (including development files - headers) and build again. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ ----- Original Message ----- > From: Richard Catlin <ric...@gm...> > To: cpp...@li... > Cc: > Sent: Monday, September 26, 2011 11:30 PM > Subject: [Cppcms-users] Trying to build on Amazon Linux EC2 > > Hi, > > I am trying to build cppCMS on Amazon Linux. I get this error. Do you have any > idea what the problem is? > > Thank you. > Richard Catlin > > GNU-TLS Gcrypt or OpenSSL librarys are not found, disabling AES encryption > support > CMake Error: The following variables are used in this project, but they are set > to NOTFOUND. > Please set them or make sure they are set and tested correctly in the CMake > files: > PCRE_LIB > linked by target "booster" in directory > /home/ec2-user/cppcms-0.99.10/booster > linked by target "booster-static" in directory > /home/ec2-user/cppcms-0.99.10/booster > ZLIB > linked by target "cppcms" in directory > /home/ec2-user/cppcms-0.99.10 > linked by target "cppcms-static" in directory > /home/ec2-user/cppcms-0.99.10 > ZLIB_INCLUDE_DIR > used as include directory in directory /home/ec2-user/cppcms-0.99.10 > > > ------------------------------------------------------------------------------ > 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. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Richard C. <ric...@gm...> - 2011-09-26 20:30:52
|
Hi, I am trying to build cppCMS on Amazon Linux. I get this error. Do you have any idea what the problem is? Thank you. Richard Catlin GNU-TLS Gcrypt or OpenSSL librarys are not found, disabling AES encryption support CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PCRE_LIB linked by target "booster" in directory /home/ec2-user/cppcms-0.99.10/booster linked by target "booster-static" in directory /home/ec2-user/cppcms-0.99.10/booster ZLIB linked by target "cppcms" in directory /home/ec2-user/cppcms-0.99.10 linked by target "cppcms-static" in directory /home/ec2-user/cppcms-0.99.10 ZLIB_INCLUDE_DIR used as include directory in directory /home/ec2-user/cppcms-0.99.10 |
From: Artyom B. <art...@ya...> - 2011-09-22 20:45:35
|
Hello, You have multiple versions of iconv library and iconv.h installed on your Mac... Most likely one come from ports and other is the part of OS that comes with 10.6 version. It is known Mac Problem with many projects around. You have several options: - uninstall one of the "iconv"s (ports one) - Disable iconv with -DDISABLE_ICONV=ON - provide explicit path to consistent iconv header/library using CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH - provide explicit path to iconv.h header and library using CMake variables ICONV_INCLUDE_DIR and ICONV_LIB Regards, Artyom Beilis >________________________________ >From: Richard Catlin <ric...@gm...> >To: cpp...@li... >Sent: Thursday, September 22, 2011 11:26 PM >Subject: [Cppcms-users] Trying to build on Mac Snow Leopard > >I get this error below. Any idea how I can compile this for Mac? > >Thank you. >Richard Catlin > >Richard-Catlins-MacBook-Pro:build richardcatlin$ make >Scanning dependencies of target booster >[ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/posix_time.cpp.o >[ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/ctime.cpp.o >[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/regex/src/pcre_regex.cpp.o >[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/posix_error.cpp.o >[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/windows_error.cpp.o >[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/aio_category.cpp.o >[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/deadline_timer.cpp.o >[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/endpoint.cpp.o >[ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/io_service.cpp.o >[ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/reactor.cpp.o >[ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/select_iterrupter.cpp.o >[ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_io_device.cpp.o >[ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_socket.cpp.o >[ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/acceptor.cpp.o >[ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/stream_socket.cpp.o >[ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/sp_counted_base.cpp.o >[ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/atomic_counter.cpp.o >[ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/log/src/log.cpp.o >[ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/iostreams/src/streambuf.cpp.o >[ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/nowide/src/convert.cpp.o >[ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/backtrace/src/backtrace.cpp.o >[ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/encoding/codepage.cpp.o >[ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/date_time.cpp.o >[ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/format.cpp.o >[ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/formatting.cpp.o >[ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/generator.cpp.o >[ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ids.cpp.o >[ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/localization_backend.cpp.o >[ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/message.cpp.o >[ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/mo_lambda.cpp.o >[ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/codecvt_converter.cpp.o >[ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/default_locale.cpp.o >[ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/info.cpp.o >[ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/locale_data.cpp.o >[ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/boundary.cpp.o >[ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/codecvt.cpp.o >[ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/collator.cpp.o >[ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/conversion.cpp.o >[ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/date_time.cpp.o >/Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/icu/date_time.cpp: In copy constructor ‘booster::locale::impl_icu::calendar_impl::calendar_impl(const booster::locale::impl_icu::calendar_impl&)’: >/Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/icu/date_time.cpp:82: warning: base class ‘class booster::locale::abstract_calendar’ should be explicitly initialized in the copy constructor >[ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/formatter.cpp.o >[ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/icu_backend.cpp.o >[ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/numeric.cpp.o >[ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/time_zone.cpp.o >[ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/codecvt.cpp.o >/Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/posix/codecvt.cpp: In copy constructor ‘booster::locale::impl_posix::mb2_iconv_converter::mb2_iconv_converter(const booster::locale::impl_posix::mb2_iconv_converter&)’: >/Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/posix/codecvt.cpp:90: warning: base class ‘class booster::locale::util::base_converter’ should be explicitly initialized in the copy constructor >[ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/collate.cpp.o >[ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/converter.cpp.o >[ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/numeric.cpp.o >[ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/posix_backend.cpp.o >[ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/codecvt.cpp.o >[ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/collate.cpp.o >[ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/converter.cpp.o >[ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/numeric.cpp.o >[ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/std_backend.cpp.o >[ 18%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/gregorian.cpp.o >[ 18%] Building CXX object booster/CMakeFiles/booster.dir/lib/thread/src/pthread.cpp.o >Linking CXX shared library libbooster.dylib >Undefined symbols for architecture x86_64: > "_libiconv_close", referenced from: > booster::locale::conv::impl::iconverter_base::~iconverter_base()in codepage.cpp.o > booster::locale::conv::impl::iconv_between::open(char const*, char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<wchar_t>::~iconv_from_utf()in codepage.cpp.o > booster::locale::conv::impl::iconv_to_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_to_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > ... > "_libiconv_open", referenced from: > booster::locale::conv::impl::iconv_between::open(char const*, char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_to_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_to_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o > booster::locale::impl_posix::mb2_iconv_converter::from_unicode(unsigned int, char*, char const*)in codecvt.cpp.o > booster::locale::impl_posix::mb2_iconv_converter::to_unicode(char const*&, char const*)in codecvt.cpp.o > ... > "_libiconv", referenced from: > booster::locale::conv::impl::iconv_to_utf<wchar_t>::convert(char const*, char const*)in codepage.cpp.o > booster::locale::conv::impl::iconv_from_utf<wchar_t>::convert(wchar_t const*, wchar_t const*)in codepage.cpp.o > std::basic_string<char, std::char_traits<char>, std::allocator<char> > booster::locale::conv::impl::iconverter_base::real_convert<char, char>(char const*, char const*)in codepage.cpp.o > booster::locale::impl_posix::mb2_iconv_converter::from_unicode(unsigned int, char*, char const*)in codecvt.cpp.o > booster::locale::impl_posix::mb2_iconv_converter::to_unicode(char const*&, char const*)in codecvt.cpp.o > booster::locale::impl_posix::mb2_iconv_converter::mb2_iconv_converter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in codecvt.cpp.o >ld: symbol(s) not found for architecture x86_64 >collect2: ld returned 1 exit status >make[2]: *** [booster/libbooster.0.0.0.dylib] Error 1 >make[1]: *** [booster/CMakeFiles/booster.dir/all] Error 2 >make: *** [all] Error 2 >Richard-Catlins-MacBook-Pro:build richardcatlin$ sudo port install icu >Password: >---> Cleaning icu >Richard-Catlins-MacBook-Pro:build richardcatlin$ sudo port installed >The following ports are currently installed: > bzip2 @1.0.6_0 (active) > db46 @4.6.21_6+java (active) > expat @2.0.1_1 (active) > gdbm @1.9.1_0 (active) > gettext @0.18.1.1_2 (active) > gperf @3.0.4_2 (active) > icu @4.6.1_0 (active) > libiconv @1.14_0 (active) > libpcap @1.1.1_0 (active) > ncurses @5.9_1 (active) > ncursesw @5.8_0 (active) > nspr @4.8.8_0 (active) > openssl @1.0.0d_0 > openssl @1.0.0e_0 (active) > pcre @8.12_0 (active) > python27 @2.7.2_1 (active) > python_select @0.3_1 (active) > readline @6.2.000_0 (active) > scons @2.0.1_1 (active) > spidermonkey @1.7.0_5 (active) > sqlite3 @3.7.7.1_0 (active) > zlib @1.2.5_0 (active) > > >------------------------------------------------------------------------------ >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. Business sense. IT sense. Common sense. >http://p.sf.net/sfu/splunk-d2dcopy1 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Richard C. <ric...@gm...> - 2011-09-22 20:26:54
|
I get this error below. Any idea how I can compile this for Mac? Thank you. Richard Catlin Richard-Catlins-MacBook-Pro:build richardcatlin$ make Scanning dependencies of target booster [ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/posix_time.cpp.o [ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/ctime.cpp.o [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/regex/src/pcre_regex.cpp.o [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/posix_error.cpp.o [ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/windows_error.cpp.o [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/aio_category.cpp.o [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/deadline_timer.cpp.o [ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/endpoint.cpp.o [ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/io_service.cpp.o [ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/reactor.cpp.o [ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/select_iterrupter.cpp.o [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_io_device.cpp.o [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/basic_socket.cpp.o [ 4%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/acceptor.cpp.o [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/stream_socket.cpp.o [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/sp_counted_base.cpp.o [ 5%] Building CXX object booster/CMakeFiles/booster.dir/lib/smart_ptr/src/atomic_counter.cpp.o [ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/log/src/log.cpp.o [ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/iostreams/src/streambuf.cpp.o [ 6%] Building CXX object booster/CMakeFiles/booster.dir/lib/nowide/src/convert.cpp.o [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/backtrace/src/backtrace.cpp.o [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/encoding/codepage.cpp.o [ 7%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/date_time.cpp.o [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/format.cpp.o [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/formatting.cpp.o [ 8%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/generator.cpp.o [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/ids.cpp.o [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/localization_backend.cpp.o [ 9%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/message.cpp.o [ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/shared/mo_lambda.cpp.o [ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/codecvt_converter.cpp.o [ 10%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/default_locale.cpp.o [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/info.cpp.o [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/locale_data.cpp.o [ 11%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/boundary.cpp.o [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/codecvt.cpp.o [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/collator.cpp.o [ 12%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/conversion.cpp.o [ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/date_time.cpp.o /Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/icu/date_time.cpp: In copy constructor ‘booster::locale::impl_icu::calendar_impl::calendar_impl(const booster::locale::impl_icu::calendar_impl&)’: /Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/icu/date_time.cpp:82: warning: base class ‘class booster::locale::abstract_calendar’ should be explicitly initialized in the copy constructor [ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/formatter.cpp.o [ 13%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/icu_backend.cpp.o [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/numeric.cpp.o [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/icu/time_zone.cpp.o [ 14%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/codecvt.cpp.o /Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/posix/codecvt.cpp: In copy constructor ‘booster::locale::impl_posix::mb2_iconv_converter::mb2_iconv_converter(const booster::locale::impl_posix::mb2_iconv_converter&)’: /Users/richardcatlin/C++Projects/cppcms-0.99.10/booster/lib/locale/src/posix/codecvt.cpp:90: warning: base class ‘class booster::locale::util::base_converter’ should be explicitly initialized in the copy constructor [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/collate.cpp.o [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/converter.cpp.o [ 15%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/numeric.cpp.o [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/posix/posix_backend.cpp.o [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/codecvt.cpp.o [ 16%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/collate.cpp.o [ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/converter.cpp.o [ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/numeric.cpp.o [ 17%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/std/std_backend.cpp.o [ 18%] Building CXX object booster/CMakeFiles/booster.dir/lib/locale/src/util/gregorian.cpp.o [ 18%] Building CXX object booster/CMakeFiles/booster.dir/lib/thread/src/pthread.cpp.o Linking CXX shared library libbooster.dylib Undefined symbols for architecture x86_64: "_libiconv_close", referenced from: booster::locale::conv::impl::iconverter_base::~iconverter_base()in codepage.cpp.o booster::locale::conv::impl::iconv_between::open(char const*, char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<wchar_t>::~iconv_from_utf()in codepage.cpp.o booster::locale::conv::impl::iconv_to_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_to_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o ... "_libiconv_open", referenced from: booster::locale::conv::impl::iconv_between::open(char const*, char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_to_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<char>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_to_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<wchar_t>::open(char const*, booster::locale::conv::method_type)in codepage.cpp.o booster::locale::impl_posix::mb2_iconv_converter::from_unicode(unsigned int, char*, char const*)in codecvt.cpp.o booster::locale::impl_posix::mb2_iconv_converter::to_unicode(char const*&, char const*)in codecvt.cpp.o ... "_libiconv", referenced from: booster::locale::conv::impl::iconv_to_utf<wchar_t>::convert(char const*, char const*)in codepage.cpp.o booster::locale::conv::impl::iconv_from_utf<wchar_t>::convert(wchar_t const*, wchar_t const*)in codepage.cpp.o std::basic_string<char, std::char_traits<char>, std::allocator<char> > booster::locale::conv::impl::iconverter_base::real_convert<char, char>(char const*, char const*)in codepage.cpp.o booster::locale::impl_posix::mb2_iconv_converter::from_unicode(unsigned int, char*, char const*)in codecvt.cpp.o booster::locale::impl_posix::mb2_iconv_converter::to_unicode(char const*&, char const*)in codecvt.cpp.o booster::locale::impl_posix::mb2_iconv_converter::mb2_iconv_converter(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in codecvt.cpp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [booster/libbooster.0.0.0.dylib] Error 1 make[1]: *** [booster/CMakeFiles/booster.dir/all] Error 2 make: *** [all] Error 2 Richard-Catlins-MacBook-Pro:build richardcatlin$ sudo port install icu Password: ---> Cleaning icu Richard-Catlins-MacBook-Pro:build richardcatlin$ sudo port installed The following ports are currently installed: bzip2 @1.0.6_0 (active) db46 @4.6.21_6+java (active) expat @2.0.1_1 (active) gdbm @1.9.1_0 (active) gettext @0.18.1.1_2 (active) gperf @3.0.4_2 (active) icu @4.6.1_0 (active) libiconv @1.14_0 (active) libpcap @1.1.1_0 (active) ncurses @5.9_1 (active) ncursesw @5.8_0 (active) nspr @4.8.8_0 (active) openssl @1.0.0d_0 openssl @1.0.0e_0 (active) pcre @8.12_0 (active) python27 @2.7.2_1 (active) python_select @0.3_1 (active) readline @6.2.000_0 (active) scons @2.0.1_1 (active) spidermonkey @1.7.0_5 (active) sqlite3 @3.7.7.1_0 (active) zlib @1.2.5_0 (active) |
From: Daniel R. <dan...@li...> - 2011-09-22 14:52:38
|
Hello there! On my daily surfing I cross with this new project: https://bitbucket.org/nileshgr/cppcms/overview It has the same name as our CppCMS ! On the page it says they're considering to rename their project : Please note: This project has no relation with the C++ Web Development Framework as described at http://en.wikipedia.org/wiki/CppCMS and http://cppcms.sf.net. We are considering a rename on this and a decision will be taken soon. What we can do about it ? sue them perhaps? hehehe Cheers ! Daniel |
From: 陈抒 <csf...@gm...> - 2011-09-11 12:37:39
|
To get the correct Chinese words from MySQL via CppDB,make sure you add ";set_charset_name=utf8" into connection string.There is one example below: #include <string> #include <iostream> using namespace std; #include <cppdb/frontend.h> int main(int argc,char* argv[]){ locale new_locale(locale("zh_CN.utf8")); locale old_loc = locale::global(new_locale); try{ string connection_string("mysql:host=192.168.1.15;database=d01;user=data;password=skst;set_charset_name=utf8"); cppdb::session session(connection_string); string sql="select address from tape_local limit 0,1"; cppdb::result res = session<<sql; while(res.next()){ cout<<res.get<string>("address")<<endl; } }catch(std::exception const& ex){ cout<<ex.what()<<endl; }catch(...){ cout<<"Unknown exception"<<endl; } } I also wrote one document in Chinese here: http://blog.csdn.net/sheismylife/article/details/6767770 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2011-09-10 14:24:57
|
I will collect all stuff and send you tomorrow. 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 10, 2011 at 5:37 PM, Artyom Beilis <art...@ya...> wrote: > - Sample? > - How do you know it does not work? (How do you print the results) > - What is your locale? > - What is your OS? > - What output you get? > > CppDB does not alter the MySQL string output and it passes it as is so > I assume there is a problem with either representation or conversion > if you do any > > Artyom Beilis > > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Saturday, September 10, 2011 12:24 PM > *Subject:* [Cppcms-users] UTF-8 problem about CppDB with MySQL > > Hello, > Our MySQL server encoding is UTF-8. One guy in my team tried to get some > Chinese words from MySQL via CppDB,but all these words are unrecognized.We > took some minutes to find an way to configure CppDB but failed. > When we got back to MySQL++,we retrieved correct Chinese words. > Is this a bug for CppDB or just because we don't know how to use it > correctly? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > ------------------------------------------------------------------------------ > Malware Security Report: Protecting Your Business, Customers, and the > Bottom Line. Protect your business and customers by understanding the > threat from malware and how it can impact your online business. > http://www.accelacomm.com/jaw/sfnl/114/51427462/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Malware Security Report: Protecting Your Business, Customers, and the > Bottom Line. Protect your business and customers by understanding the > threat from malware and how it can impact your online business. > http://www.accelacomm.com/jaw/sfnl/114/51427462/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2011-09-10 09:38:32
|
- Sample? - How do you know it does not work? (How do you print the results) - What is your locale? - What is your OS? - What output you get? CppDB does not alter the MySQL string output and it passes it as is so I assume there is a problem with either representation or conversion if you do any Artyom Beilis >________________________________ >From: 陈抒 <csf...@gm...> >To: cpp...@li... >Sent: Saturday, September 10, 2011 12:24 PM >Subject: [Cppcms-users] UTF-8 problem about CppDB with MySQL > > >Hello, > Our MySQL server encoding is UTF-8. One guy in my team tried to get some Chinese words from MySQL via CppDB,but all these words are unrecognized.We took some minutes to find an way to configure CppDB but failed. > When we got back to MySQL++,we retrieved correct Chinese words. > Is this a bug for CppDB or just because we don't know how to use it correctly? > > >陈抒 >Best regards >http://blog.csdn.net/sheismylife > >------------------------------------------------------------------------------ >Malware Security Report: Protecting Your Business, Customers, and the >Bottom Line. Protect your business and customers by understanding the >threat from malware and how it can impact your online business. >http://www.accelacomm.com/jaw/sfnl/114/51427462/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-09-10 09:25:19
|
Hello, Our MySQL server encoding is UTF-8. One guy in my team tried to get some Chinese words from MySQL via CppDB,but all these words are unrecognized.We took some minutes to find an way to configure CppDB but failed. When we got back to MySQL++,we retrieved correct Chinese words. Is this a bug for CppDB or just because we don't know how to use it correctly? 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2011-09-10 08:53:30
|
Thank you very much! We have to support IE6 in China,we are trying JSONP now. 陈抒 Best regards http://blog.csdn.net/sheismylife On Sat, Sep 10, 2011 at 4:24 PM, Artyom Beilis <art...@ya...> wrote: > Hello, > > Due to the other discussion about json-rpc and same origin policy > restriction of XMLHttpRequest I've searched how to apply > CORS (Cross Origin Resource Sharing, see [1],[2]) with CppCMS. > > It was quite simple. > > I've added this code to the json_rpc/rpc.cpp example (class json_service) > > virtual void main(std::string url) > { > // Handle CORS > response().set_header("Access-Control-Allow-Origin","*"); > response().set_header("Access-Control-Allow-Headers","Content-Type"); > if(request().request_method()=="OPTIONS") { > return; > } > cppcms::rpc::json_rpc_server::main(url); > } > > It allows to send appropriate headers and handle JSON-RPC (actually > any XMLHttpRequest) in cross domain way. > > Latest specification of XMLHttpRequest allow to execute cross domain > requests if the peer responds on OPTIONS request and sets appropriate > headers actually allowing explicitly cross origin request. > > Few notes: > > - It requires up to date browsers: Firefox >= 3.5, IE >= 8 and > AFAIK any version of Chrome and Safari >= 4 > > - It currently does not work with internal HTTP web server > as it rejects OPTIONS request that was not exist in HTTP/1.0 > > So you need to run CppCMS behind real web server like Apache, > Lighttpd or Nginx. > > This is fixed in trunk version of CppCMS. > > Bottom Line: > ------------- > > If you target recent browsers i.e. IE>=8 and FF>=3.5 you don't > need to deploy JSONP like techniques. > > References: > > [1] http://www.w3.org/TR/cors/ > [2] http://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing > > > > Artyom Beilis > > > > ------------------------------------------------------------------------------ > Malware Security Report: Protecting Your Business, Customers, and the > Bottom Line. Protect your business and customers by understanding the > threat from malware and how it can impact your online business. > http://www.accelacomm.com/jaw/sfnl/114/51427462/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: augustin <aug...@ov...> - 2011-09-10 08:35:29
|
親愛的 刘怀宇, If you are going to participate in this list's discussion, I think it would be helpful to everyone if you did not subscribe to the daily digest. Your email subject lines "Cppcms-users Digest, Vol 26, Issue 11" does not help future readers going through the archives in deciding what the content of the email would be. Please, subscribe to receive individual mails. Also, you don't need to include the whole daily digest in your email. Snip appropriately the emails you reply to in order to keep a small citation that would be enough to give some context to your email. Thankfully, Artyom takes the extra trouble or replying to you by redacting a new email with an appropriate subject line. I trust your English is good enough to understand what I wrote. If you have troubles understanding, let me know and I'll translate it all in Chinese. 謝謝你的合作。 Blessings, Augustin. |