The Wakaba and Kareha support thread, part 3 (535)

1 Name: !WAHa.06x36 : 2011-01-07 09:57 ID:eLRTX7Vk [Del]

This thread is for all your simple questions about installing and running Wakaba or Kareha, that just require quick answers. Please don't create new threads for issues like that, post them in here instead.

Before posting, check that the question has not already been answered in this thread, or in the previous two threads:

Also check the documentation: http://wakaba.c3.cx/docs/docs.html

There is also a setup guide by Anon: http://wiki.iiichan.net/index.php?title=Wakaba_and_Kareha_Setup_Guide

Questions about "500 Internal Server Errors" go in this thread: http://wakaba.c3.cx/sup/kareha.pl/1109033191/

381 Name: Anonymous : 2013-04-21 14:29 ID:Heaven [Del]

>>380
Alternatively, can anyone recommend a good way to benchmark wakaba myself?

382 Name: Anonymous : 2013-04-21 16:57 ID:Heaven [Del]

>>380
<if $admin> in the templates gets transformed to if ($admin) { ... } during compilation, so it won't run any slower than a regular if statement in Perl.

383 Name: Anonymous : 2013-04-21 22:59 ID:Heaven [Del]

>>382
I'm just wondering how much an extra 10 or so of those would effect compilation time.

384 Name: Anonymous : 2013-04-22 15:53 ID:Heaven [Del]

>>383

Benchmark: timing 10000 iterations of fifteen_ifs, five_ifs...
fifteen_ifs: 3 wallclock secs ( 3.13 usr + 0.00 sys = 3.13 CPU) @ 3194.89/s (n=10000)
five_ifs: 2 wallclock secs ( 1.68 usr + 0.00 sys = 1.68 CPU) @ 5952.38/s (n=10000)

Code: http://pastie.org/pastes/7700042/text?key=ofajzssrzghdz6mobzwyg

In other words, the difference is totally insignificant.

385 Name: Anonymous : 2013-05-02 13:49 ID:I9C3RNUF [Del]

please remove my ip from ban-list
when i go to http://wakaba.c3.cx/
i get http 403

386 Name: Anonymous : 2013-05-25 17:24 ID:Heaven [Del]

In Kareha, is there a simple way to get, say, header.html to automatically include another HTML document? So you could have:

<div id="rules">Some rules here.</div>
<hr />
<div id="navigation">{include nav.html}</div>

Or something. I use the rules.html for my board navigation, and mid.html for announcements. This would make things a mighty sight easier!

387 Name: Anonymous : 2013-05-28 08:50 ID:OFj2WUZi [Del]

>>386
If you're doing it inside of the header and you don't want to mess around to much with the rest of the template, just do something like this

<var include("include/nav.html")>

That should work in Kareha.

388 Name: Anonymous : 2013-05-31 07:54 ID:Heaven [Del]

I heard that WAHa recommends Kareha over Wakaba for imageboards. Is this true? I use Kareha and was thinking of setting up an imageboard, but I'm not sure if I should choose Wakaba or Kareha. The speed increase seems nice, but if the author recommends against it, I'm more than happy to trust his judgement.

389 Name: Anonymous : 2013-05-31 08:31 ID:Heaven [Del]

>>388
This is just a guess, but I think he recommends Kareha because most will never need the added speed that Wakaba and a database can bring. That, and 2006-2010 4chan kinda tarnished the imageboard collective... image, so the farther away you get from that paradigm the better, I guess. There's also the fact that Kareha is newer and has more functionality in some ways.

Back when I had to make the choice in 2011, I went with Wakaba, and its worked out for me so far. I've also managed to tack on ~2000 lines of code for some more modern functionality since then too, which is something that would've been a bit more difficult with Kareha, I imagine.

390 Name: Anonymous : 2013-06-03 07:49 ID:Heaven (Image: 714x1000 jpg, 373 kb) [Del]

src/1370270980419.jpg: 714x1000, 373 kb

>>379
From what I've gathered (reminding everyone that I know absolutely nothing about programming), the post remains in log.txt which is why its IP address can still be viewed. It also appears that, while the post is removed from the HTML document, the postcount number is not lowered.

Make a thread, post two replies. Delete the last reply. Not only will that deleted post still be in log.txt, but the thread's postcount remains at 3. Because of this, you can view the post number and IP in admin.pl, but the post appears to be completely empty.

I'm assuming this behaviour is for one reason only: so that the post numbers contiue to rise up, just like they do in 2ch mode. If we delete that third post then add a reply, the new reply is post #4, not #3. The only difference is that, in 2ch mode, the post will still be visible, but its contents are replaced with 'Post deleted by user.'.

So, AFAIK, it's not a bug, but simply a way of keeping track of the amount of replies the thread has received; it only appears blank because deleted posts aren't visible in Futaba mode, but they are in 2ch mode.

391 Name: Anonymous : 2013-06-03 18:10 ID:Heaven [Del]

>>386
>>387
Note that any template code inside nav.html will not be evaluated when doing it this way. If you need this, I believe I posted a hack for it further up in the thread.

>>388
I've heard the same thing, but I don't think it's true. I'd argue that Wakaba is the better choice: it has way better mod tools than Kareha has, SQL makes life easier in the long run and I've encountered weird bugs in Kareha which have resulted in things like cached indexes erroneously displaying single threads and large amounts of posts being wiped.

392 Name: Anonymous : 2013-06-11 10:24 ID:MJr6NpE7 [Del]

http://wakaba.c3.cx/sup/css/pseud0ch.css

> .replytext em { font-style: normal; }

Why is this rule here? It stops emphasized text from showing as italic in Pseud0ch.

393 Name: !WAHa.06x36 : 2013-06-11 10:41 ID:Heaven [Del]

>>392

You're expecting anyone to remember, after all these years?

394 Name: Anonymous : 2013-06-11 18:22 ID:Heaven [Del]

>>393
I'm surprised I even noticed. It seems all the boards I visit must have fixed it.

395 Name: Tokiko : 2013-06-20 16:27 ID:bSTS9uTn [Del]

How do I get a sage checkbox?

396 Name: Tokiko : 2013-06-20 16:38 ID:bSTS9uTn [Del]

I got it!

<if $thread>No bump <input type="checkbox" name="field_b" value="sage"/></if>

397 Post deleted by user.

398 Name: Anonymous : 2013-07-21 18:41 ID:r5mDQMLQ [Del]

Is there a postcount variable?

I'm making a masterlist of threads and wanted to show the postcount in a table. I've found $curr_replies in wakaba.pl but didn't know how to specify which thread with it.

399 Name: Anonymous : 2013-07-21 20:20 ID:OFj2WUZi [Del]

>>398
Just do "SELECT COUNT(*) FROM ".SQL_TABLE.";"

400 Name: Anonymous : 2013-07-21 22:48 ID:67T7uUcY [Del]

>>399
But where would I specify the thread number?

401 Name: Anonymous : 2013-07-21 23:26 ID:Heaven [Del]

>>400
Oh, I thought you wanted ALL of the posts. Try "SELECT COUNT(*) FROM ".SQL_TABLE." WHERE parent=?;" and just put the thread number in the $sth->execute() part.

402 Name: Anonymous : 2013-07-22 15:28 ID:Heaven [Del]

>>401
Sorry, now I'm really confused. I just want to count the number of comments (from the SQL table "comments") for each parent thread.

403 Name: Anonymous : 2013-07-22 19:01 ID:OFj2WUZi [Del]

>>402
That's exactly what that does. Though if you're doing it all at once, you should probably do what I said in >>399 and calculate them yourself.

404 Name: Anonymous : 2013-07-22 22:57 ID:Heaven [Del]

>>403
Thanks for the additional clarification. I ended up settling for a basic code that needs to be manually adjusted for each new parent thread, but just in case anyone else is interested:

<?php
$con=mysqli_connect("localhost","USER","PASSWORD","TABLENAME");
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result1=mysqli_query($con, "SELECT count(*) as total from comments where parent='1'");
$data1=mysqli_fetch_assoc($result1);

?>

<table>
<tr>
<td>001</td>
<td>
<?php echo $data1['total']; ?>
</td>
</tr>
</table>

405 Name: Anonymous : 2013-07-22 23:23 ID:Heaven [Del]

>>404
That's not really ideal for multiple reasons. First, why are you using PHP when Wakaba is written in Perl? Second, depending on how many threads you have you could be hitting the database hundreds of times for each user that views the page.

On a side note, thanks to your code, I remembered that my board's thread list does what you wanted, so I thought it might be a good idea to share my code with you, but as I read through I realized I made the same exact mistake as you. Wakaba has a sub routine called count_posts already built in, and I was calling it for each thread

406 Name: Anonymous : 2013-07-23 11:11 ID:Heaven [Del]

>>405

>why are you using PHP when Wakaba is written in Perl?

Because I know more of PHP. My knowledge of Perl is nonexistent; I've never worked with it before.

>you could be hitting the database hundreds of times for each user that views the page

Fair enough. If this were for a popular imageboard, I wouldn't recommend this method. But in a situation where you only have five posters, this manual method works well. Plus, the table from >>404 is a simplified version of the real masterlist table, which contains multiple elements ('type' and 'description') that can't be automatically generated (as they don't exist outside of the masterlist) so I can't just cycle through the parent threads.

>share my code

Oh, I'd definitely be interested in seeing it if you do fix it. Or just the unfixed code. Curious how other people (who know Perl) tackled this problem.

407 Name: Anonymous : 2013-07-23 11:38 ID:Heaven [Del]

>>406
To be completely honest, I didn't know Perl or PHP when I started messing around with Wakaba, but I've learned a ton because of the time I spent tinkering.

Anyways, it turns out posting my code isn't as simple as copying in pasting the relevant lines, since I don't know just how much I've changed over the last year. I can try implementing it in a plain version of Wakaba sometime tonight, but until then, you can try to track down what you need in my git https://github.com/marlencrabapple/Glaukaba

408 Name: Anonymous : 2013-07-23 11:49 ID:Heaven [Del]

>>407
I see. Alright, thanks for the link, I'll poke around once I'm done patching up the rest! And wow, a Summer Glau chan. Good taste.

409 Name: Anonymous : 2013-08-01 13:32 ID:Y7PnBwvC [Del]

I have the same problem as >>339
I've tried with +ExecCGI and allow from all in <Directory > and <Files > with /var/www/ /var/www/kareha.pl /var/www/kareaha.pl/*

The error I get in error.log is:
Options ExecCGI is off in this directory: /var/www/kareha.pl

Thanks in advance.

410 Name: Anonymous : 2013-08-01 13:59 ID:Heaven [Del]

>>409

You'll probably have better luck asking at some Apache forum.

411 Name: Anonymous : 2013-08-03 12:03 ID:ZBKA9Csm [Del]

I can't seem to get the quote feature to work. I have to type the ">>40" or whatever the number would be. When I click on the post number, doesn't put the quote in the comment box. I am using Wakaba. Here is the link to my imageboard. http://pyroneous.com/wakaba

412 Name: Anonymous : 2013-08-03 12:25 ID:Heaven [Del]

>>411
wakaba.js is missing.

413 Name: Anonymous : 2013-08-03 13:27 ID:ZBKA9Csm [Del]

>>412 It is named wakaba3.js, should I rename it?

414 Name: Anonymous : 2013-08-03 15:52 ID:Heaven [Del]

>>413
No, just make sure its in the right folder or fix your permissions so that its readable.

415 Name: Anonymous : 2013-08-11 11:05 ID:CSTuNhUD [Del]

How should I get rid of the "Board Look" section?

416 Name: Anonymous : 2013-09-04 17:32 ID:5LrvXA7U [Del]

Is there a way to create hyperlinks with WakabaMark? I'm assuming there is with Markdown.

It's the only reason I ever use HTML formatting, and then I have to add <p> tags myself.

417 Name: Anonymous : 2013-09-04 22:29 ID:OFj2WUZi [Del]

>>416
It does it automatically to some degree.

418 Name: Anonymous : 2013-09-05 19:29 ID:Z1FYU1zP [Del]

What can I edit so that I can put a constant PHP header on index.html in Kareha?

419 Name: Anonymous : 2013-09-06 01:16 ID:CTQK2Zwo [Del]

>>417
But it would be nice to have hyperlink text, maybe something like [[http://example.com|example]].

420 Name: Anonymous : 2013-09-08 22:57 ID:AvfT+fDg [Del]

there would be no point in doing that. it decreases the security of the users and makes hiding spam or malicious urls much simpler.

421 Name: Anonymous : 2013-09-09 10:22 ID:Bs1jM0ZK [Del]

>>420
You can already do that through the HTML mode, and a lot of spam bots already do (or try to). Plus I doubt many spam bots are set up to use WakabaMark.

It's inconvenient to humans, not robots, and if a human wants to hide a malicious URL that way they already can.

422 Name: Anonymous : 2013-09-24 06:17 ID:zEBosdfL [Del]

Has anyone made a HTML5 patch/fork before I do it myself?

423 Name: Anonymous : 2013-09-24 09:06 ID:OFj2WUZi [Del]

>>422
Its as simple as changing the doctype for the most part. That said, if you're looking for 100% "valid" html5, then yes, I've done it, along with a ton of other things that might turn you off if you're looking for a barebones experience.

https://github.com/marlencrabapple/Glaukaba

Aside from an option or two missing in global_config.pl, the installation is pretty straightforward, and everything should run as expected. I just installed it myself a week or two ago and it seems to be in a pretty useable state.

424 Name: Anonymous : 2013-10-07 05:09 ID:hjhZTxbY (Image: 785x71 jpg, 18 kb) [Del]

src/1381147756336.jpg: 785x71, 18 kb

I get a software error.

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC

As far as I can tell I have installed the thing in my cpanel, so what gives?

425 Name: Anonymous : 2013-12-13 21:55 ID:Heaven [Del]

Stupid question: is there a reason why no column is set as the primary key in Wakaba? I don't know much about databases, but it seems like that most of web apps do it.

426 Post deleted by moderator.

427 Name: Anonymous : 2014-01-14 13:17 ID:K9Khr868 [Del]

Hi
i have installed kareha, but there are a few problems i am not sure how to deal with.

  • When running kareha.pl, i get an error that says

Software error: Can't locate captcha.pl in @INC (@INC contains: . /usr/local/lib/perl5/5.8.8/x86_64-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/x86_64-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl) at kareha.pl line 15, <FILE> line 7.
BEGIN failed--compilation aborted at kareha.pl line 15, <FILE> line 7.
I temporarily fixed this by commenting the line BEGIN { require 'captcha.pl'; }, but I'd like to fix it properly.

  • I can't seem to get capcodes to work (trips and secure trips work fine).
  • There is no delete or manage button.

Thanks for your help guise.

428 Name: Anonymous : 2014-01-19 19:36 ID:OGXnEN+6 [Del]

How stupid would it be to connect to another db for things like session management? I'm thinking that if I offload something that would be hitting the db pretty often so a separate database server (or a tiny sqlite db) it would decrease access times to my main db server without any consequences. Would there be any noticeable overhead or am I missing something really obvious?

429 Name: !WAHa.06x36 : 2014-01-20 11:23 ID:Heaven [Del]

>>428

There's no session management, nor any hits to the database at all unless someone posts?

430 Name: Anonymous : 2014-01-20 13:13 ID:Heaven [Del]

>>429
Sorry I wasn't clear. I'm testing out some stuff I wrote for prevalidating captchas (reCAPTCHA, not the built in one) so you don't have to spend forever uploading an image just to find out you messed up and need to start over. Its pretty simple stuff but of course in most cases it requires an extra db query. After looking into how flood detection and bans are handled its pretty obvious that this would't be that huge of a performance hit, since its pretty much just two extra queries in total, but I'm still curious if offloading it somewhere else (maybe even a simple text file) could improve performance.

431 Name: Anonymous : 2014-01-21 09:40 ID:+yM64RIQ [Del]

besides writing a new .css, what do i have to do to use custom board look?

432 Name: Anonymous : 2014-01-21 20:06 ID:Heaven [Del]

>>431
In terms of what you HAVE to do that's about it, but you can do a lot more if you really want to.

433 Post deleted by user.

434 Name: Anonymous : 2014-02-04 20:52 ID:Heaven [Del]

I'm using waka_utils.pl in another project of mine and I was wondering how safe the templating system is for allowing (paid) users to write their own. If I remember correctly its possible to run code in a template, so I'm kind of wary about just allowing them to access the template system. Is there a way to make it a little more restrictive or am I better off just writing something myself?

435 Name: Anonymous : 2014-02-04 21:04 ID:Heaven [Del]

>>434
Okay I just tried looking through the compile_template function myself and I think this should take care of it.

if(!$safemode) {
if($closing) {
if($name eq 'if') { $code.='}' }
elsif($name eq 'loop') { $code.='$$_=$__ov{$_} for(keys %__ov);}}' }
}
else {
if($name eq 'var') { $code.='$res.=eval{'.$args.'};' }
elsif($name eq 'const') { my $const=eval $args; $const=~s/(['\\])/\\$1/g; $code.='$res.=\''.$const.'\';' }
elsif($name eq 'if') { $code.='if(eval{'.$args.'}){' }
elsif($name eq 'loop')
{ $code.='my $__a=eval{'.$args.'};if($__a){for(@$__a){my %__v=%{$_};my %__ov;for(keys %__v){$__ov{$_}=$$_;$$_=$__v{$_};}' }
}
}
else {
if(($name eq 'var') and ($args =~ /^\$[a-zA-Z]+$/)) {
$code .= '$res .= eval{' . $args . '};'
}
}

Any obvious gaping holes?

436 Name: Anonymous : 2014-02-04 21:32 ID:Heaven [Del]

>>435
The only obvious gaping hole I can think of is that you've basically just created an overcomplicated sprintf().

437 Name: Anonymous : 2014-02-04 23:15 ID:Heaven [Del]

>>436
Most of it is part of the templating system already in waka_utils.pl.

438 Name: Anonymous : 2014-02-07 16:05 ID:Heaven [Del]

>>427
please answer

439 Name: Anonymous : 2014-02-13 22:07 ID:OGXnEN+6 [Del]

I'm trying to wrap my head around the templating system a little more, and I can't quite figure out how the variables passed to the constant value that defines the template are in the same scope as compile_template. How would one access the variables available to compile_template? Are they inside of some magical perl variable? I already checked @_ and all that's in their are the contents of the constant.

440 Name: Anonymous : 2014-02-13 22:27 ID:Heaven [Del]

>>439
Oh wow I think I got it on my own. I put die %__v->{title} inside of the my $sub = eval part and it printed out the value of $title.

441 Name: Anonymous : 2014-02-15 09:21 ID:Heaven [Del]

How big of a performance hit would it be to change the entire config system from constants to hashes? I'm trying to make it easier to manage multiple boards for less savvy users. Would something like

my $option = sub {
my ($board,$key) = @_;
return BOARDS->{$board}->{$key} || GLOBAL_OPTIONS->{$key};
};

for retrieving a config option be a huge performance hit or security risk?

442 Name: Anonymous : 2014-02-23 19:13 ID:eKdN0gt1 [Del]

So now I'm trying to change wakaba's setting so that everytime anon post something, he will be redirected to that same thread he posted on. The way user had to go back to front page after every post is annoying to me.

I found the following supposedly related line in wakaba.pl:
# forward back to the main page

make_http_forward(HTML_SELF,ALTERNATE_REDIRECT);

I have zero knowledge with Perl so I hope someone will help me here.

443 Name: Anonymous : 2014-02-23 22:03 ID:OGXnEN+6 [Del]

>>442
There's a patch that adds noko support somewhere on this board.

444 Name: Anonymous : 2014-02-23 23:42 ID:eKdN0gt1 [Del]

>>443
Oh I see, found it here
http://wakaba.c3.cx/sup/kareha.pl/1256252904/

But I have no idea how to get the patch from there.

445 Name: Anonymous : 2014-02-24 16:57 ID:OGXnEN+6 (Image: 0x0 patch, 2 kb) [Del]

>>444
Looks like it got deleted. I went ahead and wrote a new one. No idea if it works. Haven't ran it myself.

446 Name: Anonymous : 2014-02-26 03:19 ID:N3I/K07x [Del]

>>445
Okay, I added that patch but every time it gave me an internal server error.

I don't know if it's the new script's fault. After that, I tried to change simple stuffs like
BEGIN { require "strings_en.pl"; }
into
BEGIN { require "strings_eng.pl"; }

with strings_eng.pl in the root folder of course. Yet it still give me 500 error.

447 Name: Anonymous : 2014-02-27 07:25 ID:N3I/K07x [Del]

How do I remove the 'Manage' option in admin bar? The way it is now, every user can see it and I only want admin to access it.

448 Post deleted by user.

449 Name: Anonymous : 2014-02-27 10:59 ID:Heaven [Del]

>>447
Delete the link from the template in futabastyle.pl

450 Name: Anonymous : 2014-02-27 19:34 ID:N3I/K07x [Del]

>>449
Thanks, I feel like a retard now. Should have figured that out myself.

451 Name: Anonymous : 2014-03-01 02:37 ID:2TuCltKM [Del]

Hi,
I would like to add an ability to wrap text in spoiler tag just like 4chan now. I appreciate your help.

452 Post deleted by moderator.

453 Name: Anonymous : 2014-03-04 22:30 ID:hkJFbyQ2 [Del]

I need help. I enable encoding to utf-8 in the config.pl and made sure to uncomment the no encoding line at the end to write non-English words. Everything works fine at first but I cannot log on to admin panel after that. It gave me Incorrect management password despite whatever it is stated in config.pl.
In fact, if I turned off the encoding lines I could go to admin panel like nothing.

454 Name: Anonymous : 2014-03-05 05:56 ID:hkJFbyQ2 [Del]

>>453
Okay this is resolved, thanks for your help. For future reference: it appears moving the "use encoding 'utf-8'" to after the constant admin_pass will make it work.

But now there is another problem: the html files (header, rules and footer) won't show my native language whatsoever. I know I'm a noob but Isn't the use encoding line affects to all html files?

455 Name: Anonymous : 2014-03-09 18:48 ID:VpK7hCYn (Image: 1898x2024 png, 967 kb) [Del]

src/1394416122991.png: 1898x2024, 967 kb

Hello!
I'm trying to incorporate wakaba into my SMF page (php forum).
All I'm trying to figure out is how to add this
[code]<?php
//Require header.php
require('../header.php');
?>[/code]
to all of the topic .html files generated. the header.php being required is the header for my forum and is designed to be called as shown. this works in any standard php page. can this work in the perl system?
picture is of a php page fetching the forum header and footer and fetching wakaba.html in the middle. replying to topics redirects to the individual topic html.

456 Name: Anonymous : 2014-03-09 20:49 ID:VpK7hCYn [Del]

I've managed to change the generated page extensions to .php and fetch my form header, but the reply pages (ie: /res/11.php) will not load. the head will load but the body won't and the page is just left blank.
anyone have some insight for me?

457 Name: Anonymous : 2014-03-09 20:56 ID:VpK7hCYn [Del]

I should mention that my main wakaba.php page generated by the wakaba.pl file works just fine, it's just the pages that are linked via "reply"

458 Name: Anonymous : 2014-03-10 11:30 ID:8lreZ4Oy [Del]

After I tried to enter to kareha.pl it gives me:
"couldn't create child process: 720002: kareha.pl"

459 Name: Anonymous : 2014-03-10 11:43 ID:8lreZ4Oy [Del]

Wrong section, sorry

460 Name: Anonymous : 2014-04-09 23:04 ID:P8tB4yXX [Del]

heres something for anyone interested in redis/perl. i've found that if your imageboard has a lot of images, the find_md5 function gets slower and slower. i've basically loaded all of the hashes as keys in redis and use it to perform the check, its a lot faster. the key is imageboardname:hash and the values are thread,post,file

this isnt a standard patch, my kareha setup is extremely different from stock (i've split all the posting functions from the main script and run that part in memory) but its only a few changes

http://pastebin.com/9ZtN69Az

461 Name: Anonymous : 2014-04-10 04:43 ID:OGXnEN+6 [Del]

>>460
How much of an improvement would something like this bring to Wakaba? I've been thinking of throwing memcache or redis support on it and moving some of the static cache to a ramdisk for faster IO but haven't bothered because I have no idea if it would be worth it or not.

462 Name: Anonymous : 2014-04-10 09:44 ID:P8tB4yXX [Del]

>>461 i'm not familiar with wakaba but if it keeps its information in a database then there won't be much improvement. the problem with kareha was it basically looped through a giant log file every time it checked a hash.

i do keep cache files for phpbb in tmpfs, you may see some improvement. it's hard to tell though since linux caches stuff into memory anyway

463 Name: Anonymous : 2014-04-11 09:19 ID:OGXnEN+6 [Del]

>>462
Do you know if dynamically building a JSON reponse from a DB cache like redis or memcache every time a user sends a GET request would be any faster or slower than writing to JSON files on a ramdisk every time they're updated? I'm tempted to do both on a clean Wakaba installation and benchmark them, but even then I have no idea how to benchmark something like that properly.

464 Name: Anonymous : 2014-04-16 20:53 ID:P8tB4yXX [Del]

>>463 if i were to do that i'd use elasticsearch as the backend and just ditch the database. it natively outputs json from lucene indexes, supports updates etc.

http://www.elasticsearch.org/overview/elasticsearch

i've contemplated doing something like this myself

465 Name: Anonymous : 2014-04-17 06:44 ID:Ew/xd7/x [Del]

Hi all, I'm trying to install kareha on a basic plan server, which has Perl enabled. I'm used to setting up php software, but I don't code myself. I figured Perl files work in a special way, and they have to be put in a separate forlder, like cgi-bin (?) My question is : which files do I have to put there? Is it all .pl files? Then how do I access these files with a browser, since this folder is outside the main /wwww/ directory? Is there anything else I should know?

466 Name: Anonymous : 2014-04-17 13:20 ID:OGXnEN+6 [Del]

>>465
I vaguely remember the documentation explicity stating not to put your Perl files in cgi-bin.

467 Name: Anonymous : 2014-04-17 21:52 ID:OGXnEN+6 [Del]

So what's up with get_decoded_hashref()? Its used in very few places and as far as I can tell everything wakaba stores in the db has already been through decode_string. What am I missing?

468 Name: Anonymous : 2014-04-19 23:35 ID:Heaven [Del]

>>467
See http://perldoc.perl.org/perlunicode.html#Porting-code-from-perl-5.6.X.

The charset situation in Wakaba is a confusing mess. IIRC, the wrapper functions are either used to retain compatibility with Perl 5.6, or to retrieve Unicode data from a non-Unicode database, or both. Note how the utf8 pragma isn't used anywhere in the script, while the encoding pragma is used sparsely.

It's been a few years since I've done anything with Wakaba, but I recall having to use get_decoded_hashref() or its arrayref counterpart every time I wanted to retrieve text that might contain Unicode.

469 Name: Anonymous : 2014-04-20 10:20 ID:Heaven [Del]

>>468
Just noticed that Wakaba doesn't even set the tables it creates as UTF-8. I wonder how much performance I could gain by ditching compatibility for ancient versions of Perl and non-UTF-8 databases...

470 Name: Anonymous : 2014-04-22 16:51 ID:OGXnEN+6 [Del]

Where does one find out how to examine file headers like Wakaba does for images? I added webm support to Wakaba and I can't really do much but rely on ffmpeg to tell me if the file is proper or not. So far it works perfectly but I feel like I should just throw random files at ffmpeg and expect nothing to go wrong.

471 Name: Anonymous : 2014-04-23 21:31 ID:r9TYPpqN [Del]

>>469 The biggest gain I had was adding another index to each table. A board like http://www.chansluts.com/general/girls/ saves at least 15 seconds on a rebuild. The index that gives the huge boost? "parent".

I also converted everything to UTF-8, as well as using InnoDB.

472 Name: Anonymous : 2014-04-24 06:59 ID:Heaven [Del]

I was considering adding an index. Only reason I haven't yet is because WAHa didn't in the first place, and I'm pretty sure he still knows better than me in most cases.

473 Name: Anonymous : 2014-08-19 17:06 ID:l8RP4zr1 [Del]

Not Acceptable

An appropriate representation of the requested resource link could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I get this when trying to quote with >>number

Any ideas?

474 Name: Anonymous : 2014-08-20 08:06 ID:Heaven [Del]

>>473
What's your setup like? That doesn't look like an nginx error message so it has to be apache or lighttpd. Do you also get this error when you click on "Last 50 posts"?

475 Name: Anonymous : 2014-08-20 08:54 ID:Heaven [Del]

>>473
>>474
Just realized I'm assuming you use Kareha. Are you using Wakaba or Kareha?

476 Name: Anonymous : 2014-08-23 10:51 ID:l8RP4zr1 [Del]

>>475

I'm using Wakaba. I basically 775'd all the .pl files in the folder's index. Maybe I had to do it wall the files or something?

477 Name: Anonymous : 2014-09-15 10:20 ID:N07PHk5Q [Del]

I'm using wakaba and have a problem with my captcha.

Does anyone else have a problem with Captcha not automatically reloading? After I post, I cannot post again without manually reloading the page and getting a new captcha. If I don't do a manual reload, the captcha stays the same and gives me an error when I try to post again. Is this a browser issue, or something else? I've tried it in Chrome and Firefox, and neither auto-reload the captcha after a post, but the browser does seem to reload because the image and text appear on the page automatically, I just get the same captcha code.

478 Post deleted by user.

479 Name: Anonymous : 2014-09-21 14:19 ID:5xCzuG2s [Del]

Say I have a persistent version of Kareha. Would caching the log in an array and creating a hash of references to each row in the log with MD5 hashes or IP addresses as keys be an easy to squeeze more performance out of Kareha? If I understand correctly, the hash values shouldn't take up too much extra memory since they're refs, and the array itself shouldn't be any bigger than it would be in plain CGI Kareha. Is there anything I'm missing or misunderstanding?

480 Name: Anonymous : 2014-09-26 11:47 ID:K2mFT8RG [Del]

I have latest version of kareha installed and it takes 2 clicks of the preview button to initiate preview, and in chrome and Safari the default markup is blank with an " undefined " under it until you pick one

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: