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 thread: http://wakaba.c3.cx/sup/kareha.pl/1141929669/
Questions about "500 Internal Server Errors" go in this thread: http://wakaba.c3.cx/sup/kareha.pl/1109033191/
Sorry for sounding like a n00b, but how do I change the time zone settings? Currently it's five hours past my time zone.
>>574DATE_STYLE
in config.pl
.http
and cookie
use GMT, the rest use whatever the local time zone is set to on the server.
well, there is month
that uses GMT as well, but that's just the month name and year, not the whole date and time.
actually, if i set up a kareha board anytime soon, i am so going to set DATE_STYLE
to month
.
> actually, if i set up a kareha board anytime soon, i am so going to set DATE_STYLE to month.kinda like this, except without anyone with half a brain cell being able to root the server.
When I first ran wakaba I noticed that the user has to click the checkbox when they want to upload a file. I was wondering why you did this since the script runs fine without it? Also I think it makes the user input panel look a little less cluttered and confusing by taking it out.
>>577
You mean when they don't want to upload a file. That checkbox keeps people from posting a bunch of useless threads because they can't figure out how to reply.
I am attempting to run Kareha on free hosting server and so far i copied files and style to main directory and edited config.pl
When i try to run kareha.pl it shows me this:
Can't locate config.pl in @INC (@INC contains: . /etc/perl /usr/local/lib/perl/5.8.4
halp.
top - 11:19:43 up 1 day, 20:27, 1 user, load average: 4.86, 3.98, 3.98
Tasks: 21 total, 2 running, 18 sleeping, 0 stopped, 0 zombie
Cpu(s): 30.9%us, 4.3%sy, 0.0%ni, 8.0%id, 55.4%wa, 0.2%hi, 1.2%si, 0.0%st
Mem: 429056k total, 429056k used, 0k free, 0k buffers
Swap: 429056k total, 345912k used, 83144k free, 0k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
538 USERNAME 18 0 70824 54m 1828 H 15 13.0 0:14.51 kareha.pl
27783 USERNAME 15 0 27512 10m 804 R 1 2.4 8:41.59 lighttpd
1619 USERNAME 15 0 24788 9544 1744 S 0 2.2 0:00.10 kareha.pl
6192 USERNAME 15 0 24784 9544 1744 S 0 2.2 0:00.10 kareha.pl
13649 USERNAME 18 0 24916 9604 1752 S 0 2.2 0:00.10 kareha.pl
16515 USERNAME 16 0 24788 9540 1744 S 0 2.2 0:00.10 kareha.pl
17883 USERNAME 16 0 24916 9604 1752 S 0 2.2 0:00.11 kareha.pl
18518 USERNAME 18 0 24792 9476 1744 S 0 2.2 0:00.10 kareha.pl
19332 USERNAME 15 0 24784 9536 1744 S 0 2.2 0:00.10 kareha.pl
20228 USERNAME 16 0 24784 9544 1744 S 0 2.2 0:00.11 kareha.pl
22054 USERNAME 16 0 24920 9616 1752 S 0 2.2 0:00.10 kareha.pl
22678 USERNAME 18 0 24784 9536 1744 S 0 2.2 0:00.10 kareha.pl
23959 USERNAME 15 0 24920 9608 1752 S 0 2.2 0:00.13 kareha.pl
25918 USERNAME 18 0 24788 9476 1744 S 0 2.2 0:00.10 kareha.pl
25949 USERNAME 18 0 24788 9476 1744 S 0 2.2 0:00.10 kareha.pl
28000 USERNAME 16 0 24920 9612 1752 S 0 2.2 0:00.11 kareha.pl
28666 USERNAME 15 0 24788 9536 1744 S 0 2.2 0:00.10 kareha.pl
29829 USERNAME 16 0 24784 9532 1744 S 0 2.2 0:00.10 kareha.pl
32364 USERNAME 15 0 36920 1732 1160 S 0 0.4 0:00.00 sshd
32367 USERNAME 15 0 10816 2112 1308 S 0 0.5 0:00.00 bash
32387 USERNAME 15 0 10592 1232 952 R 0 0.3 0:00.01 top
Dreamhost?
>>581
Yeah. Dreamhost private server. Kareha never did this to me before... but lately it's been taking up a large chunk of CPU and RAM.
I`m getting a
Software error:
CGI open of tmpfile: Permission denied
How do I change me temp dir to /wakaba/src/ or something?
Dreamhost has some kind of bug where flock() is broken and makes Kareha lock up waiting for a lock on log.txt
that is never released.
I'm trying desparately to understand compile_template(), but that is some deep magic you got there, WAHa. It looks alien in comparison to the rest of the code, out of place.
Any chance of getting a commented version?
Yes, it's some pretty wacky magic, if I recall correctly. It was years since I wrote it, though, so I don't necessarily remember exactly how it works myself. I think I gave up on making it readable so I made it unreadable instead. Sorry about that.
It converts the template to Perl code, and turns off strictness so it can use name references to actually change global variables in as it enters and leaves scopes. The main trick is this:
$foo="bar";
$$foo=12;
print "$bar\n";
This will print "12". By setting variables this way, the <var>
code can just evaluate whatever argument it is given as Perl code.
>>591
They're not that difficult, just think of them as sort of like pointers.
I'm running a board and can't seem to increase the max number of pages past 2. I've increased considerably the max thread count and the max posts count, even changed the permissions on the folder and rebuilt cache, but I can't get any more pages. Help computah? :<
>>587
is it possible to disable the logging altogether?
You could put in a cron job to delete log.txt, I guess, but it would break deletion and break IP addresses on the admin page. The flock() itself is needed to avoid concurrent posts stomping on each other.
>>595
You couldd fake the file locking with a symlink and avoid the flock() call. Make a symlink somewhere (it doesn't even have to point anywhere, really), spin until the link succeeds, and unlink it when the script exits.
>>596
or you could find a host that doesn't break flock() like that or tell them to fix their broken shit.
>>597
I did that already. I was trying not to be pompous and elitist about it, though, instead preferring to help others in the hopes that they will on their own realize that the trouble that they have to go through in order to make decent use of a broken web host isn't worth the tiny price difference.
Trying to set up kahrea on nginx + fcgiwrap. The main board seems to work, but when I try clicking on an individual thread with a URL (in the format of http://www.whatever.com/board/kareha.pl/somenumber) it gives me a 404. I'm on a resource limited VPS and Apache takes up far too many resources for my liking, or else I'd simply use that instead.
This is the part of my nginx config dealing with the board.
location ~ ^/board/.*\.pl$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:10000;
fastcgi_index index.html;
}
What am I missing?
>>587
Would it be possible to get any more details relevant to the problem with flock()? I only ask because I'm planning on complaining to Dreamhost and it would be good to have as much information as possible.
All I know is that suddenly flock() starts hanging on a specific file, and the only way to resolve it is to rename the file, and copy it back to the old location (so a new file is created, which can again be flocked() normally). Killing all running processes does not release that flock().
dreamhost has not caused issues with kareha or wakaba since 2006 on their regular hosting. maybe there's a problem with their PS service but that's a completely different beast. you should specify "dreamhost ps" in that case.
you don't even need their vps service unless you are getting around 5000 uniques * 10 pages/unique using kareha or if you are getting around 20000 or more a day with wakaba.
I don't know whether the fact that the config.pl should not be in UTF-8 amuses me or makes me want to puke.
Maybe it's my setup;
I ticked off the encoding and the template would display correctly
I ticked it on and the posts would display correctly.
And when I converted config.pl and some other files to ANSI everything came out fine.
Any tips? Should I leave it at that?
I notice that since I installed Wakaba 3.0.7 a while ago, an updated version has come out. What changes have been made? Is there a version history somewhere?
If you want it in UTF-8, you need to have use encoding 'utf-8';
at the top and no encoding;
at the end.
Just bugfixes. It's been too long for me to remember what exactly all of them were, though.
Ive got perl showing the wakaba.pl page correctly, I just need to setup mysql. Anyone have exp with Mysql in Ubuntu? Or even linux for that matter?
Damn, sorry for the quad posts ... server would not reply.
Sorry, you said quad posts so I deleted three of them... Anyway, read http://wakaba.c3.cx/docs/docs.html.
i just " installed " kareha..
but when I visit mah page it only downloads kareha.pl instead of browsing it?
I've installed perl, and changed permissions. so idk : (
See the previous post.
>>614
I followed that completely. I go to <site>/kareha/kareha.pl, says the index.html does not exist. The guide says going to that file should make it.
I CHMOD'd the directory to 777 again, it made the index file fine. But, when I upload an image, it always says "No thumbnail".
Oh, I also can not ban anyone either.
Okay, in admin.pl, it shows their IP as ::ffff:<normal IPv4 address>
It will not let me ban IP addresses??
Okay, I fixed the IPv6 problem, yet I still can not ban IP addresses, nor get the thumbnails to work.
use constant CONVERT_COMMAND => '/usr/local/bin/convert'; # location of the ImageMagick convert command (usually just 'convert', but sometime a full path is needed)
That is the correct path, etc, it just does not work for making the thumbnails ??
Oh, also, all posts are "1 GETs"
Anonymous 09/06/25(Thu)14:58 No.1
Anonymous 09/06/25(Thu)15:00 No.1
Etc.
Quick question: How do we enable more than 11 pages of posts? Thanks.
Change the post limits?
Well, MAX_THREADS and MAX_POSTS are both set to zero in config.pl. Is it something else that I have to set?
MAX_AGE and MAX_MEGABYTES, I guess?
The Wakaba/Kahera support wiki has a SecretFeatures tiddle that says:
>Wakaba and Kareha have a couple of hidden options and features. Can you find them?
I havn't been able to find them and it is driving me mad. Somebody please put me out of my misery.
When trying to make or delete a post, kareha.pl usually forwards me to index.html without it being completely built. This results in a parsing error if xhtml is enabled. index.html is fine if refreshed. Any idea what's causing this?
>>628
they're probably referring to things like ^H
and the other date formats that aren't documented in config.pl
.
Sounds like some kind of very weird or broken server. The redirect isn't done before the file is completely written to disk.
I never found MAX_AGE in config.pl (running 3.1.3). It's in there now, let's see what it does.
I basically want to be able to archive everything if possible.
>>630
No offence but I hope you are wrong because that is dissappointing.
I think I need a perl guru to help me with this mystifying problem. I run a wakaba image board and the admins want to have #admin after their posts, which is fair enough.I got it working by adding this at line 144 of futaba_style.pl (308):
<if !$email><if $name eq 'NAME'><if $trip eq 'TRIP'><span class="admin">#Admin#</span></if></if></if>
<if $email><if $name eq 'NAME'><if $trip eq 'TRIP'><span class="admin">#Admin#</span></if></if></if>
This worked flawlessly on a test site, but when I added the code to my live site it works fine on some boards and not at all on others. Even if I copy futaba_style.pl from a board which is working it still refuses to work. Even more baffling is one particular board which inserts #Admin# for posts that already exist, but not new posts!?!
I only have very basic programming knowledge but I don't even see how the last scenario is even possible. If the script recognises a name and trip combo and inserts #Admin# in one post, how can it not recognise the exact same name and trip combo in another post. Baffling. Obviously there is something more to this beyond my knowledge so if someone can point me in the right direction I'd be supper appreciative.
I have no idea what causes the problem, but mabe you should first just remove the outermost <if> statements and just have the code in there once. There's little point in doing it twice like that.
Also, you can combine several tests into <if $name eq 'NAME' and $trip eq 'TRIP'> to get rid of another if statement. Making the code simpler might help in figuring out what is going wrong
I am trying to install Wakaba on a shared hosting server. When I try and run wakaba.pl to get the html files it just trys to download the file and not run it. I asked my host about this and they said the files have to be in the cgi bin folder or something. Can someone please explain how to get this working X__X thank you.
>>637
My server is running Lighttpd, Ubuntu 9.04. It supports .htaccess, I think.
It is chmodded 777. All access.
Not to begin with, but when someone makes a post, it makes a 0-Byte file there, as if it tried to thumbnail and failed.
Why is it SUPPOSED to be like that? And no, it is all posts. Why does the first image not get thumbnailed though?
> My server is running Lighttpd
Wakaba has only been tested on Apache. If you want to run it on anything else you're on your own. There will be problems. This is not recommended unless you really know what you're doing, and it seems that maybe this isn't the case.
>>342
To fix the manager post problem, edit futaba_style.pl:
Search the file for ADMIN_POST_TEMPLATE. This should be found around line 590. There is some shit about form fields. Leave the "hidden" type alone. Starting on line 602 is the shit about postblocks for name, email, subject,(submit button) and comment. Leave the submit button alone. Change the name="whatever" to name="field1". Do this for name, email, subject, and comment; as in, change them to field1, field2, field3, and field4. In the order they are.
Also, change it so it looks like this:
use constant ADMIN_POST_TEMPLATE => compile_template(MANAGER_HEAD_INCLUDE.q{
<div align="center"><em><const S_NOTAGS></em></div>
<div class="postarea">
<form id="postform" action="<var $self>" method="post" enctype="multipart/form-data">
<input type="hidden" name="task" value="post" />
<input type="hidden" name="admin" value="<var $admin>" />
<input type="hidden" name="no_captcha" value="1" />
<input type="hidden" name="no_format" value="1" />
<table><tbody>
<tr><td class="postblock"><const S_NAME></td><td><input type="text" name="field1" size="28" /></td></tr>
<tr><td class="postblock"><const S_EMAIL></td><td><input type="text" name="field2" size="28" /></td></tr>
<tr><td class="postblock"><const S_SUBJECT></td><td><input type="text" name="field3" size="35" />
<input type="submit" value="<const S_SUBMIT>" /></td></tr>
<tr><td class="postblock"><const S_COMMENT></td><td><textarea name="field4" cols="48" rows="4"></textarea></td></tr>
<tr><td class="postblock"><const S_UPLOADFILE></td><td><input type="file" name="file" size="35" />
[<label><input type="checkbox" name="nofile" value="on" /><const S_NOFILE></label>
</td></tr>
<tr><td class="postblock"><const S_PARENT></td><td><input type="text" name="parent" size="8" /></td></tr>
<tr><td class="postblock"><const S_DELPASS></td><td><input type="password" name="password" size="8" /><const S_DELEXPL></td></tr>
</tbody></table></form></div><hr />
<script type="text/javascript">set_inputs("postform")</script>
That should be fixed in the latest version.
Problem with oekaki:
After painting my image, uploading it and writing RIGHT captcha, i see error about wrong captcha. What it can be?
I'm wondering if there's anyway to grab the subject from the first post in a thread, and to reflect it within "futaba_style.pl".
>>641-642
I've been running Wakaba and Kareha both on lighty for quite some time on a couple of different systems (I have tried it with OS X Tiger, FreeBSD, and Arch Linux, and had no problems)
The only snag is that lighty doesn't support htaccess files, so you'll have to translate the relevant stuff to its own config format. Not that hard to do, just tell it that .pl files should run with perl. You don't need to enable the fastcgi module (in fact, don't enable it) You might additioanlly want to fiddle with the expires headers if you find you're getting old copies of the pages served after posting.
As for permissions, if you set up execwrap or something similar you can get it running without the (highly insecure!) chmod 777. It's easier to configure than Apache's suexec, imo.
I have a bit of a question about Wakaba: I want to create an upload board like 4chan's flash board. However, I just installed it and it functions like a regular imageboard (like you'd see on any other part of 4chan). Is there a way I can get Wakaba to mimic 4chan's flash board in terms of appearance and function, and if not what should I be using?
> As for permissions, if you set up execwrap or something similar you can get it running without the (highly insecure!) chmod 777.
or you can just set the owner of the directories to the user that the scripts run as, and then set the permissions to 755.
>>649
That's still not secure, and requires root on some systems in order to "give away" the permissions to the web server. In fact it's probably a worse choice because it could potentially lull you into a false sense of security where you're actually in the same circumstance as before.
The issue is that other processes on the server can open up config.pl and scrape (and perhaps change) your admin password, either because it's readable and writable to all, or because they're all running as the same user. If two people have access to the web server and the server is running all scripts under the same user id, all script files are accessible to all users regardless of what else you do to them.
It's a shame that the Apache developers reacted so irrationally and so strongly against suexec, because it solves many problems and creates very few.
>>650
the point wasn't that it's secure to do it that way, just that there are other ways to do it without setting the permissions to 777.
>>651
Sure there are. But the method you suggested is more effort than a plain chmod 777 without being beneficial in some way.
>>648
All it takes is writing an appropriate style.pl file. It is essentially find-and-replace stuff, I did it once, and I had no idea what I was doing,
I have a similar'ish problem as >>600, i looked over the thread and still cant find a answer to this, the board works fine, but when make a post (successfully) and go to hit reply to the thread, i instead get the thread minus all styles, yet, if i go to http://site.com/board/kareha.pl/threadnumber/index.html, everything looks as it should and behaves properly, can anyone point out what part of the code needs to be adjusted to append /index.html to the reply url's kareha generates please?
i suspect its the webserver thats ultimately responsible for this but it seems to be a good exercise for me to do anyway ^_^
Is there a way to merge the posts from two kareha boards together? Thanks.
You can just copy all the files from res/ on one board to the other, and rebuild caches. However, this will break >> links and deletion of old posts for the ones that moved. You can fix the former by either running some search-and-replace on the res files, or by setting up an HTTP redirect.
A while back the captcha on my Wakaba install stopped working - when I view captcha.pl directly, it spits out the error:
Undefined subroutine &utf8::is_utf8 called at /usr/lib/perl5/5.8.0/CGI/Util.pm line 251.
I notice the 5.8.0 part in there because by the look of things, my hosting is running Perl 5.8.8
Since this happened on its own I guess it's more likely my hosting service's Perl install is somehow screwed up, but is this a sign that I'm doing something wrong at my end?
Correction: captcha.pl throws that error for everybody EXCEPT (a) one dude in Finland, and (b) the support guy I'm trying to get help from. He says that Perl is running fine.
HAHA DISREGARD THAT I SUCK COCKS (and by "suck cocks" I mean "had the support dude reinstall Perl and it fixed everything")
Hey there. I have been trying to get kareha working now for a while (I am a complete idiot when it comes to programming) and I have stumbled upon a problem: everytime I try to acces localhost/kareha.pl it gives me a 403 error. Could anyone help me to fix this problem?
Regards,
Sebastian
Anyone here?
>>661
Make sure you set the correct permissions on the .pl files. You might want to read those: http://wakaba.c3.cx/docs/docs.html
I'm using Kareha in message board mode. When I try to rebuild caches from admin.pl I keep getting this error:
"Couldn't write to file "" at wakautils.pl line 1013."
The rules header gets updated, but other threads with parentheses for titles get created. I can't delete them, or post in them.
What can I do to fix this?
Sounds like a broken configuration of some kind. Hard to say how exactly.
I found a perl script to generate random images on a wakaba board which works brilliantly, but I have been getting requests for the image to link to the thread the image comes from. I'm guessing I need to query the mysql database to find the thread but my coding skills are very weak so if someone could get me started I would really appreciate it. Perl or PHP is fine and here is the script I am using...
#!/usr/bin/perl
my $directory="b/thumb";
my @files=glob("$directory/*");
my $file=$files[rand @files];
print "Status: 302 Found\n";
print "Location: $file\n";
print "\n";
Noobish question; is this installed on your site, or uploaded and the files edited to make changes?
Yes the script is installed and running. I want to modify the script to also return the thread which the image originates from. I'm learning perl from scratch so I'm looking for pointers to help me out, cheers.