cppcms-users Mailing List for CppCMS C++ Web Framework (Page 109)
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: Vizcayno T. <viz...@gm...> - 2011-08-20 22:02:12
|
Hello: I show you the main part of a C++ which loads a 540MB delimited ("|") text file into an SQLite3 db using last cppDB (trunk 1875): int main () { Timer t; cout << t.ShowStart() << endl; ifstream input("in1.txt"); const size_t size = 512 * 1024; char buffer[size]; string* f = new string[10]; cppdb::session sql("sqlite3:db=db.db; Page Size=65536; Cache Size=65536; Synchronous=Off; Journal Mode=Off;"); sql << "DROP TABLE IF EXISTS ttb" << cppdb::exec; sql << "CREATE TABLE ttb (alm varchar(4), alm2 varchar(4), \ mat varchar(18), ser varchar(20), fac varchar(18), almttb varchar(10), \ cant integer, sts varchar(1), ser_2_20 varchar(20), rowid_sap integer, \ stsmat varchar);" << cppdb::exec; cppdb::transaction guard(sql); cppdb::statement stat; stat = sql << "INSERT INTO ttb(alm,alm2,mat,ser,fac,almttb,cant,sts,ser_2_20,rowid_sap,stsmat) " "VALUES(?,?,?,?,?,?,?,?,?,?,?)"; int cont = 0; int regLei = 0; while (input) // Read a text file with fields separated by "|" { input.read(buffer, size); size_t readBytes = input.gcount(); for (size_t i = 0; i < readBytes; i++) { if (*(buffer+i) == '\n') // || *(buffer+i) == '\r') { if (regLei++ > 0) // Don't save first line, it's header { stat.reset(); stat.bind(f[0]); stat.bind(f[1]); stat.bind(f[2]); stat.bind(f[3]); stat.bind(f[4]); stat.bind(f[5]); stat.bind(f[7]); stat.bind_null(); stat.bind_null(); stat.bind_null(); stat.bind(f[9]); stat.exec(); } for (int j=0;j<10;f[j++]=""); // Reset string arrays of fields cont = 0; } else if (*(buffer+i) != '|') f[cont] += *(buffer+i); // Build each field char by char else cont++; // Build data on next string of the array f } } guard.commit(); t.Stop(); cout << t.ShowEnd() << endl; cout << "Executed in: " << t.ElapsedSeconds() << " seconds." << endl; input.close(); return 0; } Please, be patient with my C++ style. There is a part of the code that is trying to read the file as fast as possible (using a buffer), but I can't get to save the data into Sqlite at the same speed that I read. In the code you can see and attemp to accelerate the writing but, I am not sure if it's working because the journal file continues generating data, I am sure I am doing something wrong: cppdb::session sql("sqite3:db=db.db; Page Size=65536; Cache Size=65536; Synchronous=Off; Journal Mode=Off;"); My questions are: 1) What is bad in the cppdb::session syntax I wrote? 2) Checking the code, can you find a way to speed-up the writing of the data into the SQLite DB (I am sure that the reading is very fast), the command compilation in VS2010 is: cl /EHsc /Ox /Ob2 /Oi for both, the cppDB and my C++ program; i'm under windows 7 and program generation is for 32 bits. 3) I also wrote a program in C# and it is always 10-15 seconds faster than my C++ and, as a curiosity, the file size of the database running C# is 386MB and after running the C++ the result size is 408MB (one possible reason because C++ is slower than my C# program); the records and fields generated are the same in both databases and I'm breaking my head trying to figure out the reason of this difference in sizes; may be you know possible reasons? Many thanks for your attention. |
From: Artyom B. <art...@ya...> - 2011-08-20 19:48:02
|
Hello, First of all you have quite tide ulimits. With this options I've played a little with service.worker_threads and with a value above 100 it failed to create threads. 200MB of total memory and 215 max user process (basically threads and so on) By default CppCMS starts 5*#CPUs so if you have some 8 core machine or something like that it would start 40 threads. You may change this options (service.worker_threads) also I'd suggest to play with ulimits and the option I've mentioned and see what exactly makes the problem. See: http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#service.worker_threads >6.The following tests FAILED: > 13 - status_test (Failed) > 14 - async_status_test (Failed) > 15 - form_test (Failed) > 16 - cookie_test (Failed) > 17 - internal_forwarder_test (Failed) > 18 - forwarder_test (Failed) > 19 - jsonrpc_test (Failed) > 52 - test_backtrace_backtrace (Failed) >Errors while running CTest Send the log: Testing/Temporary/LastTest.log, because it is quite starange that these tests failed. Have you disabled some modules? Bottom line: Take a look on the ulimits they seems to be either too tight or somebody did "too good" job in hardening the OS you are working on. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ |
From: Abhishek K. <abh...@gm...> - 2011-08-20 16:45:22
|
Hello Artyom, based on your requirements about my system, I have the following: 1. My cat /proc/version say: Linux version 2.6.32-42.1.BHsmp (ke...@bl...) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Tue Jun 28 17:06:41 MDT 2011 2. ulimit -a says: core file size (blocks, -c) 0 data seg size (kbytes, -d) 204800 scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 257876 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) 204800 open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 8192 cpu time (seconds, -t) 3600 max user processes (-u) 115 virtual memory (kbytes, -v) 2097152 file locks (-x) unlimited 3.its x86_64 platform 4.cppcms version in 0.99.9 5.I use gcc version 4.1.2 20080704 6.The following tests FAILED: 13 - status_test (Failed) 14 - async_status_test (Failed) 15 - form_test (Failed) 16 - cookie_test (Failed) 17 - internal_forwarder_test (Failed) 18 - forwarder_test (Failed) 19 - jsonrpc_test (Failed) 52 - test_backtrace_backtrace (Failed) Errors while running CTest gmake: *** [test] Error 8 7. I am not able to know the exact location where to place the catch block, would just say: running ./mb -c config.js outputs: booster::thread: failed to create a thread and after applying the patch it now outputs: booster::thread: failed to create a thread:Resource temporarily unavailable. Let me know I could help in this any more, I am able to go good in windows with cppcms, may be some bad configuration on server making this problem :( Best Regards, |
From: Artyom B. <art...@ya...> - 2011-08-20 10:18:22
|
>Subject: [Cppcms-users] How to prevent server goes down when crash? > > >I used Apache to configure an external application server with fastcgi mode in Windows. > > > Fastcgi is process isolation, so I try to make my > application based on cppcms crash to see how will happen > to server, but it went down when crash happen. How to prevent > this happen? Do I need to do some configuration to enable multi thread? > > To be honest I don't understand the question? How crash of cppcms programs crashes the web server? CppCMS runs different process, maximum you should get 500 HTTP Error. Another thing, on POSIX platforms you can set "service.worker_processes" to 1 and it would allow CppCMS to control its own lifetime and restart the process when it goes down automatically. http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#service.worker_processes Artyom >Thanks. >------------------------------------------------------------------------------ >Get a FREE DOWNLOAD! and learn more about uberSVN rich system, >user administration capabilities and model configuration. Take >the hassle out of deploying and managing Subversion and the >tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2011-08-19 12:22:53
|
----- Original Message ----- > From: Abhishek Kaushik <abh...@gm...> > To: cpp...@li... > Cc: > Sent: Friday, August 19, 2011 8:28 AM > Subject: [Cppcms-users] "booster::thread: failed to create a thread" error while running application > > Hi, > > > I am facing this error on my linux server which is running CentOS. > > When I try to run any of the example applications, be it hello_world, > message_board, the compilation happens correctly without any errors, > > but when I try to run the application, example for message board: > ./mb -c config.js > > I get the following error: > "booster::thread: failed to create a thread" > > and the Application doesn't starts. > Let me know if anymore information I can provide on it, and this is the only > one- > line error I get while trying to run the application. Hello, This is very strange as it fails to create a new thread which should not happen, is there any chances that you have to few resources or you have a problems with ulimit? Provide an output of ulimit -a Have you changed service.worker_threads and/or service.worker_processes options in configuration files? To what value? To investigate the problem more: Please apply these changes: Index: pthread.cpp =================================================================== --- pthread.cpp (revision 1913) +++ pthread.cpp (working copy) @@ -65,9 +65,10 @@ } else { // failed to create - delete the object + int err = errno; delete ptr; ptr = 0; - throw runtime_error("booster::thread: failed to create a thread"); + throw runtime_error(std::string("booster::thread: failed to create a thread:") + strerror(err)); } } thread::~thread() On the file booster/lib/thread/src/pthread.cpp And try to run and see what is the reason of the error. Also: 1. Please tell me what version of CentOS are you running? (provide also uname -a) 2. Current limits ulimit -a 3. What platform (x86, x86_64, arm, PPC etc). 4. What version of CppCMS do you use? 5. What compiler and what version of compiler do you use. 6. Please run make test and see if tests are pass or fail and what exactly fails (provide a log) 7. Please provide a backtrace of the exception. At the topmost level where you catch the exception: catch(std::exception const &e) { std::cerr<<"Caught exception: "<<e.what()<<std::endl; std::cerr<<booster::trace(e) << std::endl; return 1; } It would print a full stack trace of where the exception had occurred. (You also need to add) #include <booster/backtrace.h> > Please help. > > Uptil now, I have been doing all my compilations on windows only, as I expected > that compilation won't be difficult on linux box as it is on windows, and > now I > decided to move on production linux box facing this error. > Actually Linux is the primary development platform so I'd rather expect the other way, it is much harder to configure/run code on Windows then on Linux. > Also let me know if this could be an issue in server configurations. > Maybe, take a notes on ulimit and other resources. > Thanks > Best, Artyom |
From: Abhishek K. <abh...@gm...> - 2011-08-19 05:28:55
|
Hi, I am facing this error on my linux server which is running CentOS. When I try to run any of the example applications, be it hello_world, message_board, the compilation happens correctly without any errors, but when I try to run the application, example for message board: ./mb -c config.js I get the following error: "booster::thread: failed to create a thread" and the Application doesn't starts. Let me know if anymore information I can provide on it, and this is the only one- line error I get while trying to run the application. Please help. Uptil now, I have been doing all my compilations on windows only, as I expected that compilation won't be difficult on linux box as it is on windows, and now I decided to move on production linux box facing this error. Also let me know if this could be an issue in server configurations. Thanks |
From: 李明 <lim...@gm...> - 2011-08-19 02:12:01
|
I used Apache to configure an external application server with fastcgi mode in Windows. Fastcgi is process isolation, so I try to make my application based on cppcms crash to see how will happen to server, but it went down when crash happen. How to prevent this happen? Do I need to do some configuration to enable multi thread? Thanks. |
From: 李明 <lim...@gm...> - 2011-08-19 02:02:16
|
Nice job! On Thu, Aug 18, 2011 at 2:46 PM, augustin <aug...@ov...>wrote: > On Wednesday 17 August 2011 09:51:07 pm Artyom Beilis wrote: > > If you don't have to don't use IIS! > > (as don't use Windows in general) > > > +1 > ;) > > 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/ > > > > > > > > > > > > > . > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: augustin <aug...@ov...> - 2011-08-18 06:47:12
|
On Wednesday 17 August 2011 09:51:07 pm Artyom Beilis wrote: > If you don't have to don't use IIS! > (as don't use Windows in general) +1 ;) 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: Artyom B. <art...@ya...> - 2011-08-17 13:51:17
|
Hello All, It is not the first time I'm being asked about running CppCMS with IIS... So I had decided to check it deeply. -------------------------------------------------- Bottom line: I was able to run CppCMS application with IIS using SCGI after a small "workaround" that is currently exists in svn trunk of CppCMS. -------------------------------------------------- Before you try to use IIS in front of CppCMS I'd recommend you to chose another web server that is more friendly to web developers who use web server independent API like FastCGI. Best Approach: -------------- Configure CppCMS with some other good web server like Apache or Nginx and forward requests from IIS to it. FastCGI Connectivity ===================== FastCGI - don't use it, it was designed to run PHP and nothing more. IIS's FastCGI implementation is broken and does not support multi-threaded FastCGI applications. http://forums.iis.net/t/1155551.aspx It also does not provide an option to configure specific port making it even impossible to use CppCMS application with IIS. SCGI Connectivity ===================== Using with ISAPI SCGI. --------------------- There is SCGI ISAPI extension that allows to use external SCGI applications isapi_scgi http://woof.magicsplat.com/isapi_scgi/home However it has two big limitations: 1. It does not support real CGI response from the client and expects HTTP response. Currently in SVN trunk it is possible to set an option `service.generate_http_headers` to `true`. This option tells CppCMS to generate HTTP rather then CGI response headers. Using this option it was possible to run successfully CppCMS application with IIS. 2. It supports only predefined set of HTTP headers so if you will need to get custom headers from for example AJAX responses you'll need to alter `isapi_scgi` sources. So you'll need configuration like: { "service" : { "api" : "scgi", "ip" : "127.0.0.1", "port" : 9999, "generate_http_headers" : true } } Troubleshooting ISAPI SCGI extension. -------------------------------------- There are two problems: - Currently the project provides only 32 bit builds of this dll, if you need 64 bit or you'll need to build it manually. - If you need support of custom HTTP headers you'll have to add them in scgi.c. - In order to build it with gcc you need to apply following changes: --- scgi_old.h 2011-08-17 10:48:32.109547500 +0300 +++ scgi.h 2011-08-17 10:50:26.184022000 +0300 @@ -37,3 +37,3 @@ */ -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__GNUC__) # define COPY_MEMORY(d, s, n) memcpy((d), (s), (n)) @@ -48,3 +48,3 @@ ZLINK_CREATE_TYPEDEFS(context_t); -typedef struct context { +struct context { OVERLAPPED ovl; /* Must be first structure */ @@ -81,3 +81,3 @@ buffer_t buf; /* Data buffer */ -} context_t; +}; And the you'll be able to build the DLL as: gcc -O2 -shared buffer.c scgi.c logger.c -lws2_32 -o isapi_scgi.dll Bottom line.... If you don't have to don't use IIS! (as don't use Windows in general) Artyom CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ |
From: Artyom B. <art...@ya...> - 2011-08-16 06:29:31
|
> >Sounds reasonable. Rather than maintain three sql files, I'm thinking about creating a "setup" page. After someone sets up the blog they can run the setup page and it will setup / populate the db. The "update" logic can be placed in this same page. > Actually there is a setup page but it assumes that DB already has a ready scheme. It is possible to do something like this as well. > (i.e. chooses the db, etc) DB (connection string) should be configured in config.js file Artyom |
From: Artyom B. <art...@ya...> - 2011-08-16 06:27:20
|
> >T he cppcms::json::value method > > bool value::is_null() const > { > return d->value().which()==json::is_undefined; > } > > should be > > bool value::is_null() const > { > return d->value().which()==json::is_null; > } > > Note json::is_null instead of json::is_undefined. > > Good bye. > > Thanks, Fixed in trunk, Artyom |
From: Daniel V. <chi...@gm...> - 2011-08-15 20:55:37
|
The cppcms::json::value method bool value::is_null() const { return d->value().which()==json::is_undefined; } should be bool value::is_null() const { return d->value().which()==json::is_null; } Note json::is_null instead of json::is_undefined. Good bye. |
From: David E. <dav...@gm...> - 2011-08-15 16:23:47
|
Sounds reasonable. Rather than maintain three sql files, I'm thinking about creating a "setup" page. After someone sets up the blog (i.e. chooses the db, etc) they can run the setup page and it will setup / populate the db. The "update" logic can be placed in this same page. Does that sound like it will work? Or do the databases differ too much? On Mon, Aug 15, 2011 at 3:50 AM, Artyom Beilis <art...@ya...> wrote: > Hi, > > I can suggest you to do following: > > Database Schema > =============== > > - DB changes: 3 places mysql.sql, sqlite.sql and postgresql.sql > > - Add role DB column: > > role varchar(16) not null with default 'guest' > > - move DB version from 3 to 4. > > - Create an update script in the sql directory named sql/upgrade-3-to-4.sql > > Such that all roles set to 'admin' > > - Update DB version from 3 to 4 in apps/dbversion. > - Add an automatic upgrade script similar > > bool upgrade_2_3(cppdb::session &sql) > > and update > > bool upgrade(std::string const ¤t_ver,cppdb::session &sql) > > > Administration > ============== > > I'd define 4 roles with permissions: > > - admin - add users, remove users, edit any posts, publish and unpublish > any posts, > edit blog options, edit categories, write, publish and un-publish > pages > - editor - edit any posts, publish and unpublish any posts, edit > categories, > write, publish and un-publish pages, add and remove guest users. > - writer - edit and view his own posts, publish and unpublish hist own > posts, write pages > (but not publish them) > - guest - edit his own unpublished posts, but without ability to publish, > unpublish > or edit published posts. > > Now add permission checks according to the role > on all levels about what is displayed and what is > allowed. > > New Administration Pages > ======================== > > - Add a new page for users editing with an option to add, modify > and delete users. > - Add a page that allows a user to change his password. > > Would you take this on you? > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > > >________________________________ > >From: David Elrom <dav...@gm...> > >To: cpp...@li...; Artyom Beilis < > art...@ya...> > >Sent: Sunday, August 14, 2011 11:00 PM > >Subject: Re: [Cppcms-users] plugins for cppcms-blog > > > > > >So initially I'm going to implement the following features: > >*user groups > >*many-to-many relation between users and groups > > > >Then an ACL schema needs to be designed. I'm not too sure about this one, > I suppose some things of interest would be per category access control (read > / write etc) where rights can be granted on a per user or per group basis. > (Plus the distinction between submitting an article, and being able to > change another user's article (i.e. be a mod)) > > > > > >One more "special" right we would need is admin. > > > > > >Your thoughts? > > > > > >-elrom > > > > > >On Fri, Aug 12, 2011 at 11:28 AM, David Elrom <dav...@gm...> > wrote: > > > >Im very much interested in contributing. I want to get an idea for what > people want. User management and user centric features are something that I > need and something people would probably want. > >>On Aug 12, 2011 11:16 AM, "Artyom Beilis" <art...@ya...> wrote: > >>> > >>> > >>>> > >>>>I just compiled the new cppcms-blog (props on the perfectly > >>> > >>>> working cmake files, i can never get cmake to do what i want) > >>>> and was about to start making some changes to the code (I want > >>>> the ability to have per user views, i.e. certain pages and > >>>> entries are only visible to certain users, etc). > >>> > >>>> It occurred to me that this might be better suited as some sort of > plugin. > >>>> > >>> > >>> As blogging system CppCMS's blog has very weak user management > >>> system. It may and should be improved. > >>> > >>> > >>> Currently I don't have much time and it is not the top > >>> priority right now, but if you wish to work on it I'd be > >>> glad to receive any help. > >>> > >>> > >>>> > >>>> So.. Do you think there would be benefit / interest > >>>> in implementing some sort of plugin / dynamically loadable > >>>> module framework for cppcms-blog? > >>>> > >>> > >>> Plug-in system could be nice but currently Cpp Blog misses > >>> many other essential features that should be in the core > >>> of the blogging system. > >>> > >>> > >>>> > >>>>It would be very nice if we could make cppcms-blog of the > >>>> same caliber as say, wordpress / drupal (from an > >>>> extensiblity point of view, not from a bloat pov). > >>>> > >>> > >>> Yeah it would be nice... Would you do it :-) ? > >>> > >>> > >>> Artyom > >>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > >>> user administration capabilities and model configuration. Take > >>> the hassle out of deploying and managing Subversion and the > >>> tools developers use with it. > >>> http://p.sf.net/sfu/wandisco-dev2dev > >>> _______________________________________________ > >>> Cppcms-users mailing list > >>> Cpp...@li... > >>> https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > > > > >------------------------------------------------------------------------------ > >FREE DOWNLOAD - uberSVN with Social Coding for Subversion. > >Subversion made easy with a complete admin console. Easy > >to use, easy to manage, easy to install, easy to extend. > >Get a Free download of the new open ALM Subversion platform now. > >http://p.sf.net/sfu/wandisco-dev2dev > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2011-08-15 07:50:17
|
Hi, I can suggest you to do following: Database Schema =============== - DB changes: 3 places mysql.sql, sqlite.sql and postgresql.sql - Add role DB column: role varchar(16) not null with default 'guest' - move DB version from 3 to 4. - Create an update script in the sql directory named sql/upgrade-3-to-4.sql Such that all roles set to 'admin' - Update DB version from 3 to 4 in apps/dbversion. - Add an automatic upgrade script similar bool upgrade_2_3(cppdb::session &sql) and update bool upgrade(std::string const ¤t_ver,cppdb::session &sql) Administration ============== I'd define 4 roles with permissions: - admin - add users, remove users, edit any posts, publish and unpublish any posts, edit blog options, edit categories, write, publish and un-publish pages - editor - edit any posts, publish and unpublish any posts, edit categories, write, publish and un-publish pages, add and remove guest users. - writer - edit and view his own posts, publish and unpublish hist own posts, write pages (but not publish them) - guest - edit his own unpublished posts, but without ability to publish, unpublish or edit published posts. Now add permission checks according to the role on all levels about what is displayed and what is allowed. New Administration Pages ======================== - Add a new page for users editing with an option to add, modify and delete users. - Add a page that allows a user to change his password. Would you take this on you? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: David Elrom <dav...@gm...> >To: cpp...@li...; Artyom Beilis <art...@ya...> >Sent: Sunday, August 14, 2011 11:00 PM >Subject: Re: [Cppcms-users] plugins for cppcms-blog > > >So initially I'm going to implement the following features: >*user groups >*many-to-many relation between users and groups > >Then an ACL schema needs to be designed. I'm not too sure about this one, I suppose some things of interest would be per category access control (read / write etc) where rights can be granted on a per user or per group basis. (Plus the distinction between submitting an article, and being able to change another user's article (i.e. be a mod)) > > >One more "special" right we would need is admin. > > >Your thoughts? > > >-elrom > > >On Fri, Aug 12, 2011 at 11:28 AM, David Elrom <dav...@gm...> wrote: > >Im very much interested in contributing. I want to get an idea for what people want. User management and user centric features are something that I need and something people would probably want. >>On Aug 12, 2011 11:16 AM, "Artyom Beilis" <art...@ya...> wrote: >>> >>> >>>> >>>>I just compiled the new cppcms-blog (props on the perfectly >>> >>>> working cmake files, i can never get cmake to do what i want) >>>> and was about to start making some changes to the code (I want >>>> the ability to have per user views, i.e. certain pages and >>>> entries are only visible to certain users, etc). >>> >>>> It occurred to me that this might be better suited as some sort of plugin. >>>> >>> >>> As blogging system CppCMS's blog has very weak user management >>> system. It may and should be improved. >>> >>> >>> Currently I don't have much time and it is not the top >>> priority right now, but if you wish to work on it I'd be >>> glad to receive any help. >>> >>> >>>> >>>> So.. Do you think there would be benefit / interest >>>> in implementing some sort of plugin / dynamically loadable >>>> module framework for cppcms-blog? >>>> >>> >>> Plug-in system could be nice but currently Cpp Blog misses >>> many other essential features that should be in the core >>> of the blogging system. >>> >>> >>>> >>>>It would be very nice if we could make cppcms-blog of the >>>> same caliber as say, wordpress / drupal (from an >>>> extensiblity point of view, not from a bloat pov). >>>> >>> >>> Yeah it would be nice... Would you do it :-) ? >>> >>> >>> Artyom >>> >>> >>> ------------------------------------------------------------------------------ >>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, >>> user administration capabilities and model configuration. Take >>> the hassle out of deploying and managing Subversion and the >>> tools developers use with it. >>> http://p.sf.net/sfu/wandisco-dev2dev >>> _______________________________________________ >>> Cppcms-users mailing list >>> Cpp...@li... >>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > >------------------------------------------------------------------------------ >FREE DOWNLOAD - uberSVN with Social Coding for Subversion. >Subversion made easy with a complete admin console. Easy >to use, easy to manage, easy to install, easy to extend. >Get a Free download of the new open ALM Subversion platform now. >http://p.sf.net/sfu/wandisco-dev2dev >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: David E. <dav...@gm...> - 2011-08-14 20:01:39
|
So initially I'm going to implement the following features: *user groups *many-to-many relation between users and groups Then an ACL schema needs to be designed. I'm not too sure about this one, I suppose some things of interest would be per category access control (read / write etc) where rights can be granted on a per user or per group basis. (Plus the distinction between submitting an article, and being able to change another user's article (i.e. be a mod)) One more "special" right we would need is admin. Your thoughts? -elrom On Fri, Aug 12, 2011 at 11:28 AM, David Elrom <dav...@gm...> wrote: > Im very much interested in contributing. I want to get an idea for what > people want. User management and user centric features are something that I > need and something people would probably want. > On Aug 12, 2011 11:16 AM, "Artyom Beilis" <art...@ya...> wrote: > > > > > >> > >>I just compiled the new cppcms-blog (props on the perfectly > > > >> working cmake files, i can never get cmake to do what i want) > >> and was about to start making some changes to the code (I want > >> the ability to have per user views, i.e. certain pages and > >> entries are only visible to certain users, etc). > > > >> It occurred to me that this might be better suited as some sort of > plugin. > >> > > > > As blogging system CppCMS's blog has very weak user management > > system. It may and should be improved. > > > > > > Currently I don't have much time and it is not the top > > priority right now, but if you wish to work on it I'd be > > glad to receive any help. > > > > > >> > >> So.. Do you think there would be benefit / interest > >> in implementing some sort of plugin / dynamically loadable > >> module framework for cppcms-blog? > >> > > > > Plug-in system could be nice but currently Cpp Blog misses > > many other essential features that should be in the core > > of the blogging system. > > > > > >> > >>It would be very nice if we could make cppcms-blog of the > >> same caliber as say, wordpress / drupal (from an > >> extensiblity point of view, not from a bloat pov). > >> > > > > Yeah it would be nice... Would you do it :-) ? > > > > > > Artyom > > > > > > > ------------------------------------------------------------------------------ > > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > > user administration capabilities and model configuration. Take > > the hassle out of deploying and managing Subversion and the > > tools developers use with it. > > http://p.sf.net/sfu/wandisco-dev2dev > > _______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Paradigm S. <pd...@gm...> - 2011-08-13 09:38:43
|
The command line I use is ./hello -c config.js However, I think I see the reason now since my CppCMS configuration is as follows from the examples directory: { "service" : { "api" : "http", "port" : 8080 }, "http" : { "script" : "/hello" } } The above means that it uses the built in http server I assume. I used the lighttpd instructions below but I should follow the instructions below for the CppCMS config.js file as well. Sorry for the confusion. Lighttpd, FastCGI, Start by Web Server You should enable mod-fastcgi and then use this Configuration file: <http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_web_server_config#><http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_web_server_config#> 1. fastcgi.server = ( 2. ## The script name of the application 3. "/hello" => (( 4. ## Command line to run 5. "bin-path" => "/opt/app/bin/hello -c /opt/app/etc/config.js", 6. "socket" => "/tmp/hello-fcgi-socket", 7. ## Important - only one process should start 8. "max-procs" => 1, 9. "check-local" => "disable" 10. )) 11. ) fastcgi.server = ( ## The script name of the application "/hello" => (( ## Command line to run "bin-path" => "/opt/app/bin/hello -c /opt/app/etc/config.js", "socket" => "/tmp/hello-fcgi-socket", ## Important - only one process should start "max-procs" => 1, "check-local" => "disable" )) ) CppCMS configuration: 1. { 2. "service" : { 3. "api" : "fastcgi", 4. "socket" : "stdin" // use server's socket 5. } 6. } On 08/13/2011 12:26 PM, augustin wrote: > Hello Paradigm, > > On Saturday 13 August 2011 05:03:15 pm Paradigm Shift wrote: >> I'm wondering if I'm running by default using cppcms debug server? How >> can I tell? > > What command line do you use to start the "hello" tutorial application? > In the docs you mention, there is a difference between "start by the web > server" and "independent start". That also makes a difference. Which procedure > do you use? > http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_web_server_config > > Augustin. > > |
From: augustin <aug...@ov...> - 2011-08-13 09:31:18
|
On Wednesday 27 October 2010 05:55:14 pm Artyom wrote: > > > Is it possible for you to adjust the mailing list > > > configuration? > > > > > In my mail client (Kmail), the author of all the > > > emails is "cppcms- > > > us...@li...". > > It seems to me KMail issue. It displays Reply-to rather then > From header. > By default GNU Mailman sets Reply-to the author and not to the > list and it makes it very inconvinient to reply to list that finally > many users accidentially do not notice and reply to the specific > user rather then to the mailing list. > > I think you need to check your KMail settings as in my case (Yahoo mail) > it displays "From" column correctly. You are right, Artyom (as always ;) )! I know this thread is pretty old, but I didn't understand why mails from this list behaved differently than mails from all the other mailing lists (inc. from GNU Mailman). And then recently, I found a manual setting to properly show the sender's name. I never had to use that. Weird but now it works! :) Thanks, 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: augustin <aug...@ov...> - 2011-08-13 09:25:50
|
Hello Paradigm, On Saturday 13 August 2011 05:03:15 pm Paradigm Shift wrote: > I'm wondering if I'm running by default using cppcms debug server? How > can I tell? What command line do you use to start the "hello" tutorial application? In the docs you mention, there is a difference between "start by the web server" and "independent start". That also makes a difference. Which procedure do you use? http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_web_server_config 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: Paradigm S. <pd...@gm...> - 2011-08-13 09:03:25
|
Hi everyone, I followed the instructions at: http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_hello and http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_tut_web_server_config for lighttpd. Everything works but I don't understand why when I stop lighttpd with the command: sudo /etc/init.d/lighttpd stop everything still works! Apache server is also not up. I'm wondering if I'm running by default using cppcms debug server? How can I tell? Thanks in advance |
From: Artyom B. <art...@ya...> - 2011-08-12 17:23:55
|
> > >We have a old CGI application and now want to refactor the code with cppcms framework. > > > But our application configured with IIS, and we don't want our > client change to another web server that might cause > inconsistent user experience. But I cannot figure out > how to configure IIS to host cppcms application. For example: > > >I'm in windows 7 with IIS 7.5 >Trying to run the an example with FastCgiModule. >Filled "hello.exe -c config.js" in Executable option. >But I can only get a blank webpage. > > >There is no document for how to configure IIS to use cppcms, could someone give me some hint? > Ok... IIS... Good question, unfortunately not great. ---------------------------------------------------- FastCGI: For the start IIS should support FastCGI over TCP/IP and this is seems to be what you need to use. But it seems that IIS's FastCGI implementation is quite limited and designed mostly to run PHP. There are two things you need to find how to configure: - How to configure TCP/IP port that IIS would connect CppCMS application with. - How to define that it should start one application instance or use external FastCGI server. Unfortunately I could not find this in documentation. http://www.iis.net/ConfigReference/system.webServer/fastCgi/application it seems that IIS assumes that FastCGI applications are kind of "script-runners" and it starts many instances of it and provides the connection mostly over named pipes. So I'm not really sure if FastCGI is relevant option for IIS. ------------------------------------------------------- Other option is to use IIS as reverse proxy and forward the HTTP connection the the CppCMS program. Of course you need to ensure that IIS sanitizes the requests and not passes them "as-is" to other web server. ------------------------------------------------------- The most reliable way would be to use Apache or other web server that support FastCGI properly as the frontend and run IIS as reverse Proxy. Artyom |
From: David E. <dav...@gm...> - 2011-08-12 15:28:54
|
Im very much interested in contributing. I want to get an idea for what people want. User management and user centric features are something that I need and something people would probably want. On Aug 12, 2011 11:16 AM, "Artyom Beilis" <art...@ya...> wrote: > > >> >>I just compiled the new cppcms-blog (props on the perfectly > >> working cmake files, i can never get cmake to do what i want) >> and was about to start making some changes to the code (I want >> the ability to have per user views, i.e. certain pages and >> entries are only visible to certain users, etc). > >> It occurred to me that this might be better suited as some sort of plugin. >> > > As blogging system CppCMS's blog has very weak user management > system. It may and should be improved. > > > Currently I don't have much time and it is not the top > priority right now, but if you wish to work on it I'd be > glad to receive any help. > > >> >> So.. Do you think there would be benefit / interest >> in implementing some sort of plugin / dynamically loadable >> module framework for cppcms-blog? >> > > Plug-in system could be nice but currently Cpp Blog misses > many other essential features that should be in the core > of the blogging system. > > >> >>It would be very nice if we could make cppcms-blog of the >> same caliber as say, wordpress / drupal (from an >> extensiblity point of view, not from a bloat pov). >> > > Yeah it would be nice... Would you do it :-) ? > > > Artyom > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. > http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Artyom B. <art...@ya...> - 2011-08-12 15:15:49
|
> >I just compiled the new cppcms-blog (props on the perfectly > working cmake files, i can never get cmake to do what i want) > and was about to start making some changes to the code (I want > the ability to have per user views, i.e. certain pages and > entries are only visible to certain users, etc). > It occurred to me that this might be better suited as some sort of plugin. > As blogging system CppCMS's blog has very weak user management system. It may and should be improved. Currently I don't have much time and it is not the top priority right now, but if you wish to work on it I'd be glad to receive any help. > > So.. Do you think there would be benefit / interest > in implementing some sort of plugin / dynamically loadable > module framework for cppcms-blog? > Plug-in system could be nice but currently Cpp Blog misses many other essential features that should be in the core of the blogging system. > >It would be very nice if we could make cppcms-blog of the > same caliber as say, wordpress / drupal (from an > extensiblity point of view, not from a bloat pov). > Yeah it would be nice... Would you do it :-) ? Artyom |
From: Artyom B. <art...@ya...> - 2011-08-12 15:10:31
|
Hello, Maybe SF is not perfect but is suits the project needs. I don't see any reason right now to switch to other system, also it would bring lots of maintenance headache. Artyom >________________________________ >From: David Elrom <dav...@gm...> >To: cpp...@li... >Sent: Thursday, August 11, 2011 6:56 PM >Subject: [Cppcms-users] launch pad + ubuntu > > >Erev tov Artyom, > > >How would you feel about a launchpad project for cppcms and cppcms-blog? This would allow "non programmers" to install / use the blog, and expose a much wider audience to cppcms.I believe the trick to getting greater adoption of cppcms is to get as much as possible into distros... > > >I also think launchpad has a much nicer interface than sourceforge (especially the bug tracking) > > > > >-elrom >------------------------------------------------------------------------------ >Get a FREE DOWNLOAD! and learn more about uberSVN rich system, >user administration capabilities and model configuration. Take >the hassle out of deploying and managing Subversion and the >tools developers use with it. >http://p.sf.net/sfu/wandisco-dev2dev >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: augustin <aug...@ov...> - 2011-08-12 03:32:47
|
Hello again, David, On Friday 12 August 2011 01:17:01 am David Elrom wrote: > So.. Do you think there would be benefit / interest in implementing some > sort of plugin / dynamically loadable module framework for cppcms-blog? See the cppcms roadmap on the wiki. Pluggable systems is planned for the next major release of cppcms (2.0?). However, the definitive, stable 1.0 release is not yet out. Blessings, 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/ . |