cppcms-users Mailing List for CppCMS C++ Web Framework (Page 6)
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
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2026 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: Nazim C. B. <naz...@ne...> - 2018-09-20 10:30:49
|
Hello,<div><br /></div><div>'url' template command is used to output address of url_mapper routes. If you want to create link for an external URL, you just need to use usual HTML; i.e.</div><div><br /></div><div><a href="https://www.google.com">Google</a></div><div><br /></div><div>Regards,</div><div>Nazim Can.<br /><br />-- <br />С уважением,<br />Назым-Джан Бэдир<br /><br />12:45, 20 September 2018, Asog <ret...@gm...>:<br /><blockquote><div dir="ltr"> <div><span><span>Hello,<br />I got my CppCMS page working following </span></span><span><a href="http://cppcms.com/wikipp/en/page/cppcms_1x_tut_url_mapping"><span><span>this tutorial</span></span></a></span><span><span> (</span></span><span><a href="http://cppcms.com/cppcms_ref/1.1.0/ex_url_mapping____hello__cpp.html"><span><span>full code</span></span></a></span><span><span>). However, it doesn't show how to link to an outside URL (i.e., </span></span><span><a href="https://www.google.com"><span><span>www.google.com</span></span></a></span><span><span>). Can someone point out to me how it can be done? TIA.<br /></span></span></div> </div> <p>_______________________________________________<br />Cppcms-users mailing list<br /><a href="mailto:Cpp...@li...">Cpp...@li...</a><br /><a href="https://lists.sourceforge.net/lists/listinfo/cppcms-users">https://lists.sourceforge.net/lists/listinfo/cppcms-users</a><br /></p></blockquote></div> |
|
From: Asog <ret...@gm...> - 2018-09-20 09:45:30
|
Hello, I got my CppCMS page working following this tutorial <http://cppcms.com/wikipp/en/page/cppcms_1x_tut_url_mapping> (full code <http://cppcms.com/cppcms_ref/1.1.0/ex_url_mapping____hello__cpp.html>). However, it doesn't show how to link to an outside URL (i.e., www.google.com). Can someone point out to me how it can be done? TIA. |
|
From: Vova z. <zai...@gm...> - 2018-09-19 09:19:52
|
Hello, I want to help this project, but a don't how I can do it. I beginner c++ programmer and I haven't experience with work real project and team. I would gladly help with coding or testing. Thank for attention. |
|
From: cppcms M. <cp...@ch...> - 2018-08-20 22:19:20
|
Dear all, What is the best way to integrate bootstrap 4 as framework with cppcms; specially for forms. I have no problem with the general integration and can drive e.g. table and its content or regular navigation. But when it comes to forms and using default cppcms fields I don’t find a clue to use BS4 instead of default controls already in the template. I might be able to change class setting during runtime; but templates solution is of course preferred. Is there anything I miss or is there anything I might can help to develop (but still need some initial conceptual intro). TIA Christian |
|
From: Eric J. <jan...@gm...> - 2018-07-15 12:52:56
|
Thank you Artyom. *ERIC JANSEN* Software Engineer On Sun, Jul 15, 2018 at 7:30 PM Artyom Beilis <art...@gm...> wrote: > On Sun, Jul 15, 2018 at 12:27 PM, Eric Jansen <jan...@gm...> > wrote: > > Hi Artyom, > > > > Thank you for your prompt reply. It works. But after that I encounter > > another error as shown below: > > > > $ wikipp -c /usr/local/Cellar/share/wikipp/config.js > > > > 2018-07-15 17:25:37; wikipp, error: system: Socket operation on > non-socket > > (main.cpp:14) > > > > system: Socket operation on non-socket > > > > If the wikipp is started as external application you need to specify > the socket it listens on, either unix domain socket or TCP/IP. > When it is configured as stdin - it expects to be started by the web > server that replaces stdin/fd=0 file descriptor by a socket. > > So you need to configure the service properly: > http://cppcms.com/wikipp/en/page/cppcms_1x_config#service > http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config > > Artyom > > > > > > Any configuration that I am missing? > > Thank you and regards, > > > > ERIC JANSEN > > Software Engineer > > > > > > On Sun, Jul 15, 2018 at 2:54 PM Artyom Beilis <art...@gm...> > > wrote: > >> > >> Make sure that > >> > >> "views" : { > >> "paths" : [ "/usr/local/lib/wikipp" ], > >> > >> > >> Points to right location that contains your wikipp views also check > >> that ldd on that libraries works - showing that it finds dependent > >> libraries. > >> > >> Artyom > >> > >> On Sun, Jul 15, 2018 at 9:41 AM, Eric Jansen <jan...@gm...> > wrote: > >> > Hi all, > >> > > >> > Need your assistance on configuration of wikipp after installation. > >> > I installed the cppcms 1.2.1, cppdb, and wikipp under macOS from > source > >> > code > >> > successful. But when I tried to run it for testing, as shown below > >> > failed: > >> > > >> > $ wikipp -c /usr/local/Cellar/share/wikipp/config.js > >> > > >> > 2018-07-15 14:38:10; wikipp, error: Failed to load skin:view, no > shared > >> > object/dll found (main.cpp:14) > >> > > >> > Failed to load skin:view, no shared object/dll found > >> > > >> > Is there anything that I am missing. I follow the guidance from > >> > http://cppcms.com/wikipp/en/page/install_wikipp > >> > Thank you and regards, > >> > > >> > ERIC JANSEN > >> > Software Engineer > >> > > >> > > >> > > ------------------------------------------------------------------------------ > >> > Check out the vibrant tech community on one of the world's most > >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> > _______________________________________________ > >> > Cppcms-users mailing list > >> > Cpp...@li... > >> > https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > >> > >> > >> > ------------------------------------------------------------------------------ > >> Check out the vibrant tech community on one of the world's most > >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot > >> _______________________________________________ > >> Cppcms-users mailing list > >> Cpp...@li... > >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom B. <art...@gm...> - 2018-07-15 11:30:23
|
On Sun, Jul 15, 2018 at 12:27 PM, Eric Jansen <jan...@gm...> wrote: > Hi Artyom, > > Thank you for your prompt reply. It works. But after that I encounter > another error as shown below: > > $ wikipp -c /usr/local/Cellar/share/wikipp/config.js > > 2018-07-15 17:25:37; wikipp, error: system: Socket operation on non-socket > (main.cpp:14) > > system: Socket operation on non-socket > If the wikipp is started as external application you need to specify the socket it listens on, either unix domain socket or TCP/IP. When it is configured as stdin - it expects to be started by the web server that replaces stdin/fd=0 file descriptor by a socket. So you need to configure the service properly: http://cppcms.com/wikipp/en/page/cppcms_1x_config#service http://cppcms.com/wikipp/en/page/cppcms_1x_tut_web_server_config Artyom > > Any configuration that I am missing? > Thank you and regards, > > ERIC JANSEN > Software Engineer > > > On Sun, Jul 15, 2018 at 2:54 PM Artyom Beilis <art...@gm...> > wrote: >> >> Make sure that >> >> "views" : { >> "paths" : [ "/usr/local/lib/wikipp" ], >> >> >> Points to right location that contains your wikipp views also check >> that ldd on that libraries works - showing that it finds dependent >> libraries. >> >> Artyom >> >> On Sun, Jul 15, 2018 at 9:41 AM, Eric Jansen <jan...@gm...> wrote: >> > Hi all, >> > >> > Need your assistance on configuration of wikipp after installation. >> > I installed the cppcms 1.2.1, cppdb, and wikipp under macOS from source >> > code >> > successful. But when I tried to run it for testing, as shown below >> > failed: >> > >> > $ wikipp -c /usr/local/Cellar/share/wikipp/config.js >> > >> > 2018-07-15 14:38:10; wikipp, error: Failed to load skin:view, no shared >> > object/dll found (main.cpp:14) >> > >> > Failed to load skin:view, no shared object/dll found >> > >> > Is there anything that I am missing. I follow the guidance from >> > http://cppcms.com/wikipp/en/page/install_wikipp >> > Thank you and regards, >> > >> > ERIC JANSEN >> > Software Engineer >> > >> > >> > ------------------------------------------------------------------------------ >> > Check out the vibrant tech community on one of the world's most >> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> > _______________________________________________ >> > Cppcms-users mailing list >> > Cpp...@li... >> > https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Eric J. <jan...@gm...> - 2018-07-15 09:28:05
|
Hi Artyom,
Thank you for your prompt reply. It works. But after that I encounter
another error as shown below:
$ wikipp -c /usr/local/Cellar/share/wikipp/config.js
2018-07-15 17:25:37; wikipp, error: system: Socket operation on non-socket
(main.cpp:14)
system: Socket operation on non-socket
Any configuration that I am missing?
Thank you and regards,
*ERIC JANSEN*
Software Engineer
On Sun, Jul 15, 2018 at 2:54 PM Artyom Beilis <art...@gm...>
wrote:
> Make sure that
>
> "views" : {
> "paths" : [ "/usr/local/lib/wikipp" ],
>
>
> Points to right location that contains your wikipp views also check
> that ldd on that libraries works - showing that it finds dependent
> libraries.
>
> Artyom
>
> On Sun, Jul 15, 2018 at 9:41 AM, Eric Jansen <jan...@gm...> wrote:
> > Hi all,
> >
> > Need your assistance on configuration of wikipp after installation.
> > I installed the cppcms 1.2.1, cppdb, and wikipp under macOS from source
> code
> > successful. But when I tried to run it for testing, as shown below
> failed:
> >
> > $ wikipp -c /usr/local/Cellar/share/wikipp/config.js
> >
> > 2018-07-15 14:38:10; wikipp, error: Failed to load skin:view, no shared
> > object/dll found (main.cpp:14)
> >
> > Failed to load skin:view, no shared object/dll found
> >
> > Is there anything that I am missing. I follow the guidance from
> > http://cppcms.com/wikipp/en/page/install_wikipp
> > Thank you and regards,
> >
> > ERIC JANSEN
> > Software Engineer
> >
> >
> ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Cppcms-users mailing list
> > Cpp...@li...
> > https://lists.sourceforge.net/lists/listinfo/cppcms-users
> >
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
|
|
From: Artyom B. <art...@gm...> - 2018-07-15 06:54:37
|
Make sure that
"views" : {
"paths" : [ "/usr/local/lib/wikipp" ],
Points to right location that contains your wikipp views also check
that ldd on that libraries works - showing that it finds dependent
libraries.
Artyom
On Sun, Jul 15, 2018 at 9:41 AM, Eric Jansen <jan...@gm...> wrote:
> Hi all,
>
> Need your assistance on configuration of wikipp after installation.
> I installed the cppcms 1.2.1, cppdb, and wikipp under macOS from source code
> successful. But when I tried to run it for testing, as shown below failed:
>
> $ wikipp -c /usr/local/Cellar/share/wikipp/config.js
>
> 2018-07-15 14:38:10; wikipp, error: Failed to load skin:view, no shared
> object/dll found (main.cpp:14)
>
> Failed to load skin:view, no shared object/dll found
>
> Is there anything that I am missing. I follow the guidance from
> http://cppcms.com/wikipp/en/page/install_wikipp
> Thank you and regards,
>
> ERIC JANSEN
> Software Engineer
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
|
|
From: Eric J. <jan...@gm...> - 2018-07-15 06:41:44
|
Hi all, Need your assistance on configuration of wikipp after installation. I installed the cppcms 1.2.1, cppdb, and wikipp under macOS from source code successful. But when I tried to run it for testing, as shown below failed: $ wikipp -c /usr/local/Cellar/share/wikipp/config.js 2018-07-15 14:38:10; wikipp, error: Failed to load skin:view, no shared object/dll found (main.cpp:14) Failed to load skin:view, no shared object/dll found Is there anything that I am missing. I follow the guidance from http://cppcms.com/wikipp/en/page/install_wikipp Thank you and regards, *ERIC JANSEN* Software Engineer |
|
From: Artyom B. <art...@gm...> - 2018-07-10 16:52:11
|
These should be good, most up to date, step by step instructions and tested: http://cppcms.com/wikipp/en/page/notes_for_windows_users http://cppcms.com/wikipp/en/page/windows_msvc_build One thing I can say - I suggest use ninja instead of nmake under msvc Artyom On Mon, Jul 9, 2018 at 8:23 AM, Stoyan Bukovich <s.b...@sn...> wrote: > Hello everyone, > > I am having hard time installing the framework on Windows 10. Is there > another tutorial except the one in www.cppcms.com which I can follow? > > Thanks > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Stoyan B. <s.b...@sn...> - 2018-07-09 06:24:00
|
Hello everyone, I am having hard time installing the framework on Windows 10. Is there another tutorial except the one in www.cppcms.com which I can follow? Thanks |
|
From: Artyom B. <art...@gm...> - 2018-07-07 04:29:28
|
On Fri, Jul 6, 2018 at 4:01 PM, 陈抒 <csf...@gm...> wrote: > Hi, All: > Several months ago, I tried v1.2.0 but failed, because newest stable > Nginx cannot work with cppcms when using fastcgi. Can you please provide more details? What configuration? What case? What are the errors you getting? > Did you run into the same problem? > > Dean Chen > Best regards > http://blog.csdn.net/csfreebird > Regards, Artyom Beilis |
|
From: 陈抒 <csf...@gm...> - 2018-07-06 13:01:48
|
Hi, All: Several months ago, I tried v1.2.0 but failed, because newest stable Nginx cannot work with cppcms when using fastcgi. Did you run into the same problem? Dean Chen Best regards http://blog.csdn.net/csfreebird |
|
From: Eric J. <jan...@gm...> - 2018-06-02 10:06:24
|
Hi All,
Need your assistance on installing wikipp on FreeBSD 11. I failed and
resulted in 503 Service Not Available. I do not know what causes this.
when I attempted to run wikipp using lighttpd as root access, I got the
following result:
root@freebsd:/usr/local/bin # cppcms_run wikipp -c
/usr/local/share/wikipp/config.txt
TestWeb Server Host:127.0.0.1
Web Server Port:8080
Document Root:/usr/local/bin
Script:/wikipp
Api:fastcgi
Socket:stdin
Server:/usr/local/sbin/lighttpd -f /usr/local/bin/cppcms_rundir/lighty.conf
Starting Application Server:/wikipp
Application Server PID:1623
Starting Web Server
2018-06-02 17:44:41; wikipp, error: system: Socket operation on non-socket
(main.cpp:14)
system: Socket operation on non-socket
Web Server PID:1626
------------------------------------
- Press Any Key To Stop The Server -
------------------------------------
The content of the /usr/local/etc/lighttpd/conf.d/fastcgi.conf:
fastcgi.server = (
"/wikipp" => ((
"bin-path" => "wikipp -c /usr/local/share/wikipp/config.js",
"socket" => "/tmp/wikipp-socket",
"max-procs" => 1,
"check-local" => "disable"
))
)
I edited and enabled the following in /usr/local/etc/lighttpd.conf:
server.port = 8080
server.document-root = "/usr/local/www/data/"
static-file.exclude-extensions = ( ".fcgi", ".scgi" )
index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm"
)
Last, I only added the private key into the sample of config file from
wikipp installation and rename it to config.js.
*ERIC JANSEN*
|
|
From: Artyom B. <art...@gm...> - 2018-05-18 13:42:47
|
I forgot to mention special thanks to Khaled Yakdan from code-intelligence.de for reporting this security issue Artyom Beilis On Fri, May 18, 2018 at 4:35 PM, Artyom Beilis <art...@gm...> wrote: > Released: 2018-05-18 > > It is strongly recommended to update the version to the latest one due > to security updates > > > Security Bug Fixes: > > - Fixed security bug fix in JSON parser module that can lead to DOS > > Bugs Fixed: > > - Fixed issues #36 - building with GZIP disabled > - Fixed issue #150 - incorrect parsing of multipart form > > Changes: > > - By default CppCMS now uses OpenSSL instead of GNU-TLS if both > available (you can change behavior back by adding -DDISABLE_OPENSSL=ON > to cmake) |
|
From: Artyom B. <art...@gm...> - 2018-05-18 13:35:15
|
Released: 2018-05-18 It is strongly recommended to update the version to the latest one due to security updates Security Bug Fixes: - Fixed security bug fix in JSON parser module that can lead to DOS Bugs Fixed: - Fixed issues #36 - building with GZIP disabled - Fixed issue #150 - incorrect parsing of multipart form Changes: - By default CppCMS now uses OpenSSL instead of GNU-TLS if both available (you can change behavior back by adding -DDISABLE_OPENSSL=ON to cmake) |
|
From: <org...@ya...> - 2018-05-15 13:52:38
|
Dear all,
When I try to test multiple request multiple connections on cppcms I am recieving a lot of read errors. I tried to program the url mapping hello world into asynchronous but I was still getting the same read errors when I tested it with `wrk` program.
What am I doing wrong? Pls help.
If it matters, Here is the command I used for wrk
`./wrk -t 1 -c 1 -d5s http://localhost:8080/hello `
While this is the async url mapping hello world.
`#include <cppcms/application.h>
#include <cppcms/service.h>
#include <cppcms/http_response.h>
#include <cppcms/url_dispatcher.h>
#include <cppcms/url_mapper.h>
#include <cppcms/applications_pool.h>
#include <iostream>
#include <stdlib.h>
#include <booster/intrusive_ptr.h>
#include <cppcms/applications_pool.h>
#include <cppcms/http_request.h>
#include <cppcms/http_context.h>
#include <set>
#ifdef USE_STD_TR1_BIND
#include <tr1/functional>
using std::tr1::bind;
#elif defined USE_STD_BIND
#include <functional>
using std::bind;
#endif
class hello: public cppcms::application {
public:
hello(cppcms::service &srv) :
cppcms::application(srv) {
dispatcher().assign("/number/(\\d+)",&hello::number,this,1);
mapper().assign("number","/number/{1}");
dispatcher().assign("/smile",&hello::smile,this);
mapper().assign("smile","/smile");
dispatcher().assign("",&hello::welcome,this);
mapper().assign("");
mapper().root("/hello");
}
void number(std::string num)
{
int no = atoi(num.c_str());
response().out() << "The number is " << no << "<br/>\n";
response().out() << "<a href='" << url("/") << "'>Go back</a>";
}
void smile()
{
response().out() << ":-) <br/>\n";
response().out() << "<a href='" << url("/") << "'>Go back</a>";
}
void welcome()
{
response().out() << "<h1> Wellcome To Page with links </h1>\n"
"<a href='" << url("/number",1) << "'>1</a><br>\n"
"<a href='" << url("/number",15) << "'>15</a><br>\n"
"<a href='" << url("/smile") << "' >:-)</a><br>\n";
}
};
int main(int argc,char ** argv)
{
try {
cppcms::service service(argc,argv);
booster::intrusive_ptr<hello> c=new hello(service);
service.applications_pool().mount(c);
service.run();
}
catch(std::exception const &e) {
std::cerr<<"Catched exception: "<<e.what()<<std::endl;
return 1;
}
return 0;
}
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4`
--
From my OPPO smartphone
|
|
From: Eric J. <jan...@gm...> - 2018-05-15 13:06:37
|
Hi Nazim,
Thank you. It works now.
Regards,
*ERIC JANSEN*
Sr. C/C++ Software Engineer
On Tue, May 15, 2018 at 8:17 PM, Nazım Can Bedir <naz...@ne...
> wrote:
> Hello Eric,
>
> There is a typo in your config.json;
> "default_skin" : "defskin",
> "path" : [ "./" ],
> "skins" : [ "cpp_defskin" ]
> },
> "file_server" : {
> "enable" : true,
>
> It should be "paths", not "path".
>
> Regards,
> Nazim Can.
>
>
> On 15/05/18 11:58, Eric Jansen wrote:
>
> Dear all,
>
> Need your assistance on the issue I encounter when running the webapp:
> ./WebApp -c config.json
> And the error shows as follow:
>
> Failed : When views.skins provided at least one search path should be
> given in views.paths
> 0x800c86a86: booster::stack_trace::trace(void**, int) + 0x26 in
> /usr/local/lib/libbooster.so.0
> 0x8008f36c1: booster::backtrace::backtrace(unsigned long) + 0x61 in
> /usr/local/lib/libcppcms.so.1
> 0x800933f6c: cppcms::views::manager::manager(cppcms::json::value const&)
> + 0xb0c in /usr/local/lib/libcppcms.so.1
> 0x8008ea6d5: cppcms::service::setup(void) + 0x375 in
> /usr/local/lib/libcppcms.so.1
> 0x8008eaa75: cppcms::service::service(int, char**) + 0xf5 in
> /usr/local/lib/libcppcms.so.1
> 0x40540c: unsigned long + 0x2c in /usr/home/eric/www/test/output/WebApp
> 0x4052df: _start + 0x17f in /usr/home/eric/www/test/output/WebApp
> 0x800654000: ???
>
> and my config.json:
>
> {
> "WebSite" : {
> "root" : "" ,
> "host" : "localhost:8080" ,
> "locdomain" : "localhost"
> },
> "service" : {
> "api" : "http",
> "port" : 8080
> },
> "http" : {
> "script" : "/test.fcgi" ,
> "rewrite" : [
> { "regex" : "/media(/.+)", "pattern" : "$1" },
> { "regex" : ".*" , "pattern" : "/test$0" }
> ]
> },
> "views" : {
> "default_skin" : "defskin",
> "path" : [ "./" ],
> "skins" : [ "cpp_defskin" ]
> },
> "file_server" : {
> "enable" : true,
> "listing" : true,
> "document_root" : "./media"
> }
> }
>
> What am I missing?
> Thank you and regards,
>
> *ERIC JANSEN*
> Sr. C/C++ Software Engineer
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Cppcms-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
|
|
From: Nazım C. B. <naz...@ne...> - 2018-05-15 12:33:52
|
Hello Eric,
There is a typo in your config.json;
"default_skin" : "defskin",
"path" : [ "./" ],
"skins" : [ "cpp_defskin" ]
},
"file_server" : {
"enable" : true,
It should be "paths", not "path".
Regards,
Nazim Can.
On 15/05/18 11:58, Eric Jansen wrote:
> Dear all,
>
> Need your assistance on the issue I encounter when running the webapp:
> ./WebApp -c config.json
> And the error shows as follow:
>
> Failed : When views.skins provided at least one search path should be
> given in views.paths
> 0x800c86a86: booster::stack_trace::trace(void**, int) + 0x26 in
> /usr/local/lib/libbooster.so.0
> 0x8008f36c1: booster::backtrace::backtrace(unsigned long) + 0x61 in
> /usr/local/lib/libcppcms.so.1
> 0x800933f6c: cppcms::views::manager::manager(cppcms::json::value
> const&) + 0xb0c in /usr/local/lib/libcppcms.so.1
> 0x8008ea6d5: cppcms::service::setup(void) + 0x375 in
> /usr/local/lib/libcppcms.so.1
> 0x8008eaa75: cppcms::service::service(int, char**) + 0xf5 in
> /usr/local/lib/libcppcms.so.1
> 0x40540c: unsigned long + 0x2c in /usr/home/eric/www/test/output/WebApp
> 0x4052df: _start + 0x17f in /usr/home/eric/www/test/output/WebApp
> 0x800654000: ???
>
> and my config.json:
>
> {
> "WebSite" : {
> "root" : "" ,
> "host" : "localhost:8080" ,
> "locdomain" : "localhost"
> },
> "service" : {
> "api" : "http",
> "port" : 8080
> },
> "http" : {
> "script" : "/test.fcgi" ,
> "rewrite" : [
> { "regex" : "/media(/.+)", "pattern" : "$1" },
> { "regex" : ".*" , "pattern" : "/test$0" }
> ]
> },
> "views" : {
> "default_skin" : "defskin",
> "path" : [ "./" ],
> "skins" : [ "cpp_defskin" ]
> },
> "file_server" : {
> "enable" : true,
> "listing" : true,
> "document_root" : "./media"
> }
> }
>
> What am I missing?
> Thank you and regards,
>
> *ERICJANSEN*
> Sr. C/C++ Software Engineer*
> *
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|
|
From: Eric J. <jan...@gm...> - 2018-05-15 08:59:22
|
Dear all,
Need your assistance on the issue I encounter when running the webapp:
./WebApp -c config.json
And the error shows as follow:
Failed : When views.skins provided at least one search path should be given
in views.paths
0x800c86a86: booster::stack_trace::trace(void**, int) + 0x26 in
/usr/local/lib/libbooster.so.0
0x8008f36c1: booster::backtrace::backtrace(unsigned long) + 0x61 in
/usr/local/lib/libcppcms.so.1
0x800933f6c: cppcms::views::manager::manager(cppcms::json::value const&) +
0xb0c in /usr/local/lib/libcppcms.so.1
0x8008ea6d5: cppcms::service::setup(void) + 0x375 in
/usr/local/lib/libcppcms.so.1
0x8008eaa75: cppcms::service::service(int, char**) + 0xf5 in
/usr/local/lib/libcppcms.so.1
0x40540c: unsigned long + 0x2c in /usr/home/eric/www/test/output/WebApp
0x4052df: _start + 0x17f in /usr/home/eric/www/test/output/WebApp
0x800654000: ???
and my config.json:
{
"WebSite" : {
"root" : "" ,
"host" : "localhost:8080" ,
"locdomain" : "localhost"
},
"service" : {
"api" : "http",
"port" : 8080
},
"http" : {
"script" : "/test.fcgi" ,
"rewrite" : [
{ "regex" : "/media(/.+)", "pattern" : "$1" },
{ "regex" : ".*" , "pattern" : "/test$0" }
]
},
"views" : {
"default_skin" : "defskin",
"path" : [ "./" ],
"skins" : [ "cpp_defskin" ]
},
"file_server" : {
"enable" : true,
"listing" : true,
"document_root" : "./media"
}
}
What am I missing?
Thank you and regards,
*ERIC JANSEN*
Sr. C/C++ Software Engineer
|
|
From: Dominic Gua�a <org...@ya...> - 2018-05-11 03:01:02
|
Dear all,
I am still new to http & cppcms, so pls bear with me. When I try to test multiple request multiple connections on cppcms I am recieving a lot of read errors. I tried to program the url mapping hello world into asynchronous but I was still getting the same read errors when I tested it with `wrk` program.
What am I doing wrong? Pls help.
If it matters, Here is the command I used for wrk
`./wrk -t 1 -c 1 -d5s http://localhost:8080/hello`
While this is the async url mapping hello world.
`#include <cppcms/application.h>
#include <cppcms/service.h>
#include <cppcms/http_response.h>
#include <cppcms/url_dispatcher.h>
#include <cppcms/url_mapper.h>
#include <cppcms/applications_pool.h>
#include <iostream>
#include <stdlib.h>
#include <booster/intrusive_ptr.h>
#include <cppcms/applications_pool.h>
#include <cppcms/http_request.h>
#include <cppcms/http_context.h>
#include <set>
#ifdef USE_STD_TR1_BIND
#include <tr1/functional>
using std::tr1::bind;
#elif defined USE_STD_BIND
#include <functional>
using std::bind;
#endif
class hello: public cppcms::application {
public:
hello(cppcms::service &srv) :
cppcms::application(srv)
{
dispatcher().assign("/number/(\\d+)",&hello::number,this,1);
mapper().assign("number","/number/{1}");
dispatcher().assign("/smile",&hello::smile,this);
mapper().assign("smile","/smile");
dispatcher().assign("",&hello::welcome,this);
mapper().assign("");
mapper().root("/hello");
}
void number(std::string num)
{
int no = atoi(num.c_str());
response().out() << "The number is " << no << "<br/>\n";
response().out() << "<a href='" << url("/") << "'>Go back</a>";
}
void smile()
{
response().out() << ":-) <br/>\n";
response().out() << "<a href='" << url("/") << "'>Go back</a>";
}
void welcome()
{
response().out() <<
"<h1> Wellcome To Page with links </h1>\n"
"<a href='" << url("/number",1) << "'>1</a><br>\n"
"<a href='" << url("/number",15) << "'>15</a><br>\n"
"<a href='" << url("/smile") << "' >:-)</a><br>\n";
}
};
int main(int argc,char ** argv)
{
try {
cppcms::service service(argc,argv);
booster::intrusive_ptr<hello> c=new hello(service);
service.applications_pool().mount(c);
service.run();
}
catch(std::exception const &e) {
std::cerr<<"Catched exception: "<<e.what()<<std::endl;
return 1;
}
return 0;
}
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4`
|
|
From: Eric J. <jan...@gm...> - 2018-05-03 11:45:56
|
Hi, Yes it's matched. Thanks Nazim *ERIC JANSEN* Sr. C/C++ Software Engineer On Wed, May 2, 2018 at 12:31 AM, Nazım Can Bedir <naz...@ne... > wrote: > Hi, > > In addition to Joerg's suggestion, could you please verify that the type > of content variable you are passing to render(...) function matches to the > content type declared in view template. CppCMS uses single base class > (base_content) and relies on dynamic_cast for conversion. > > Regards, > Nazim Can. > > > > On 01/05/18 15:43, Joerg Sonnenberger wrote: > >> On Tue, May 01, 2018 at 07:54:22PM +0800, Eric Jansen wrote: >> >>> I compiled the source code with clang++ under FreeBSD 11. >>> >> Are you using -rdynamic or -Wl,--export-dynamic when linking? >> >> Joerg >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Eric J. <jan...@gm...> - 2018-05-02 12:24:24
|
Hi Joerg, Thank you it's successful! This is how I did: > clang++ -rdynamic main.cpp -lcppcms -o WebApp -I /usr/local/include -L > /usr/local/lib -std=c++11 -lbooster *ERIC JANSEN* Sr. C/C++ Software Engineer On Wed, May 2, 2018 at 5:49 PM, Joerg Sonnenberger <jo...@be...> wrote: > On Wed, May 02, 2018 at 11:04:12AM +0800, Eric Jansen wrote: > > Is it an additional parameters for compilation? > > Thanks > > It's necessary for linking the main executable. > > Joerg > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Joerg S. <jo...@be...> - 2018-05-02 09:50:10
|
On Wed, May 02, 2018 at 11:04:12AM +0800, Eric Jansen wrote: > Is it an additional parameters for compilation? > Thanks It's necessary for linking the main executable. Joerg |
|
From: Eric J. <jan...@gm...> - 2018-05-02 03:04:23
|
Is it an additional parameters for compilation? Thanks Eric > On 1 May 2018, at 8:43 PM, Joerg Sonnenberger <jo...@be...> wrote: > >> On Tue, May 01, 2018 at 07:54:22PM +0800, Eric Jansen wrote: >> I compiled the source code with clang++ under FreeBSD 11. > > Are you using -rdynamic or -Wl,--export-dynamic when linking? > > Joerg > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |