cppcms-users Mailing List for CppCMS C++ Web Framework (Page 78)
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: Shiv S. D. <shi...@gm...> - 2012-07-12 12:25:49
|
Then this means that I should start some new module like CppNoSQL. How difficult it can be to adapt such a module to CppCMS? On Thu, Jul 12, 2012 at 5:50 PM, Artyom Beilis <art...@ya...> wrote: > See, CppDB is an engine for relational databases - SQL, it is designed for > them. > > So I don't really see how can you fit stuff like MongoDB to such database > layer. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ________________________________ > From: Shiv Shankar Dayal <shi...@gm...> > To: cpp...@li... > Sent: Thursday, July 12, 2012 2:08 PM > Subject: [Cppcms-users] MongoDB and Hypertable support > > Hi, > > I want to add MongoDB and Hypertable (and possibly more noSQL DBs) > support to CppDB. What do you think is the best approach to achieve > this? > > -- > Best regards, > Shiv Shankar Dayal > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Best regards, Shiv Shankar Dayal |
From: Artyom B. <art...@ya...> - 2012-07-12 12:21:01
|
See, CppDB is an engine for relational databases - SQL, it is designed for them. So I don't really see how can you fit stuff like MongoDB to such database layer. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Shiv Shankar Dayal <shi...@gm...> >To: cpp...@li... >Sent: Thursday, July 12, 2012 2:08 PM >Subject: [Cppcms-users] MongoDB and Hypertable support > >Hi, > >I want to add MongoDB and Hypertable (and possibly more noSQL DBs) >support to CppDB. What do you think is the best approach to achieve >this? > >-- >Best regards, >Shiv Shankar Dayal > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Shiv S. D. <shi...@gm...> - 2012-07-12 11:09:01
|
Hi, I want to add MongoDB and Hypertable (and possibly more noSQL DBs) support to CppDB. What do you think is the best approach to achieve this? -- Best regards, Shiv Shankar Dayal |
From: Artyom B. <art...@ya...> - 2012-07-12 08:17:04
|
See, time parsing is done by ICU library. If it fails to parse such a date, it seems to be ICU limitation. Also make sure that correct locale installed into std::istringstream is; (If it is set globally should not be a problem) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: "ele...@ex..." <ele...@ex...> >To: Lee Elenbaas <lee...@gm...> >Cc: cpp...@li... >Sent: Monday, July 9, 2012 10:35 AM >Subject: Re: [Cppcms-users] strange date time parsing > >> it seems the the format of the date and for the parsing do not match in >> the >> second example >> > >Sorry that was just a typo. > >see, I fixed it below > >> it seems like that if i move %Y and the year to start like this: >> >> std::istringstream is("2012_01_01-05_30_45"); >> booster::locale::date_time dt; >> is >> booster::locale::as::ftime("%Y_%d_%m-%H_%M_%S") >> dt; > > >The problem is still the same. It seems like the time gets parsed properly >everytime but the date does not unless the date is in the format %Y_%d_%m >or %Y_%m-%d > >Petr > > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-07-12 08:15:14
|
Two points: 1. You should configure the script name as "/wikipp", see: http://cppcms.com/wikipp/en/page/cppcms_1x_config#http.script 2. You had not enabled internal file server :-) you need to serve static file as well. Point its document root to correct location such that, see: http://cppcms.com/wikipp/en/page/cppcms_1x_config#file_server Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Manveru <ma...@ma...> >To: cpp...@li... >Sent: Tuesday, July 10, 2012 10:07 PM >Subject: Re: [Cppcms-users] wikipp: all uri returns 302 on internal cppcms webserver > > >From: Artyom Beilis <artyomtnk@...> >>Subject: Re: wikipp: all uri returns 302 on internal cppcms webserver >>Newsgroups: gmane.comp.lib.cppcms.user >>Date: 2012-07-06 14:26:20 GMT (4 days, 4 hours and 38 minutes ago) >> >>1st please register to the mailing list >>2ns show the configuration file . >> >> Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Conne >>2012/7/5 Manveru <ma...@ma...> >> >> >> >> >>2012/6/10 Manveru <ma...@ma...> >> >>Hello, >>> >>>I've just build wikipp from svn trunk and it runs. I set up the internal web server for testing purpose. But after that Firefox complains about bad redirections. So, I tested what happen if I manually entered HTTP requests and the server always return 302. >>> >>> >>>Trying 127.0.0.1... >>>Connected to localhost. >>>Escape character is '^]'. >>>GET /wikipp/en/page/main HTTP/1.1 >>>Host: localhost >>> >>>HTTP/1.0 302 Found >>>Server: CppCMS-Embedded/1.1.0 >>>Connection: close >>>Content-Type: text/html; charset=utf-8 >>>Location: /wikipp/en/page/main >>>Status: 302 Found >>>X-Powered-By: CppCMS/1.1.0 >>> >>>Connection closed by foreign host. >>> >>>What shall I check to get it working? The log of the wikipp contains no errors: >>> >>> >>>2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main (http_api.cpp:251) >>>2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main (http_api.cpp:251) >>>2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main (http_api.cpp:251) >>>2012-06-10 13:24:20; cppcms_http, info: GET /wikipp/en/page/main (http_api.cpp:251) >>> >>>Whole log contains similar entries. I had once working wikipp, but based on old version of cppcms. >>> >>>Thanks in advance for any advice. >>>- >>> >> >>I turned on debug logging (as Marcell adviced), and still only thing I have in the log is: >>2012-07-05 22:47:36; cppcms_http, info: GET /wikipp/en/page/main (http_api.cpp:251) >> >>May this happen because I took sqlite db from my previous instance of some older wikipp? If yes how to properly migrate the database? >> >> >Ad.1. registered. >Ad.2. here you are: > ><see attachment> > >-- >Manveru >jabber: ma...@ma... > gg: 1624001 > http://www.manveru.pl > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-07-11 10:33:18
|
ohh missed: /usr/local/lib/mysql it should be -DCMAKE_LIBRARY_PATH=/usr/local/lib/mysql Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ ----- Original Message ----- > From: "ele...@ex..." <ele...@ex...> > To: Artyom Beilis <art...@ya...>; cpp...@li... > Cc: > Sent: Wednesday, July 11, 2012 1:04 PM > Subject: Re: [Cppcms-users] cppdb doesn't find mysqlclient on FreeBSD > >> Use -DCMAKE_INCLUDE_PATH=/usr/local/include >> -DCMAKE_LIBRARY_PATH=/usr/local/lib > > It finds libraries under /usr/local/lib just fine, but not mysqlclient > under /usr/local/lib/mysql > > Petr > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-07-11 10:05:00
|
> Use -DCMAKE_INCLUDE_PATH=/usr/local/include > -DCMAKE_LIBRARY_PATH=/usr/local/lib It finds libraries under /usr/local/lib just fine, but not mysqlclient under /usr/local/lib/mysql Petr |
From: Lee E. <lee...@gm...> - 2012-07-11 08:42:31
|
On Wed, Jul 11, 2012 at 11:26 AM, Julian Pietron <ju...@wh...>wrote: > Am 11.07.2012 09:41, schrieb Lee Elenbaas: > > > > On Wed, Jul 11, 2012 at 8:09 AM, <ele...@ex...> wrote: > >> > 1) Check available disk space after client sent Content-Length header, >> > decide whether to accept the request or not >> >> I suppose, the header could be forged, just like content-type. >> >> Even if it was not forged - the multi threaded nature of web apps (and > OS for that matter) means that an available space now might not be there > while the file uploads. > > Yes, even if in our special case one could be quite sure that space is > available even during upload, but I agree that this cannot be generalized. > Another possibility would be to just close connection as soon as writing to > disk fails, causing a Connection Reset in browser. This would be suboptimal > though in my opinion, as the user wouldn't know why upload failed. So here > it's best to stay with the current behaviour of silently accepting all data > from client. > > > > If in your special case you can be sure that the free space is not changing - place it in the limits of the file widget when you prepare the form to the user and be sure to get the an invalid file if they submit too large a file. > > 2) Notify the application code, that upload failed because of too less >> > disk space (maybe one could do this via the existing infrastructure of >> > invoking validate() on the upload form field's widget instance and >> > adding another method that would return any occurred errors) >> >> Please have a look at boost::filesystem::space_info as it should do the >> trick. >> >> boost::filesystem::space_info will not tell you if the upload failed - > the solution has to come from inside cppcms. The library needs to give some > status for the file upload widget that will say whether the file was > uploaded all right or not. > The set() member function should give you this indication but it does not > set to false if the upload fails to load completely > > > I think validate() should also fail, as a file upload which failed to > store parts of the file shouldn't be valid under any circumstances. And it > would be useful to have some kind of feedback from libcppcms WHY upload > failed, so there'd need to be another member method of file widgets that > can return an error code or message. > > Best regards, > Julian > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- -- lee Lee Elenbaas lee...@gm... |
From: Julian P. <ju...@wh...> - 2012-07-11 08:27:07
|
Am 11.07.2012 09:41, schrieb Lee Elenbaas: > > > On Wed, Jul 11, 2012 at 8:09 AM, <ele...@ex... > <mailto:ele...@ex...>> wrote: > > > 1) Check available disk space after client sent Content-Length > header, > > decide whether to accept the request or not > > I suppose, the header could be forged, just like content-type. > > Even if it was not forged - the multi threaded nature of web apps (and > OS for that matter) means that an available space now might not be > there while the file uploads. Yes, even if in our special case one could be quite sure that space is available even during upload, but I agree that this cannot be generalized. Another possibility would be to just close connection as soon as writing to disk fails, causing a Connection Reset in browser. This would be suboptimal though in my opinion, as the user wouldn't know why upload failed. So here it's best to stay with the current behaviour of silently accepting all data from client. > > > > 2) Notify the application code, that upload failed because of > too less > > disk space (maybe one could do this via the existing > infrastructure of > > invoking validate() on the upload form field's widget instance and > > adding another method that would return any occurred errors) > > Please have a look at boost::filesystem::space_info as it should > do the > trick. > > boost::filesystem::space_info will not tell you if the upload failed - > the solution has to come from inside cppcms. The library needs to give > some status for the file upload widget that will say whether the file > was uploaded all right or not. > The set() member function should give you this indication but it does > not set to false if the upload fails to load completely > > I think validate() should also fail, as a file upload which failed to store parts of the file shouldn't be valid under any circumstances. And it would be useful to have some kind of feedback from libcppcms WHY upload failed, so there'd need to be another member method of file widgets that can return an error code or message. Best regards, Julian |
From: Artyom B. <art...@ya...> - 2012-07-11 08:17:28
|
See, the code that handles file upload works before the request is handled to application, if the request fails the request would not even be transfered. If you afraid that there is not enough space, in the form you should reflect this in the upload form BEFORE user uploads the file. Also as Lee Elenbaas said, it is not really possible to check if there is enough space as it may be changed during upload progress. What would happen is that request would fail and the "temporary file should be deleted automatically" if it is not please fill a bug report. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Julian Pietron <ju...@wh...> >To: cpp...@li... >Sent: Tuesday, July 10, 2012 10:36 PM >Subject: [Cppcms-users] Check space left on device before file upload > >Hallo, > >on some of our embedded platforms a problem occurred that seems related >to the fact, that libcppcms doesn't seem to check the available space in >the location for uploaded files before it accepts an upload from the >browser, resulting in incomplete files (libcppcms seems to throw away >anything it can't write anymore). Nevertheless, there is no feedback >given to our code that something went wrong during upload and our code >can't show any specific error to the user because it doesn't know that >there had been a problem during upload. > >In my opinion, libcppcms should do one (or maybe both) of these two >things to help application code to display detailed error messages to >the user: >1) Check available disk space after client sent Content-Length header, >decide whether to accept the request or not >2) Notify the application code, that upload failed because of too less >disk space (maybe one could do this via the existing infrastructure of >invoking validate() on the upload form field's widget instance and >adding another method that would return any occurred errors) > >Best regards, >Julian > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Artyom B. <art...@ya...> - 2012-07-11 08:12:53
|
Use -DCMAKE_INCLUDE_PATH=/usr/local/include -DCMAKE_LIBRARY_PATH=/usr/local/lib Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: "ele...@ex..." <ele...@ex...> >To: cpp...@li... >Sent: Wednesday, July 11, 2012 10:34 AM >Subject: [Cppcms-users] cppdb doesn't find mysqlclient on FreeBSD > >Hi, > >libmysqlclient on FreeBSD is stored under /usr/local/lib/mysql > >and for some reason find_library(MYSQL_LIB mysqlclient) is not sufficient >as it doesn't find the shared object. > >For now I simply symlinked /usr/local/lib/mysql/libmysqlclient.so to >/usr/local/lib > >What would be the "proper" way to fix this? > >Petr > > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Lee E. <lee...@gm...> - 2012-07-11 07:41:50
|
On Wed, Jul 11, 2012 at 8:09 AM, <ele...@ex...> wrote: > > 1) Check available disk space after client sent Content-Length header, > > decide whether to accept the request or not > > I suppose, the header could be forged, just like content-type. > > Even if it was not forged - the multi threaded nature of web apps (and OS for that matter) means that an available space now might not be there while the file uploads. > > 2) Notify the application code, that upload failed because of too less > > disk space (maybe one could do this via the existing infrastructure of > > invoking validate() on the upload form field's widget instance and > > adding another method that would return any occurred errors) > > Please have a look at boost::filesystem::space_info as it should do the > trick. > > boost::filesystem::space_info will not tell you if the upload failed - the solution has to come from inside cppcms. The library needs to give some status for the file upload widget that will say whether the file was uploaded all right or not. The set() member function should give you this indication but it does not set to false if the upload fails to load completely Petr > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- -- lee Lee Elenbaas lee...@gm... |
From: <ele...@ex...> - 2012-07-11 07:35:11
|
Hi, libmysqlclient on FreeBSD is stored under /usr/local/lib/mysql and for some reason find_library(MYSQL_LIB mysqlclient) is not sufficient as it doesn't find the shared object. For now I simply symlinked /usr/local/lib/mysql/libmysqlclient.so to /usr/local/lib What would be the "proper" way to fix this? Petr |
From: <ele...@ex...> - 2012-07-11 05:09:34
|
> 1) Check available disk space after client sent Content-Length header, > decide whether to accept the request or not I suppose, the header could be forged, just like content-type. > 2) Notify the application code, that upload failed because of too less > disk space (maybe one could do this via the existing infrastructure of > invoking validate() on the upload form field's widget instance and > adding another method that would return any occurred errors) Please have a look at boost::filesystem::space_info as it should do the trick. Petr |
From: Julian P. <ju...@wh...> - 2012-07-10 19:54:13
|
Hallo, on some of our embedded platforms a problem occurred that seems related to the fact, that libcppcms doesn't seem to check the available space in the location for uploaded files before it accepts an upload from the browser, resulting in incomplete files (libcppcms seems to throw away anything it can't write anymore). Nevertheless, there is no feedback given to our code that something went wrong during upload and our code can't show any specific error to the user because it doesn't know that there had been a problem during upload. In my opinion, libcppcms should do one (or maybe both) of these two things to help application code to display detailed error messages to the user: 1) Check available disk space after client sent Content-Length header, decide whether to accept the request or not 2) Notify the application code, that upload failed because of too less disk space (maybe one could do this via the existing infrastructure of invoking validate() on the upload form field's widget instance and adding another method that would return any occurred errors) Best regards, Julian |
From: Artyom B. <art...@ya...> - 2012-07-10 08:43:55
|
1. Please register to mailing list. 2. Take a look on output of strace and see where system call open fails. Also add -f to see threads output Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: "la...@sa..." <la...@sa...> >To: Artyom Beilis <art...@ya...>; cpp...@li... >Sent: Monday, July 9, 2012 3:41 PM >Subject: Re: [Cppcms-users] CPPDB - connection time out > > > >Hi, > >I runned with strace, but does not say much. > >It fails on stat.exec ( for updates ). > >I am working with multi/thread, can this be a problem? > > >I am doing only one time (before starting the threads) -> cppdb::session sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >And now i also have for each thread: >/////////////////////////////////// >sql.open("sqlite3:db=/home/common/source/DB/Mdata.db"); >... >sql.close(); >//////////////////////////////// > > >This change helps a little, because now instead of having the error at aproximatly 600 seconds i have the error at aproximatly 700 seconds. > > > > >Thanks! >Leandro >Quoting Artyom Beilis <art...@ya...>: >Try to run the program with strace: >> >> strace ./program_name >> >>And see what exactly happens - why sqlite fails to open the DB. >>Maybe something happens there that you are not aware of? >> >>See why open() fails. >> >>Artyom Beilis >>-------------- >>CppCMS - C++ Web Framework: http://cppcms.com/ >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >> >> >> >>>________________________________ >>> From: "la...@sa..." <la...@sa...> >>>To: Artyom Beilis <art...@ya...>; cpp...@li... >>>Sent: Friday, July 6, 2012 6:16 PM >>>Subject: Re: [Cppcms-users] CPPDB - connection time out >>> >>> >>>The error I am having is: "Error: Unable to open database file". >>> >>>I have a connection -> cppdb::session sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >>> >>>I have a process that does a lot of selects, and updates, but always after aproximatly 600 seconds i get this error, .... I also found that this error occurs when i try to do an update (when i do stat.exec()). >>> >>>my updates are like this (It works fine, on the first 600 seconds, and then it gives an error): >>>////////////////////////////////////////////// >>>stat = sql << "update reading_h set read_id = ?, date = ?, time = ? where read_id = ? and mrg_id = ?" << readId << date << time << headerReadId << mrgId; >>>stat.exec(); >>>stat.reset(); >>>stat.clear(); >>>///////////////////////////////////////////// >>> >>> >>>Quoting Artyom Beilis <art...@ya...>: >>>There is no such thing as "lost a connection" with sqlite3 DB... >>>>The sqlite3 database is a file and database engine operates on the file >>>> >>>>Artyom Beilis >>>>-------------- >>>>CppCMS - C++ Web Framework: http://cppcms.com/ >>>>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>>> >>>> >>>> >>>>>________________________________ >>>>> From: "la...@sa..." <la...@sa...> >>>>>To: cpp...@li... >>>>>Sent: Friday, July 6, 2012 1:58 PM >>>>>Subject: [Cppcms-users] CPPDB - connection time out >>>>> >>>>>Hi, >>>>>I am working with cppdb, with sqlite. >>>>> >>>>>I am doing a connection with cppdb::session >>>>>sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >>>>> >>>>>But i think i lost connection after 600 seconds (10min). I already try >>>>>to change to, 'opt_reconnect = 1', >>>>> >>>>>but still does not work, .... i have always error after 10min. Error: >>>>>Unable to open database connection. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>Thanks, >>>>>Leandro >>>>> >>>>> >>>>> >>>>>------------------------------------------------------------------------------ >>>>>Live Security Virtual Conference >>>>>Exclusive live event will cover all the ways today's security and >>>>>threat landscape has changed and how IT managers can respond. Discussions >>>>>will include endpoint security, mobile security and the latest in malware >>>>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>_______________________________________________ >>>>>Cppcms-users mailing list >>>>>Cpp...@li... >>>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>>> >>>>> >>> >>> >>>------------------------------------------------------------------------------ >>>Live Security Virtual Conference >>>Exclusive live event will cover all the ways today's security and >>>threat landscape has changed and how IT managers can respond. Discussions >>>will include endpoint security, mobile security and the latest in malware >>>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>_______________________________________________ >>>Cppcms-users mailing list >>>Cpp...@li... >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users >>> >>> > > > >------------------------------------------------------------------------------ >Live Security Virtual Conference >Exclusive live event will cover all the ways today's security and >threat landscape has changed and how IT managers can respond. Discussions >will include endpoint security, mobile security and the latest in malware >threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: <la...@sa...> - 2012-07-09 12:41:19
|
Hi, I runned with strace, but does not say much. It fails on stat.exec ( for updates ). I am working with multi/thread, can this be a problem? I am doing only one time (before starting the threads) -> cppdb::session sql("sqlite3:db=/home/common/source/DB/Mdata.db"); And now i also have for each thread: /////////////////////////////////// sql.open("sqlite3:db=/home/common/source/DB/Mdata.db"); ... sql.close(); //////////////////////////////// This change helps a little, because now instead of having the error at aproximatly 600 seconds i have the error at aproximatly 700 seconds. Thanks! Leandro Quoting Artyom Beilis <art...@ya...>: > Try to run the program with strace: > > strace ./program_name > > And see what exactly happens - why sqlite fails to open the DB. > Maybe something happens there that you are not aware of? > > See why open() fails. > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >> >> ------------------------- >> FROM: "la...@sa..." <la...@sa...> >> TO: Artyom Beilis <art...@ya...>; cpp...@li... >> SENT: Friday, July 6, 2012 6:16 PM >> SUBJECT: Re: [Cppcms-users] CPPDB - connection time out >> >> >> The error I am having is: "Error: Unable to open database file". >> >> I have a connection -> cppdb::session >> sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >> >> I have a process that does a lot of selects, and updates, >> but always after aproximatly 600 seconds i get this error, .... I >> also found that this error occurs when i try to do an update (when >> i do stat.exec()). >> >> my updates are like this (It works fine, on the first 600 >> seconds, and then it gives an error): >> ////////////////////////////////////////////// >> stat = sql << "update reading_h set read_id = ?, date = >> ?, time = ? where read_id = ? and mrg_id = ?" << readId << date << >> time << headerReadId << mrgId; >> stat.exec(); >> stat.reset(); >> stat.clear(); >> ///////////////////////////////////////////// >> >> >> Quoting Artyom Beilis <art...@ya...>: >>> There is no such thing as "lost a connection" with sqlite3 DB... >>> The sqlite3 database is a file and database engine operates on the file >>> >>> Artyom Beilis >>> -------------- >>> CppCMS - C++ Web Framework: http://cppcms.com/ >>> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >>> >>>> >>>> ------------------------- >>>> FROM: "la...@sa..." <la...@sa...> >>>> TO: cpp...@li... >>>> SENT: Friday, July 6, 2012 1:58 PM >>>> SUBJECT: [Cppcms-users] CPPDB - connection time out >>>> >>>> >>>> Hi, >>>> I am working with cppdb, with sqlite. >>>> >>>> I am doing a connection with cppdb::session >>>> sql("sqlite3:db=/home/common/source/DB/Mdata.db"); >>>> >>>> But i think i lost connection after 600 seconds >>>> (10min). I already try >>>> to change to, 'opt_reconnect = 1', >>>> >>>> but still does not work, .... i have always error >>>> after 10min. Error: >>>> Unable to open database connection. >>>> >>>> >>>> >>>> >>>> >>>> Thanks, >>>> Leandro >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways >>>> today's security and >>>> threat landscape has changed and how IT managers >>>> can respond. Discussions >>>> will include endpoint security, mobile security >>>> and the latest in malware >>>> threats. >>>> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Cppcms-users mailing list >>>> Cpp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users >>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can >> respond. Discussions >> will include endpoint security, mobile security and the >> latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> > > > |
From: <ele...@ex...> - 2012-07-09 07:35:59
|
> it seems the the format of the date and for the parsing do not match in > the > second example > Sorry that was just a typo. see, I fixed it below > it seems like that if i move %Y and the year to start like this: > > std::istringstream is("2012_01_01-05_30_45"); > booster::locale::date_time dt; > is >> booster::locale::as::ftime("%Y_%d_%m-%H_%M_%S") >> dt; The problem is still the same. It seems like the time gets parsed properly everytime but the date does not unless the date is in the format %Y_%d_%m or %Y_%m-%d Petr |
From: Lee E. <lee...@gm...> - 2012-07-09 07:28:33
|
it seems the the format of the date and for the parsing do not match in the second example On Mon, Jul 9, 2012 at 9:28 AM, <ele...@ex...> wrote: > > booster::locale::generator gen; > > std::locale::global(gen("")); > > > > std::istringstream is("01_01_2012-05_30_45"); > > booster::locale::date_time dt; > > is >> booster::locale::as::ftime("%d_%m_%Y-%H_%M_%S") >> dt; > > > it seems like that if i move %Y and the year to start like this: > > std::istringstream is("2012-01_01-05_30_45"); > booster::locale::date_time dt; > is >> booster::locale::as::ftime("%Y_%d_%m-%H_%M_%S") >> dt; > > Then it works. > > Is there something im doing wrong? > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- -- lee Lee Elenbaas lee...@gm... |
From: <ele...@ex...> - 2012-07-09 06:28:21
|
> booster::locale::generator gen; > std::locale::global(gen("")); > > std::istringstream is("01_01_2012-05_30_45"); > booster::locale::date_time dt; > is >> booster::locale::as::ftime("%d_%m_%Y-%H_%M_%S") >> dt; it seems like that if i move %Y and the year to start like this: std::istringstream is("2012-01_01-05_30_45"); booster::locale::date_time dt; is >> booster::locale::as::ftime("%Y_%d_%m-%H_%M_%S") >> dt; Then it works. Is there something im doing wrong? |
From: <ele...@ex...> - 2012-07-09 06:17:17
|
Hi, Can someone please explain this? int main() { booster::locale::generator gen; std::locale::global(gen("")); std::istringstream is("01_01_2012-05_30_45"); booster::locale::date_time dt; is >> booster::locale::as::ftime("%d_%m_%Y-%H_%M_%S") >> dt; std::ostringstream os; os << dt; std::cout << os.str() << std::endl; return 0; } The output is: Dec 25, 2011 5:30:45 AM |
From: <ele...@ex...> - 2012-07-08 12:55:32
|
Well it finally got approved, yay. CppCMS is being used at Professional Helicopter Services for aircraft maintenance(currently a fleet of 18 aircraft). Can't give you a link because it's run internally though. Petr |
From: <ele...@ex...> - 2012-07-08 12:47:39
|
or make a periodic ajax to check the state of the session. if it's expired then you can print it on screen. > you redirected him to the login page when you saw that his session is > empty > - before the redirect - see if he was trying to submit a form - and then > add that message to his login screen > > On Sat, Jul 7, 2012 at 12:16 PM, Christian Gmeiner < > chr...@gm...> wrote: > >> >> > > >> > >is there a way to detect if a valid session gets expired? >> > >> > If the session is expired you will get an empty session - i.e. >> > the session would not be loaded. >> > >> okay... but what is the difference between a user that was never logged >> in >> and a user which session expired? >> > >> > >> > > I would like to inform logged in users that their session has >> > > expired >> > >> > What do you mean? >> > >> > If the user had lost the session due to timeout it would have to login >> > again. >> > >> > >> > There are also several models of session expiration: >> > >> > http://cppcms.com/wikipp/en/page/cppcms_1x_config#session >> > >> > >> >> Sessions are working fine that's not my problem! >> >> > >> > > and that there may be some data lose >> > > (changed values withoutsaving them). >> > >> > See, NEVER store valuable information information >> > >> > in the session. This is not what the session is for. >> > >> > Session may expire, be deleted, the user may loose the >> > cookie. So sessions is not good for this purpose. >> > >> >> I may be more clear here. the app i am developing is used to configure >> an >> embedded linux device (network settings etc). now i have a feature >> request >> to get informed if a user has changed some values in a html form (can be >> detected via ajax etc) went to drink a coffee for 13 minutes, but the >> session is only valid for 10 minutes. now the user comes back an filled >> out >> the form and presses apply. now he sees the login form again and wonders >> what happened to his changes. now it would be good to see a message in >> the >> login form that not all changes could be applied,due session timeout. >> >> thanks >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. >> Discussions >> will include endpoint security, mobile security and the latest in >> malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > > > -- > -- > lee > Lee Elenbaas > lee...@gm... > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Lee E. <lee...@gm...> - 2012-07-08 06:50:15
|
you redirected him to the login page when you saw that his session is empty - before the redirect - see if he was trying to submit a form - and then add that message to his login screen On Sat, Jul 7, 2012 at 12:16 PM, Christian Gmeiner < chr...@gm...> wrote: > > > > > > >is there a way to detect if a valid session gets expired? > > > > If the session is expired you will get an empty session - i.e. > > the session would not be loaded. > > > okay... but what is the difference between a user that was never logged in > and a user which session expired? > > > > > > > I would like to inform logged in users that their session has > > > expired > > > > What do you mean? > > > > If the user had lost the session due to timeout it would have to login > > again. > > > > > > There are also several models of session expiration: > > > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#session > > > > > > Sessions are working fine that's not my problem! > > > > > > and that there may be some data lose > > > (changed values withoutsaving them). > > > > See, NEVER store valuable information information > > > > in the session. This is not what the session is for. > > > > Session may expire, be deleted, the user may loose the > > cookie. So sessions is not good for this purpose. > > > > I may be more clear here. the app i am developing is used to configure an > embedded linux device (network settings etc). now i have a feature request > to get informed if a user has changed some values in a html form (can be > detected via ajax etc) went to drink a coffee for 13 minutes, but the > session is only valid for 10 minutes. now the user comes back an filled out > the form and presses apply. now he sees the login form again and wonders > what happened to his changes. now it would be good to see a message in the > login form that not all changes could be applied,due session timeout. > > thanks > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -- -- lee Lee Elenbaas lee...@gm... |
From: Christian G. <chr...@gm...> - 2012-07-07 09:16:20
|
> > > >is there a way to detect if a valid session gets expired? > > If the session is expired you will get an empty session - i.e. > the session would not be loaded. > okay... but what is the difference between a user that was never logged in and a user which session expired? > > > > I would like to inform logged in users that their session has > > expired > > What do you mean? > > If the user had lost the session due to timeout it would have to login > again. > > > There are also several models of session expiration: > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#session > > Sessions are working fine that's not my problem! > > > and that there may be some data lose > > (changed values withoutsaving them). > > See, NEVER store valuable information information > > in the session. This is not what the session is for. > > Session may expire, be deleted, the user may loose the > cookie. So sessions is not good for this purpose. > I may be more clear here. the app i am developing is used to configure an embedded linux device (network settings etc). now i have a feature request to get informed if a user has changed some values in a html form (can be detected via ajax etc) went to drink a coffee for 13 minutes, but the session is only valid for 10 minutes. now the user comes back an filled out the form and presses apply. now he sees the login form again and wonders what happened to his changes. now it would be good to see a message in the login form that not all changes could be applied,due session timeout. thanks |