cppcms-users Mailing List for CppCMS C++ Web Framework (Page 141)
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
|
|
From: Markus R. <us...@ma...> - 2009-10-28 18:15:32
|
Artyom wrote:
>> Can someone explain me how to use cppcms_run for a production release or
>> is it not suitable for that?
>
> Defenatly not. cppcms_run is just tool for debugging and testing the
> framework agains different web servers.
Thanks for making that clear. I have to admit that it is great tool for
debugging and testing!
> For example. This is configuration of production CppCMS wiki service for
> lighttpd.
Thank you for your configuration and explanation!
I am not sure at the moment which server to use.
>> I am a bit confused why the document root is an absolut path, while the
>> fcgi process must be relative:
>> /usr/local/bin/cppcms_run: line 474: ./MY_ABS_PATH/hello.fcgi: File not
>> found (so ./ is prefixed there)
>
> It is just because I'm too lazy to write full path. So cppcms_run assumes
> that the script is placed in current working directory and it names script
> -- the base path according to program name by default.
Ok, this makes perfectly sense when it is used for debugging.
>> 2.) How can I run the site at the root of the server?
>>
>> When I use -s /hello, I can access the site at
>> http://markusbyte:8080/hello/. How can I completely avoid the /hello/ to
>> access the site at http://markusbyte:8080/.
>>
>> I hope it can be done without rewrite rules. It would be perfect if there
>> is a webserver independend way?
>
>
> Generally it is **bad** idea. And I explain why. Web server does much more
> then providing fast-cgi service it also serves files. If hello is related
> to / then if you want to get a file "/hello.css" you need to know how to
> serve it VIA your program, and beleve me YOU DO NOT want to do this
> because serving files has LOTs of security issues that should be handled
> correctly.
It is easy to give exceptions that specific paths or file extensions are not
handeled by a fcgi program. At least with mod_rewrite for apache.
I absolutely agree that for a normal web application or cms the normal file
delievery should be done by the web server because of the security issues.
But for the project I am writing these security issues do not exist. All
files are in a single directory where the user has only read, but no write
permissions. For my system it is not possible to distinguish between
content and media files, because all can be delieverd as they are or
rendered to html files.
Besides that I want full control over the delievery and want my own code to
design what to do with a specific mime type and so on. Delievering
everything myself also makes it possible to have a global caching strategy
for all files. I also want syndication for all directories.
The file delievery already works btw.
> Generally you may specify as script "/", but some web servers have problem
> with that.
I tried it with nginx and apache2 and it did not work for both.
>> 3.) Using filters in other classes than base_view.
>>
>> The filters like escape can be only used in base_view classes (or classes
>> inheriting from it) and I don't see any reason why. In addition to that
>> there are not const, but they don't modify the object (they just return a
>> string).
>>
>
> They are not const but some filter may be non-const. Just think that you
> may to access DB from filter if cache is not avalible (not that it is
> correct way to do this)
const only refers to the state of the object, not to global sideeffects like
network or database. For caching you can use the keyword mutable.
>> I would suggest to make them as functions or static methods.
>> ---------
>
> In CppCMS 1.x.x they are static methods.
Ok, this is perfect then.
Up to that I need a copy of encode in my code.
> There is one more important quite technical point why these functions are
> members.
I have not used filters enough up to yet. But I am sure creating your own
filters can be very handy.
>> 4.) Wrong mime type for failure pages.
>>
>> For 500 internal server errors, 404 document not found and so on the
>> Content-Type is text/plain even though a html page is shown[0].
>
> Ok I need to check this. When do you get page of size "0" generally when
> 500 or 404 error occures an html page is generated as well? How do you
> get such error?
There is a telnet session at the end. Do you need other information?
>> 5.) Interface to set_header.
>>
>> In cppcms::application set_header takes a pointer to HTTPHeader. When I
>> look into cppcms::worker_thread::set_header I see that a auto_ptr is
>> taking ownership of this pointer. Maybe the documentation points out that
>> too, but it would be much clearer if the the auto_ptr is used in the
>> interface. Having that, it would be easy to see that you can pass a fresh
>> allocated object without having to worry what will happen. So it should
>> read:
>>
>> void set_header(std::auto_ptr<cgicc::HTTPHeader> h) {
>> worker.set_header(h); }
>>
>
> I am absolutly agree, but I must admit that all http headers stuff is
> quite conceptually broken because of very bad design of CgiCC library
> CppCMS uses. It is totally rewritten in CppCMS 1.x.x
Ok, now I can't await CppCMS 1.x.x :-)
thank you
Markus Raab
--
http://www.markus-raab.org | Einsicht ist der erste Schritt zur
-o) | Besserung. -- Sprichwort
Kernel 2.6.24-1-a /\ |
on a x86_64 _\_v |
|
|
From: Artyom <art...@ya...> - 2009-10-27 21:13:16
|
> For 500 internal server errors, 404 document not found and so on the
> Content-Type is text/plain even though a html page is shown[0].
Thank you for bug report.
Fixed in trunk. You are welcome to take the latest version from SVN.
Artyom.
P.S.: This bug just makes me even more convinced that CgiCC should be dropped away.
|
|
From: Artyom <art...@ya...> - 2009-10-27 20:54:31
|
Hello
> Can someone explain me how to use cppcms_run for a production release or is it
> not suitable for that?
Defenatly not. cppcms_run is just tool for debugging and testing the framework
agains different web servers.
You should run CppCMS process just like and other FastCGI process and you should
refer to the web server documentation.
In general there are two ways of running
1. Run web server and start cppcms service externally -- that what cppcms run does.
2. Make web server manage CppCMS applications (Not supported by Nginx)
For example. This is configuration of production CppCMS wiki service for lighttpd:
server.modules += ( "mod_fastcgi" )
fastcgi.server = (
"/wikipp" =>
((
"bin-path" => "/some/path/to/wikipp -c /some/path/to/config-wikipp.txt",
"socket" => "/tmp/wikipp.socket",
"max-procs" => 1,
"check-local" => "disable"
))
)
Notes:
a) max-procs == 1 -- make sure that only one process is started. CppCMS controls its processes
on its own.
b) check-local = disable -- do to try to find a real executable or script.
c) Also config-wikipp.txt DOES NOT define specific socket in order to use stdin as socket.
See: http://art-blog.no-ip.info/wikipp/en/page/ref_config#server-api
d) When web server starts application it runs under web server permissions, if you want to limit it even more
you may use various mods like chroot etc.
Generally just run cppcms_run and take a look on created configuration and start working with them.
CppCMS is just a simple FastCGI or SCGI service.
-------------------
> I am a bit confused why the document root is an absolut path, while the fcgi
> process must be relative:
> /usr/local/bin/cppcms_run: line 474: ./MY_ABS_PATH/hello.fcgi: File not found
> (so ./ is prefixed there)
It is just because I'm too lazy to write full path. So cppcms_run assumes that the script is placed in current
working directory and it names script -- the base path according to program name by default.
cppcms_run mostly used for testing and debugging.
> 2.) How can I run the site at the root of the server?
>
> When I use -s /hello, I can access the site at http://markusbyte:8080/hello/.
> How can I completely avoid the /hello/ to access the site at
> http://markusbyte:8080/.
>
> I hope it can be done without rewrite rules. It would be perfect if there is a
> webserver independend way?
Generally it is **bad** idea. And I explain why. Web server does much more
then providing fast-cgi service it also serves files. If hello is related to / then
if you want to get a file "/hello.css" you need to know how to serve it VIA your program, and beleve me YOU DO NOT
want to do this because serving files has LOTs of security issues that should be handled
correctly.
Generally you may specify as script "/", but some web servers have problem with that.
> 3.) Using filters in other classes than base_view.
>
> The filters like escape can be only used in base_view classes (or classes
> inheriting from it) and I don't see any reason why. In addition to that there
> are not const, but they don't modify the object (they just return a string).
>
They are not const but some filter may be non-const. Just think that you may to access
DB from filter if cache is not avalible (not that it is correct way to do this)
> I would suggest to make them as functions or static methods.
> ---------
In CppCMS 1.x.x they are static methods.
There is one more important quite technical point why these functions are members.
Lest assume you have some filter
class foo : public cppcms::base_view{
string bar_filter(string somethings);
};
When you compile the template to shared object it does not know what foo::foo_bar filter is and it is
resolved only when it is "dlopened" This is defenatly not a problem for ELF platform but it is a huge
problem for DLL platform. DLLs may have no unresolved symbols!
So this problem is simply workarounded by making bar_filter virtual, thus DLL should only know the class
layout and not need to know the resolution of specific symbols. So if you want to create custom filter you need to
provide them somehow via callback methods -- this means they should be somehow members of your views known in compilation time.
boost::function can be used as well (when it is member of class).
> 4.) Wrong mime type for failure pages.
>
> For 500 internal server errors, 404 document not found and so on the
> Content-Type is text/plain even though a html page is shown[0].
Ok I need to check this. When do you get page of size "0" generally when
500 or 404 error occures an html page is generated as well? How do you
get such error?
> 5.) Interface to set_header.
>
> In cppcms::application set_header takes a pointer to HTTPHeader. When I look
> into cppcms::worker_thread::set_header I see that a auto_ptr is taking
> ownership of this pointer. Maybe the documentation points out that too, but
> it would be much clearer if the the auto_ptr is used in the interface. Having
> that, it would be easy to see that you can pass a fresh allocated object
> without having to worry what will happen. So it should read:
>
> void set_header(std::auto_ptr<cgicc::HTTPHeader> h) { worker.set_header(h); }
>
I am absolutly agree, but I must admit that all http headers stuff is quite conceptually broken because
of very bad design of CgiCC library CppCMS uses. It is totally rewritten in CppCMS 1.x.x
HTTP/1.1 404 Not found
Date: Tue, 27 Oct 2009 13:46:24 GMT
Server: Apache/2.2.9 (Debian) mod_fastcgi/2.4.6
X-Powered-By: cppcms/0.0.4
Content-Length: 248
Connection: close
Content-Type: text/plain
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
Ok I'll check this.
Best,
Artyom
|
|
From: Markus R. <us...@ma...> - 2009-10-27 14:19:58
|
Hello list!
I am currently working with cppcms for an opensource project. I will announce
it (with code) when there is something useful. For now I have some questions
and remarks.
First I have to thank for the great work already done! Lots of basic technical
stuff (manager, application_factory, worker_thread,...) and helpers
(cppcms_run) are there which makes working with fcgi much easier and faster.
While I was first sceptical about the static templates, I like them very much
now too. It is nice that you get a compile error when there is something
wrong with the template and it is certainly the solution achieving best
performance.
1.) How do use cpp_cms for production server?
Can someone explain me how to use cppcms_run for a production release or is it
not suitable for that? I want that the user (not root!) running it has access
to the document root, but of course no write access to the fcgi program
(which should not be inside the document root).
I am a bit confused why the document root is an absolut path, while the fcgi
process must be relative:
/usr/local/bin/cppcms_run: line 474: ./MY_ABS_PATH/hello.fcgi: File not found
(so ./ is prefixed there)
2.) How can I run the site at the root of the server?
When I use -s /hello, I can access the site at http://markusbyte:8080/hello/.
How can I completely avoid the /hello/ to access the site at
http://markusbyte:8080/.
I hope it can be done without rewrite rules. It would be perfect if there is a
webserver independend way?
3.) Using filters in other classes than base_view.
The filters like escape can be only used in base_view classes (or classes
inheriting from it) and I don't see any reason why. In addition to that there
are not const, but they don't modify the object (they just return a string).
I would suggest to make them as functions or static methods.
4.) Wrong mime type for failure pages.
For 500 internal server errors, 404 document not found and so on the
Content-Type is text/plain even though a html page is shown[0].
5.) Interface to set_header.
In cppcms::application set_header takes a pointer to HTTPHeader. When I look
into cppcms::worker_thread::set_header I see that a auto_ptr is taking
ownership of this pointer. Maybe the documentation points out that too, but
it would be much clearer if the the auto_ptr is used in the interface. Having
that, it would be easy to see that you can pass a fresh allocated object
without having to worry what will happen. So it should read:
void set_header(std::auto_ptr<cgicc::HTTPHeader> h) { worker.set_header(h); }
This list is now also available as usenet group gmane.comp.lib.cppcms.users.
thank you
Markus Raab
[0]
$ telnet markusbyte 8080
Trying 192.168.0.3...
Connected to markusbyte.markus-raab.org.
Escape character is '^]'.
GET / HTTP 1.1
HTTP/1.1 404 Not found
Date: Tue, 27 Oct 2009 13:46:24 GMT
Server: Apache/2.2.9 (Debian) mod_fastcgi/2.4.6
X-Powered-By: cppcms/0.0.4
Content-Length: 248
Connection: close
Content-Type: text/plain
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html>
Connection closed by foreign host.
|
|
From: Artyom <art...@ya...> - 2009-10-17 18:21:53
|
Hello,
> I am waiting for the comet of cppcms. I don't know
> the communication between threads or process will be
> supported in next version of cppcms?
This is good question.
Comet applications are not usual applications that hold one
open connection per thread.
Usually running comet service you would program your application
using event driven technique, when each request would be handled
by single persistent instance of your application class. So all
request for the service usually would be redirected to one
program. See this example:
http://art-blog.no-ip.info/cppcms/blog/post/47
Also all threads, processes and distributed computers would
be able to talk to each other using JSON-RPC mechanism.
The API and the full API model are not finalized yet but
this is the general concept.
I hope this information helps.
Best regards.
Artyom
|
|
From: Artyom <art...@ya...> - 2009-10-17 18:13:33
|
> I am a green hand to use cppCMS. I don't know if there
> is some wonderful technique to debug cppCMS App beyond the
> gdb ?
>
It is very simple, you can run CppCMS application as any other
C++ application.
cppcms_run script has an option "-e" to not start application
allowing you start it externally.
Now after web server started just run your application in
debugger as any other C++ application. i.e.:
Normal run:
cppcms_run hello -c config.txt
Now you need
cppcms_run hello -e -c config.txt
And then run:
gdb hello
r -c config.txt
Or any other debugging environment like IDE.
Best,
Artyom
|
|
From: Artyom <art...@ya...> - 2009-10-17 18:08:45
|
Take a look on this text:
> Failed to locate server nginx, exitting
> Try providing PATH valiable
>
You need to update PATH variable to make it wisible -- i.e.
you need that command "which nginx" would find it.
> my nginx installed in my directory: /home/zhen/app/nginx .
So you probably need to do
export PATH=/home/zhen/app/nginx/sbin:$PATH
And try to run the script again.
Artyom
|
|
From: Ping.Zheng <ky...@gm...> - 2009-10-17 16:58:50
|
Hi, all: I am waiting for the comet of cppcms. I don't know the communication between threads or process will be supported in next version of cppcms? -- with all kind regards |
|
From: Zheng P. <ky...@gm...> - 2009-10-16 17:35:37
|
Hi, everyone: I am a green hand to use cppCMS. I don't know if there is some wonderful technique to debug cppCMS App beyond the gdb ? -- with kind regards |
|
From: Ping.Zheng <ky...@gm...> - 2009-10-16 17:07:35
|
This is my first time to use cppcms, and I have compiled the hello_world example. When I run: cppcms_run -S nginx hello.fcgi -c config.txt my console output: Web Server Host:127.0.0.1 Web Server Port:8080 Document Root:/home/zhen/build/examples-0.0.4/hello_world Script:/hello.fcgi Api:fastcgi Socket:/tmp/hello-world.sock Failed to locate server nginx, exitting Try providing PATH valiable my nginx installed in my directory: /home/zhen/app/nginx . I am not familiar with nginx, I don't how to let the nginx to proxy for my hello.fcgi. pls help me. -- with all kind regards |
|
From: Ping.Zheng <sho...@gm...> - 2009-10-16 17:06:28
|
Hi, all: This is my first time to use cppcms, and I have compiled the hello_world example. When I run: cppcms_run -S nginx hello.fcgi -c config.txt my console output: Web Server Host:127.0.0.1 Web Server Port:8080 Document Root:/home/zhen/build/examples-0.0.4/hello_world Script:/hello.fcgi Api:fastcgi Socket:/tmp/hello-world.sock Failed to locate server nginx, exitting Try providing PATH valiable my nginx installed in my directory: /home/zhen/app/nginx . I am not familiar with nginx, I don't how to let the nginx to proxy for my hello.fcgi. pls help me. -- with all kind regards |
|
From: Artyom <art...@ya...> - 2009-10-11 19:45:37
|
Hello, First alpha release is expected in few month, and a first stable release probably in half a year. Depending on the progress. Next version includes many advanced features including backward compatible ABI, advanced l10n and i18n features, so stabilization would take some time. Artyom --- On Sun, 10/11/09, Ping.Zheng <ky...@gm...> wrote: > From: Ping.Zheng <ky...@gm...> > Subject: [Cppcms-users] when we can use comet on cppcms > To: cpp...@li... > Date: Sunday, October 11, 2009, 8:55 PM > Hi, everybody: > I have not used cppcms befor, and I can not access http://art-blog.no-ip.info/cppcms/blog. > I am finding a c plus plus framework which can give a good > comet solution, I want to know when we can use comet on > cppcms, when the CppCMS > 1.x.x will be released? > > > -- > with all kind regards > > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference > in SF, CA > is the only developer event you need to attend this year. > Jumpstart your > developing skills, take BlackBerry mobile applications to > market and stay > ahead of the curve. Join us from November 9 - 12, 2009. > Register now! > http://p.sf.net/sfu/devconference > -----Inline Attachment Follows----- > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Ping.Zheng <ky...@gm...> - 2009-10-11 18:55:58
|
Hi, everybody: I have not used cppcms befor, and I can not access http://art-blog.no-ip.info/cppcms/blog. I am finding a c plus plus framework which can give a good comet solution, I want to know when we can use comet on cppcms, when the CppCMS 1.x.x<http://cppcms.sourceforge.net/wikipp/en/page/main#cppcms1>will be released? -- with all kind regards |
|
From: Artyom <art...@ya...> - 2009-06-23 14:21:55
|
See: http://cppcms.sourceforge.net/wikipp/en/page/ref_utils#run By default it binds to 127.0.0.0 for security reasons. If you want to bind to any host run: cppcms_run -h 0.0.0.0 <All other parameters> Artyom --- On Tue, 6/23/09, nitin rakh <nit...@re...> wrote: From: nitin rakh <nit...@re...> Subject: [Cppcms-users] work on local host but not on lan To: cpp...@li... Date: Tuesday, June 23, 2009, 2:51 PM hello sir, Hello World is ruuing on http://localhost:8080/hello.fcgi. but is not ruuning on lan http://192.168.0.23:8080/hello.fcgi ,he give me error coonection refused. when i run netstat -ntulp he show me 8080 is listen by lighttpd plz help me tcp 0 0 0.0.0.0:11111 0.0.0.0:* LISTEN 3131/ricci tcp 0 0 0.0.0.0:9895 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9896 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9897 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2193/mysqld tcp 0 0 0.0.0.0:9898 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9899 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1966/portmap tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 443/lighttpd -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Are you an open source citizen? Join us for the Open Source Bridge conference! Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. Need another reason to go? 24-hour hacker lounge. Register today! http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: nitin r. <nit...@re...> - 2009-06-23 11:54:12
|
hello sir, Hello World is ruuing on http://localhost:8080/hello.fcgi. but is not ruuning on lan http://192.168.0.23:8080/hello.fcgi ,he give me error coonection refused. when i run netstat -ntulp he show me 8080 is listen by lighttpd plz help me tcp 0 0 0.0.0.0:11111 0.0.0.0:* LISTEN 3131/ricci tcp 0 0 0.0.0.0:9895 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9896 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9897 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2193/mysqld tcp 0 0 0.0.0.0:9898 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:9899 0.0.0.0:* LISTEN 2160/xinetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1966/portmap tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 443/lighttpd |
|
From: Artyom <art...@ya...> - 2009-06-22 19:47:37
|
Hello Nitin
> Unknown api:fastcgi
You probably hadn't compiled cppcms with libfcgi (I think you hand't
installed them).
You may try to use "scgi" API as alternative or just
install libfcgi and libfcgi++ and build libcppcms once again.
(Don't forget to rerun configure)
Artyom
|
|
From: nitin r. <nit...@re...> - 2009-06-22 14:16:56
|
hello sir,
i am new for cppcms.
my problem is hello word example not work. i give some informatio
cppcms_run hello.fcgi -c config.txt
Web Server Host:127.0.0.1
Web Server Port:8080
Document Root:/root/nitin/examples-0.0.4/hello_world
Script:/hello.fcgi
Api:fastcgi
Socket:/tmp/hello-world.sock
Server:/usr/local/sbin/lighttpd -f /root/nitin/examples-0.0.4/hello_world/cppcms_rundir/lighty.conf
Starting Application Server:/hello.fcgi
Application Server PID:19899
Starting Web Server
2009-06-22 19:42:20: (log.c.172) server started
Unknown api:fastcgi
Web Server PID:19902
------------------------------------
- Press Any Key To Stop The Server -
------------------------------------
may be this error Unknown api:fastcgi
my os centos5 64bit
install fcgi-2.4.0
lighttpd
lighttpd.config
server.modules = (
"mod_access",
"mod_accesslog",
"mod_fastcgi",
"mod_rewrite",
"mod_auth"
)
plz help me |
|
From: Stanimir M. <sta...@zo...> - 2009-04-28 14:00:47
|
Greet advices, thanks a lot! The Virtual Private Server is a good choice if I was only a bit more knowledgeable at Linux, so I will take the easiest way for now with the embedded build of cppcms. Just asked my hosting company where configuring the web server to run fast-cgi application is possible and they responded negatively, even that they have Apache fastcgi-mod installed. Soon after getting more comfortable with Linux I will move to VPS. I will keep you informed of the progress! Greetings, Stanimir On Tue, Apr 28, 2009 at 4:08 PM, Artyom <art...@ya...> wrote: > >> I didn't manage to rewrite the small web utility as I >> promised but now >> we have some more serious project to do. I want to create a >> website >> with cppcms and for now it will be hosted to an ordinary >> host company >> with standard plan. As I said already, my experience with >> Linux is >> very small, and it is easier for me to ask you what should >> be >> available from my hosting company in order to install >> cppcms and run >> my web application? > > You need an ability to run COMPILED srcipts via at least CGI > interface, when FastCGI/SCGI is strongly recommended. > > >> Now with the hosting company i will be definitely >> more >> restricted and without sudo abilities :) > > Most of chances you need to access to shell prompt and ability to > upload compiled software, also you should need an ability to > configure the web server to start FastCGI applications and run them. > > You may do simplest check and compile tiny C++ FastCGI application > using libfcgi that just prints hello world and try running it on your > hosting system. > > Start from writing "hello world" CppCMS application, uploading and testing > by using "ldd hello.fcgi" what libraries are you missing and then compiling > them statically. > > My may check ./configure flags and disable features that are not madatory, > like: --disable-forkcache --disable-tcpcache --disable-crypt --disable-sqlite, depending on your needs. > > Also, you may try to work with CGI API, for example compile the > system as "embedded", but it would not have any cache and will not > be able to give high performance as expected. > >> For wikipp you are using sourceforge to be hosted, and I >> thought that >> you have some easy steps to follow and install cppcms to a >> hosting >> company with restricted rights. > > No, CppCMS is not hosted on sourceforge, it is just a static mirror > of primary wiki site. > > So to be on safe side, the best is Virtual Private Server that today > are quite cheep. > > Second point, that you probably need to compile as more libraries as > you can statically, if you you would be able not to worry about libraries. > > > Regards, > Artyom > > P.S.: I'd be glad to get some feedback on your progress. > >> >> Thanks in advance for your answer! >> Stanimir >> >> >> On Sat, Feb 7, 2009 at 11:10 PM, Artyom <art...@ya...> >> wrote: >> > >> >> It works like a charm now! Thanks for your >> effort! >> > >> > Thanks for the problem reports. They are very >> important. >> > >> >> >> >> I did compile some of the examples also, and now I >> am going >> >> to enjoy >> >> writing some more cppcms tryouts until i get >> familiar and >> >> prove some >> >> concepts. >> > >> > I would be glad to recieve some feedback. >> > >> >> My next step is to use cppcms to rewrite one small >> asp.net >> >> application >> >> (mostly tool) which is really slow at the moment. >> This will >> >> verify my >> >> big expectations in cppcms and c++. I will post >> the results >> >> when it is >> >> finished. >> > >> > Yes, I would be glad to get a feedback on positive and >> negative >> > points, things that should be improved and so on. >> > >> > Artyom >> > >> > >> > >> > >> > >> >> ------------------------------------------------------------------------------ >> Register Now & Save for Velocity, the Web Performance >> & Operations >> Conference from O'Reilly Media. Velocity features a full >> day of >> expert-led, hands-on workshops and two days of sessions >> from industry >> leaders in dedicated Performance & Operations tracks. >> Use code vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Artyom <art...@ya...> - 2009-04-28 13:08:46
|
> I didn't manage to rewrite the small web utility as I > promised but now > we have some more serious project to do. I want to create a > website > with cppcms and for now it will be hosted to an ordinary > host company > with standard plan. As I said already, my experience with > Linux is > very small, and it is easier for me to ask you what should > be > available from my hosting company in order to install > cppcms and run > my web application? You need an ability to run COMPILED srcipts via at least CGI interface, when FastCGI/SCGI is strongly recommended. > Now with the hosting company i will be definitely > more > restricted and without sudo abilities :) Most of chances you need to access to shell prompt and ability to upload compiled software, also you should need an ability to configure the web server to start FastCGI applications and run them. You may do simplest check and compile tiny C++ FastCGI application using libfcgi that just prints hello world and try running it on your hosting system. Start from writing "hello world" CppCMS application, uploading and testing by using "ldd hello.fcgi" what libraries are you missing and then compiling them statically. My may check ./configure flags and disable features that are not madatory, like: --disable-forkcache --disable-tcpcache --disable-crypt --disable-sqlite, depending on your needs. Also, you may try to work with CGI API, for example compile the system as "embedded", but it would not have any cache and will not be able to give high performance as expected. > For wikipp you are using sourceforge to be hosted, and I > thought that > you have some easy steps to follow and install cppcms to a > hosting > company with restricted rights. No, CppCMS is not hosted on sourceforge, it is just a static mirror of primary wiki site. So to be on safe side, the best is Virtual Private Server that today are quite cheep. Second point, that you probably need to compile as more libraries as you can statically, if you you would be able not to worry about libraries. Regards, Artyom P.S.: I'd be glad to get some feedback on your progress. > > Thanks in advance for your answer! > Stanimir > > > On Sat, Feb 7, 2009 at 11:10 PM, Artyom <art...@ya...> > wrote: > > > >> It works like a charm now! Thanks for your > effort! > > > > Thanks for the problem reports. They are very > important. > > > >> > >> I did compile some of the examples also, and now I > am going > >> to enjoy > >> writing some more cppcms tryouts until i get > familiar and > >> prove some > >> concepts. > > > > I would be glad to recieve some feedback. > > > >> My next step is to use cppcms to rewrite one small > asp.net > >> application > >> (mostly tool) which is really slow at the moment. > This will > >> verify my > >> big expectations in cppcms and c++. I will post > the results > >> when it is > >> finished. > > > > Yes, I would be glad to get a feedback on positive and > negative > > points, things that should be improved and so on. > > > > Artyom > > > > > > > > > > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance > & Operations > Conference from O'Reilly Media. Velocity features a full > day of > expert-led, hands-on workshops and two days of sessions > from industry > leaders in dedicated Performance & Operations tracks. > Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
|
From: Stanimir M. <sta...@zo...> - 2009-04-28 11:07:51
|
Hi Artyom, I didn't manage to rewrite the small web utility as I promised but now we have some more serious project to do. I want to create a website with cppcms and for now it will be hosted to an ordinary host company with standard plan. As I said already, my experience with Linux is very small, and it is easier for me to ask you what should be available from my hosting company in order to install cppcms and run my web application? Until now i did install Ubuntu with KDevelop for developing with cppcms. Now with the hosting company i will be definitely more restricted and without sudo abilities :) For wikipp you are using sourceforge to be hosted, and I thought that you have some easy steps to follow and install cppcms to a hosting company with restricted rights. Thanks in advance for your answer! Stanimir On Sat, Feb 7, 2009 at 11:10 PM, Artyom <art...@ya...> wrote: > >> It works like a charm now! Thanks for your effort! > > Thanks for the problem reports. They are very important. > >> >> I did compile some of the examples also, and now I am going >> to enjoy >> writing some more cppcms tryouts until i get familiar and >> prove some >> concepts. > > I would be glad to recieve some feedback. > >> My next step is to use cppcms to rewrite one small asp.net >> application >> (mostly tool) which is really slow at the moment. This will >> verify my >> big expectations in cppcms and c++. I will post the results >> when it is >> finished. > > Yes, I would be glad to get a feedback on positive and negative > points, things that should be improved and so on. > > Artyom > > > > > |
|
From: Artyom <art...@ya...> - 2009-02-22 21:09:11
|
Hi, You probably compiled cppcms library as embedded without fastcgi support. So by default it works only as CGI. Thus you need to work with it in different way -- configure server direcly to run cgi. The cppcms_run script supports fastcgi and scgi backends. How did you compile it? (flags) Artyom --- On Sun, 2/22/09, stuart brockman <stu...@ho...> wrote: > From: stuart brockman <stu...@ho...> > Subject: [Cppcms-users] HTTP 500 errors - backend died? > To: cpp...@li... > Date: Sunday, February 22, 2009, 10:54 PM > Hi, I am having problems getting any CppCMS applications to > run. (Running CppCMS 0.0.4 on Ubuntu 8.10 x86) > Any requests get a HTTP 500 error. Have tried lighttpd and > apache - the only difference is that lighttpd gives some > debugging output (shown below). > > Here is the output when running the "hello world" > example: > > $ cppcms_run hello.fcgi -c config.txt > Web Server Host:127.0.0.1 > Web Server Port:8080 > Document > Root:/<removed>/cppcms/examples-0.0.4/hello_world > Script:/hello.fcgi > Api:fastcgi > Socket:/tmp/hello-world.sock > Server:/usr/sbin/lighttpd -f > /<removed>/cppcms/examples-0.0.4/hello_world/cppcms_rundir/lighty.conf > Starting Application Server:/hello.fcgi > X-Powered-By: cppcms/0.0.4 > Content-Length: 53 > Content-Type: text/html > > <html> > <body> > <h1>Hello World</h1> > </body> > </html> > Application Server PID:11871 > Starting Web Server > 2009-02-22 20:41:33: (log.c.75) server started > Web Server PID:11874 > > ------------------------------------ > - Press Any Key To Stop The Server - > ------------------------------------ > 2009-02-22 20:41:42: (mod_fastcgi.c.1761) connect failed: > No such file or directory on unix:/tmp/hello-world.sock > 2009-02-22 20:41:42: (mod_fastcgi.c.2930) backend died; > we'll disable it for 5 seconds and send the request to > another backend instead: reconnects: 0 load: 1 > 2009-02-22 20:41:48: (mod_fastcgi.c.2743) fcgi-server > re-enabled: unix:/tmp/hello-world.sock > > The last few lines repeat each time a request is made from > the browser. From my investigation it seems that the > "app.execute()" line is falling through, > generating one batch of output and then the application > quits. > > Any ideas? > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, > San Francisco, CA > -OSBC tackles the biggest issue in open source: Open > Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open > source participation > -Receive a $600 discount off the registration fee with the > source code: SFAD > http://p.sf.net/sfu/XcvMzF8H_______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
|
From: stuart b. <stu...@ho...> - 2009-02-22 20:54:32
|
Hi, I am having problems getting any CppCMS applications to run. (Running CppCMS 0.0.4 on Ubuntu 8.10 x86) Any requests get a HTTP 500 error. Have tried lighttpd and apache - the only difference is that lighttpd gives some debugging output (shown below). Here is the output when running the "hello world" example: $ cppcms_run hello.fcgi -c config.txt Web Server Host:127.0.0.1 Web Server Port:8080 Document Root:/<removed>/cppcms/examples-0.0.4/hello_world Script:/hello.fcgi Api:fastcgi Socket:/tmp/hello-world.sock Server:/usr/sbin/lighttpd -f /<removed>/cppcms/examples-0.0.4/hello_world/cppcms_rundir/lighty.conf Starting Application Server:/hello.fcgi X-Powered-By: cppcms/0.0.4 Content-Length: 53 Content-Type: text/html <html> <body> <h1>Hello World</h1> </body> </html> Application Server PID:11871 Starting Web Server 2009-02-22 20:41:33: (log.c.75) server started Web Server PID:11874 ------------------------------------ - Press Any Key To Stop The Server - ------------------------------------ 2009-02-22 20:41:42: (mod_fastcgi.c.1761) connect failed: No such file or directory on unix:/tmp/hello-world.sock 2009-02-22 20:41:42: (mod_fastcgi.c.2930) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 1 2009-02-22 20:41:48: (mod_fastcgi.c.2743) fcgi-server re-enabled: unix:/tmp/hello-world.sock The last few lines repeat each time a request is made from the browser. From my investigation it seems that the "app.execute()" line is falling through, generating one batch of output and then the application quits. Any ideas? |
|
From: Artyom <art...@ya...> - 2009-02-21 07:58:46
|
Version 0.0.4 of CppCMS had released.
It includes optimizations required for using it in embedded systems.
Normal Embedded Build
- Caching is completely removed. Small memory footprint
is very important for embedded system thus, caching
stuff in memory is quite useless.
- Zlib compression are removed -- it removes dependency on
boost::iostreams, zlib and bzip2 libraries.
- Removed mod-prefork.
- Removed dynamic templates loading --- this feature requires export of
symbols to binary and increases its size in order to make RTTI work.
Thus, all templates should be statically compiled into the binary.
Embedded CGI Mode
- FastCGI and SCGI APIs are removed
- Mod-thread and mod process are removed including
all thread pool facilities
- Changes in files based session backend to work
properly with CGI mode including garbage collection
(sessions that had time-out).
Downloads are avialable from Sf Project Page.
Artyom
|
|
From: Artyom <art...@ya...> - 2009-02-14 22:49:18
|
Hello, I'm looking for someone who interested in using of CppCMS in embedded environment and has an access to ARM hardware for testing. For more details see: http://art-blog.no-ip.info/cppcms/blog/post/40 Thanks, Artyom |
|
From: Artyom <art...@ya...> - 2009-02-09 07:50:32
|
Release Announcement
====================
CppCMS 0.0.3 Released
---------------------
Changelog:
- Forms API cleanup.
- Fixed configuration with latest autoconf/automake
- gcc 4.3 compilation fixes
- Added an option to disable gzip compression
- Changed manual output control to flush all headers on request
- Fixed incorrect use of readdir_r with dirent on Solaris
that caused crash
- Added an option for manual output stream control
- Changed cppcms_make_key now written in C instead of unportable bash/od
- Fixed -- widgets are default constructable
- Added help to templates compiler, BSD bugfix
- Now non-default session timeout type/limit is preserved withing session.
- Added "notriggers" to store cache functions as well
- Fixed incorrect triggers behavior in cache_iface.
DbiXX 0.0.3 Released
--------------------
Changelog:
- Fixed compilation issues with gcc-4,3
WikiPP 0.0.2 Released
---------------------
Changelog:
- Updates according to API changes in CppCMS 0.0.3
Examples 0.0.3 Released
-----------------------
No changes, but package location on sourceforge release system
had changed
Documentation
-------------
User Documentation is complete. It covers most of aspects required
for developing with CppCMS.
Still, documentation of internals is missing.
|