|
View:
New views
17 Messages
—
Rating Filter:
Alert me
|
|
|
slow startup again...lasso was angry again, so we restarted the service. on startup, it
takes FOREVER to re-build the SQLlite tables for lasso_site_1. it looks like it builds a duplicate temp table, then re-builds the lasso_site_1-journal file. our site is not huge, but these files are > 600MB what can i do to speed up startup!? thanks! andy -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: slow startup again...Just curious, what version of Lasso are you using and on which OS?
Israel > lasso was angry again, so we restarted the service. on startup, it takes > FOREVER to re-build the SQLlite tables for lasso_site_1. it looks like it > builds a duplicate temp table, then re-builds the lasso_site_1-journal file. > > our site is not huge, but these files are > 600MB > > what can i do to speed up startup!? > > thanks! > andy -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
|
|
|
Re: slow startup again...andy knasinski wrote on 7/6/2009 3:43 PM:
> our site is not huge, but these files are > 600MB Sounds like sessions and/or the error log has grown very large. You might forgo logging errors to the internal SQLite dbs and instead just log to files (and rotate them periodically). As for sessions, be sure they expire relatively quickly (under an hour) and they get cleaned up at least once a day. - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: slow startup again...> ... As for sessions, be sure they expire
> relatively quickly (under an hour) and they get cleaned up at least once a > day. > > > - Bil > Can you elaborate on what "cleaned up" means? Thanks! Mike Clearwater, FL -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: slow startup again...Mike Ealy wrote on 7/7/2009 9:59 AM:
>> ... As for sessions, be sure they expire >> relatively quickly (under an hour) and they get cleaned up at least once a >> day. >> >> >> - Bil >> > > Can you elaborate on what "cleaned up" means? Thanks! In SiteAdmin.LassoApp, navigate to Setup > Site > Sessions, then under "Session Tuning" look at the "Last Deletion" datetime, is it within the last 24 hours? If not, adjust the "Delete Expired Frequency" to something more aggressive (i.e. cleaned out more frequently). The idea is to clean out the expired sessions so that your session table doesn't grow obscenely large. Too large and it'll slow down your site, but too aggressive and it'll slow down your site too :) And unless you are sharing a session table with old versions of Lasso, switch "Compatibility" to "LP8.1/8.5 (faster)". And it's not a bad idea to set "Maximum Expiration Time" to something relatively short (somewhere between 10 - 30 minutes) to prevent a developer accidentally creating long-living sessions. - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: slow startup again...>
> >In SiteAdmin.LassoApp, navigate to Setup > Site > Sessions, then >under "Session Tuning" look at the "Last Deletion" datetime, is it >within the last 24 hours? If not, adjust the "Delete Expired >Frequency" to something more aggressive (i.e. cleaned out more >frequently). The idea is to clean out the expired sessions so that >your session table doesn't grow obscenely large. Too large and >it'll slow down your site, but too aggressive and it'll slow down >your site too :) > >And unless you are sharing a session table with old versions of >Lasso, switch "Compatibility" to "LP8.1/8.5 (faster)". And it's not >a bad idea to set "Maximum Expiration Time" to something relatively >short (somewhere between 10 - 30 minutes) to prevent a developer >accidentally creating long-living sessions. > >- Bil > Thx for the info Bil. I switched LP8.1/8.5 (faster) and setted the max expiration. Ciao -- ====================================================================== Fabrizio Carioni - Golem100 S.r.l. Gran Sasso (via), 50 - 20090 - Segrate (Mi) - Italy Voice +39-02-2133402 - Fax +39-02-93650749 - Mobile 3356463448 Email fabrizio@... - URL http://www.golem100.com/ ====================================================================== -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
PHP to LassoI need a quick check so I'm on the right track. Since I'm not used to
PHP I tend to assume things as I read them. Have I missed anything in my conversion from PHP to Lasso below? PHP ------------------ function invoice_digest($eid, $pno, $secret) { $string = $eid . ":" . $pno . ":" . $secret; return md5_base64($string); } Lasso ------------------ [var: 'key' = $eid+':'+$pno+':'+$secret] [var: 'invoice_digest' = (Encrypt_MD5: $key)] Perhaps it could even be: [var: 'invoice_digest' = (Encrypt_MD5: $eid +':'+$pno+':'+$secret)] ? /David -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoDavid Bergkvist wrote on 7/7/2009 3:09 PM:
> I need a quick check so I'm on the right track. Since I'm not used to > PHP I tend to assume things as I read them. Have I missed anything in my > conversion from PHP to Lasso below? > > PHP > ------------------ > function invoice_digest($eid, $pno, $secret) { > $string = $eid . ":" . $pno . ":" . $secret; > return md5_base64($string); > } Best guess: ========================================================= [ define_tag('invoice_digest',-required='eid',-required='pno',-required='secret'); return(encode_base64(encrypt_md5(#eid + ':' + #pno + ':' + #secret))); /define_tag; invoice_digest(123,456,'ssh!'); // example of usage ] LP8: Y2QxZmZmZTI5ZWE4NWZjOWI2NjgxNzI5MjRmNWIzNGE= ========================================================= - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to Lassomd5_base64() is not a built-in PHP function, and it does more than
just MD5. See the discussion around it on this page: http://us2.php.net/manual/en/function.md5.php#47886 You're missing a regular expression and some base64 encoding to make the Lasso code match the PHP code. That and wrapping it into a custom tag. - jason On Tue, Jul 7, 2009 at 4:09 PM, David Bergkvist<david.bergkvist@...> wrote: > I need a quick check so I'm on the right track. Since I'm not used to PHP I > tend to assume things as I read them. Have I missed anything in my > conversion from PHP to Lasso below? > > PHP > ------------------ > function invoice_digest($eid, $pno, $secret) { > $string = $eid . ":" . $pno . ":" . $secret; > return md5_base64($string); > } > > Lasso > ------------------ > [var: 'key' = $eid+':'+$pno+':'+$secret] > [var: 'invoice_digest' = (Encrypt_MD5: $key)] > > Perhaps it could even be: [var: 'invoice_digest' = (Encrypt_MD5: > $eid+':'+$pno+':'+$secret)] ? > > /David > > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > > -- tagSwap.net :: Open Source Lasso Code <http://tagSwap.net/> -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoBil Corry wrote on 7/7/2009 3:15 PM:
> David Bergkvist wrote on 7/7/2009 3:09 PM: >> I need a quick check so I'm on the right track. Since I'm not used to >> PHP I tend to assume things as I read them. Have I missed anything in my >> conversion from PHP to Lasso below? >> >> PHP >> ------------------ >> function invoice_digest($eid, $pno, $secret) { >> $string = $eid . ":" . $pno . ":" . $secret; >> return md5_base64($string); >> } > > Best guess: If Jason's source is correct, then it's this: ========================================================= [ define_tag('invoice_digest',-required='eid',-required='pno',-required='secret'); return(encode_base64(encrypt_md5(#eid + ':' + #pno + ':' + #secret))->removetrailing('=')&); /define_tag; invoice_digest(123,456,'ssh!'); ] LP8: Y2QxZmZmZTI5ZWE4NWZjOWI2NjgxNzI5MjRmNWIzNGE ========================================================= - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
|
|
|
Re: slow startup again...andy knasinski wrote on 7/8/2009 9:56 PM:
> We run our sessions all externally. I did make the suggested changes. > > I also stopped logging to the errors database. > > Hopefully that reduces the size of the site db. Please let us know the results -- it'd be good to know what works if others see it too, thanks. - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoHmm, I guess something else is different as well. When I use the PHP
with these params: eid = 389 pno = 4304158399 secret = cGX2cLFF5RsX9gG Lasso will generate: OWJiNWEwMzhiOTM0ODhhYjRhN2I2YTIyZDQ3NGFkYWE PHP will generate: m7WgOLk0iKtKe2oi1HStqg== The form in my PHP will call this function: function get_addresses($eid, $pno, $secret, $pnoencoding, $type, & $result) { our_settype_integer($eid); our_strip_string($pno); our_settype_string($secret); our_settype_integer($pnoencoding); our_settype_integer($type); $digestSecret = invoice_digest($eid, $pno, $secret); $paramList = array($pno, $eid, $digestSecret, $pnoencoding, $type); return kred_call("get_addresses", $paramList, $result); } That in turn calls this: function invoice_digest($eid, $invno, $secret) { $string = $eid . ":" . $invno . ":" . $secret; return md5_base64($string); } And goes on with this: function kred_call($function, $paramList, &$result) { global $PROTO_VSN; global $CLIENT_VSN; global $XMLRPC_LIB; global $KREDITOR_PORT; global $KREDITOR_HOST; $params = array($PROTO_VSN, $CLIENT_VSN); while(list(,$v)=each($paramList)) { $params[] = $v; } switch ($XMLRPC_LIB) { case "EPI": $xmlRequest = xmlrpc_encode_request($function, $params); $xmlResponse = xmlrpc_call($KREDITOR_HOST, $KREDITOR_PORT, $xmlRequest); $xmlResponse = substr($xmlResponse, strpos($xmlResponse, "\r\n\r\n")+4); $response = xmlrpc_decode($xmlResponse); if ($response == NULL) { // xmlrpc_decode may not handle faultCode/faultString if (ereg("<methodResponse><fault><value><struct><member><name>faultCode</ name><value><int>(-?[0-9]+)</int></value></ member><member><name>faultString</name><value><string>([^<]*)</ string></value></member></struct></value></fault></methodResponse>", $xmlResponse, $regs)) { $result = $regs[2]; return $regs[1]; } else { $result = $xmlResponse; return -99; } } else if (is_array($response)) { $result = $response["faultString"]; return $response["faultCode"]; } else { $result = $response; return 0; } case "KPEAR": $parameterArray = array(XML_RPC_encode($params)); $message = new XML_RPC_Message($function, $parameterArray); $message->setSendEncoding("ISO-8859-1"); $client = new XML_RPC_Client("/", $KREDITOR_HOST, $KREDITOR_PORT); //$client->setDebug(1); $response = $client->send($message); if (is_int($response) && ($response == 0)) { if ($client->errstring != "") { $result = $client->errstring; } else { $result = $client->errstr; } return -99; } else $faultCode = $response->faultCode(); if ($faultCode != 0) { $result = $response->faultString(); return $faultCode; } else { $result = XML_RPC_decode($response->value()); return 0; } break; default: $result = "Unknown XMLRPC library: " . $XMLRPC_LIB; return -99; } } I found the PHP output with Eavesdrop in the XML_RPC that it makes. Any ideas to what can make Lasso replicate the PHP code? /David 7 jul 2009 kl. 22.19 skrev Bil Corry: > Bil Corry wrote on 7/7/2009 3:15 PM: >> David Bergkvist wrote on 7/7/2009 3:09 PM: >>> I need a quick check so I'm on the right track. Since I'm not used >>> to >>> PHP I tend to assume things as I read them. Have I missed anything >>> in my >>> conversion from PHP to Lasso below? >>> >>> PHP >>> ------------------ >>> function invoice_digest($eid, $pno, $secret) { >>> $string = $eid . ":" . $pno . ":" . $secret; >>> return md5_base64($string); >>> } >> >> Best guess: > > If Jason's source is correct, then it's this: > > ========================================================= > [ > define_tag('invoice_digest',-required='eid',-required='pno',- > required='secret'); > return(encode_base64(encrypt_md5(#eid + ':' + #pno + ':' + > #secret))->removetrailing('=')&); > /define_tag; > > invoice_digest(123,456,'ssh!'); > ] > > LP8: Y2QxZmZmZTI5ZWE4NWZjOWI2NjgxNzI5MjRmNWIzNGE > ========================================================= > > > - Bil > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoHere's another PHP implementation you could try porting:
function md5_base64($data) { return base64_encode(pack('H*',md5($data))); } from: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/229258 Or you could try to find the original Perl implementation in CPAN and port that. - jason On Thu, Jul 9, 2009 at 9:30 AM, David Bergkvist<david.bergkvist@...> wrote: > Hmm, I guess something else is different as well. When I use the PHP with > these params: > > eid = 389 > pno = 4304158399 > secret = cGX2cLFF5RsX9gG > > Lasso will generate: OWJiNWEwMzhiOTM0ODhhYjRhN2I2YTIyZDQ3NGFkYWE > PHP will generate: m7WgOLk0iKtKe2oi1HStqg== > > The form in my PHP will call this function: > > function get_addresses($eid, $pno, $secret, $pnoencoding, $type, &$result) { > our_settype_integer($eid); > our_strip_string($pno); > our_settype_string($secret); > our_settype_integer($pnoencoding); > our_settype_integer($type); > $digestSecret = invoice_digest($eid, $pno, $secret); > $paramList = array($pno, $eid, $digestSecret, $pnoencoding, $type); > return kred_call("get_addresses", $paramList, $result); > } > > That in turn calls this: > > function invoice_digest($eid, $invno, $secret) { > $string = $eid . ":" . $invno . ":" . $secret; > return md5_base64($string); > } > > And goes on with this: > > function kred_call($function, $paramList, &$result) { > global $PROTO_VSN; > global $CLIENT_VSN; > global $XMLRPC_LIB; > global $KREDITOR_PORT; > global $KREDITOR_HOST; > $params = array($PROTO_VSN, $CLIENT_VSN); > > while(list(,$v)=each($paramList)) { > $params[] = $v; > } > > switch ($XMLRPC_LIB) { > case "EPI": > $xmlRequest = xmlrpc_encode_request($function, $params); > $xmlResponse = xmlrpc_call($KREDITOR_HOST, > $KREDITOR_PORT,$xmlRequest); > $xmlResponse = > substr($xmlResponse, strpos($xmlResponse, > "\r\n\r\n")+4); > $response = xmlrpc_decode($xmlResponse); > > if ($response == NULL) { > // xmlrpc_decode may not handle faultCode/faultString > if > (ereg("<methodResponse><fault><value><struct><member><name>faultCode</name><value><int>(-?[0-9]+)</int></value></member><member><name>faultString</name><value><string>([^<]*)</string></value></member></struct></value></fault></methodResponse>", > $xmlResponse, $regs)) { > $result = $regs[2]; > return $regs[1]; > } else { > $result = $xmlResponse; > return -99; > } > } else > if (is_array($response)) { > $result = $response["faultString"]; > return $response["faultCode"]; > } else { > $result = $response; > return 0; > } > > case "KPEAR": > $parameterArray = array(XML_RPC_encode($params)); > $message = new XML_RPC_Message($function, $parameterArray); > $message->setSendEncoding("ISO-8859-1"); > $client = new XML_RPC_Client("/", $KREDITOR_HOST, > $KREDITOR_PORT); > //$client->setDebug(1); > $response = $client->send($message); > > if (is_int($response) && ($response == 0)) { > if ($client->errstring != "") { > $result = $client->errstring; > } else { > $result = $client->errstr; > } > return -99; > } else > $faultCode = $response->faultCode(); > > if ($faultCode != 0) { > $result = $response->faultString(); > return $faultCode; > } else { > $result = XML_RPC_decode($response->value()); > return 0; > } > > break; > default: > $result = "Unknown XMLRPC library: " . $XMLRPC_LIB; > return -99; > } > } > > I found the PHP output with Eavesdrop in the XML_RPC that it makes. > > Any ideas to what can make Lasso replicate the PHP code? > > /David > > > > > 7 jul 2009 kl. 22.19 skrev Bil Corry: > >> Bil Corry wrote on 7/7/2009 3:15 PM: >>> >>> David Bergkvist wrote on 7/7/2009 3:09 PM: >>>> >>>> I need a quick check so I'm on the right track. Since I'm not used to >>>> PHP I tend to assume things as I read them. Have I missed anything in my >>>> conversion from PHP to Lasso below? >>>> >>>> PHP >>>> ------------------ >>>> function invoice_digest($eid, $pno, $secret) { >>>> $string = $eid . ":" . $pno . ":" . $secret; >>>> return md5_base64($string); >>>> } >>> >>> Best guess: >> >> If Jason's source is correct, then it's this: >> >> ========================================================= >> [ >> >> define_tag('invoice_digest',-required='eid',-required='pno',-required='secret'); >> return(encode_base64(encrypt_md5(#eid + ':' + #pno + ':' + >> #secret))->removetrailing('=')&); >> /define_tag; >> >> invoice_digest(123,456,'ssh!'); >> ] >> >> LP8: Y2QxZmZmZTI5ZWE4NWZjOWI2NjgxNzI5MjRmNWIzNGE >> ========================================================= >> >> >> - Bil >> >> >> -- >> This list is a free service of LassoSoft: http://www.LassoSoft.com/ >> Search the list archives: http://www.ListSearch.com/Lasso/Browse/ >> Manage your subscription: http://www.ListSearch.com/Lasso/ >> >> > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > > -- tagSwap.net :: Open Source Lasso Code <http://tagSwap.net/> -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoDavid Bergkvist wrote on 7/9/2009 8:30 AM:
> Hmm, I guess something else is different as well. When I use the PHP > with these params: > > eid = 389 > pno = 4304158399 > secret = cGX2cLFF5RsX9gG > > Lasso will generate: OWJiNWEwMzhiOTM0ODhhYjRhN2I2YTIyZDQ3NGFkYWE > PHP will generate: m7WgOLk0iKtKe2oi1HStqg== Ah, Lasso returns the MD5 hash hex-encoded, which PHP doesn't do. This works: ========================================================= [ define_tag('invoice_digest',-required='eid',-required='pno',-required='secret'); return(encode_base64(decode_hex(encrypt_md5(#eid + ':' + #pno + ':' + #secret)))); /define_tag; invoice_digest('389','4304158399','cGX2cLFF5RsX9gG'); ] LP8: m7WgOLk0iKtKe2oi1HStqg== ========================================================= - Bil -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
|
|
Re: PHP to LassoThanks a lot! Works great now!
Step by step I will get this to work! /David 9 jul 2009 kl. 16.07 skrev Bil Corry: > David Bergkvist wrote on 7/9/2009 8:30 AM: >> Hmm, I guess something else is different as well. When I use the PHP >> with these params: >> >> eid = 389 >> pno = 4304158399 >> secret = cGX2cLFF5RsX9gG >> >> Lasso will generate: OWJiNWEwMzhiOTM0ODhhYjRhN2I2YTIyZDQ3NGFkYWE >> PHP will generate: m7WgOLk0iKtKe2oi1HStqg== > > Ah, Lasso returns the MD5 hash hex-encoded, which PHP doesn't do. > This works: > > ========================================================= > [ > define_tag('invoice_digest',-required='eid',-required='pno',- > required='secret'); > return(encode_base64(decode_hex(encrypt_md5(#eid + ':' + #pno + ':' > + #secret)))); > /define_tag; > > invoice_digest('389','4304158399','cGX2cLFF5RsX9gG'); > ] > > LP8: m7WgOLk0iKtKe2oi1HStqg== > ========================================================= > > > - Bil > > > -- > This list is a free service of LassoSoft: http://www.LassoSoft.com/ > Search the list archives: http://www.ListSearch.com/Lasso/Browse/ > Manage your subscription: http://www.ListSearch.com/Lasso/ > > -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/Lasso/Browse/ Manage your subscription: http://www.ListSearch.com/Lasso/ |
| Free embeddable forum powered by Nabble | Forum Help |