Internal Server Error Woes (22)

1 Name: .tekrox 2004-12-12 09:22 ID:Heaven [Del]

hmmm Everytime I try and run Wakaba or WakabaZero on .chan space It dies;

I've setup the config.pl file
I've set the main dir (dctest) to 755
src, thumb and res dirs are set to 777
all files inside dctest are 755

heeeellllpppp meeeeee (please)

2 Name: .tekrox 2004-12-12 09:24 ID:Heaven [Del]

from the error log:
[Sun Dec 12 01:16:08 2004] [error] [client 203.20.229.19] Premature end of script headers: /home/dotchan/public_html/dctest/wakaba.pl

3 Name: Squeeks!ZW8mHclwsg 2004-12-12 12:40 ID:ZrtiWxUl [Del]

First possibility is that the script files themselves are corrupt. If you haven't modified them yourself, a dodgy download/upload is the problem. If you have personally gone in and modified them, then its probably error in code on your behalf that has caused the errors.

Finally, a folder with one imageboard should have only its perl scripts set to 755. This is not a key problem, but HTML files etc can't execute themselves. chmod 755 *.pl is all you need if you have shell acess.

4 Name: !WAHa.06x36 2004-12-12 15:11 ID:7chr8aGa [Del]

Yes, .pl files should be 755, all other files 644, and the subdirectories AND the directory itself should be 777, unless your server runs perl scripts as their owner, in which case 755 is enough.

Second, if you have a shell, do a "which perl", and then change the hashbang at the first line of the script to what that command outputs (in case perl lives somewhere other than /usr/bin/perl).

5 Post deleted by user.

6 Name: !WAHa.06x36 2004-12-12 15:23 ID:7chr8aGa [Del]

Also, you can do some testing by creating a file named "test.pl" containing this code:

#!/usr/bin/perl

print "Content-Type: text/html\n\n";
print "<html><body><h1>Perl is working!</h1></body></html>";

When you get this to run, you know Perl and CGI scripting is working right.

7 Name: .tekrox 2004-12-13 00:58 ID:Heaven [Del]

I'll give all that a go,
It appears I have to send a copy of my dirvers licence and a note signed in blood for these guys to give me shell access; but cpanel says perl is /usr/bin/perl

8 Name: .tekrox 2004-12-13 04:51 ID:Heaven [Del]

hmm seems perl isn't working right;
well thats gotta suck :(

9 Name: !WAHa.06x36 2004-12-13 14:15 ID:CR6FZqqx [Del]

I suggest nagging your provider for support.

10 Name: .tekrox 2004-12-17 01:11 ID:Heaven [Del]

ok
My provider sucks and is the worst for technical support! (they also promised me shell - and now want to hcarge me $200 per time I need to use it!)

They left me with Cron though, So I tried which perl
perl is located in /usr/bin/perl - just like cpanel said; and just like my scripts and wakaba's hashbang also says

I then running this perl script thorugh cron using the perl interpreter rather than through mod_perl on apache

#!/usr/bin/perl
print "wow it verks!";

using this command
perl /home/dotchan/1.pl >> /home/dotchan/perl_result

it resulted in: wow it verks!

I then moved the script into my www directory (directory - 755; 1.pl 755) - but alas still HTTP 500

any ideas on how to fix this?

11 Name: !WAHa.06x36 2004-12-17 08:17 ID:khYyHb86 [Del]

I've recently tried to set up Apache to use suexec, and I got nothing but a big pile of 500 Internal Server Errors no matter what I did. Do you know if the server is using suexec? Can you look for the suexec log file? It should be something like /var/log/apache2/suexec.log.

12 Name: .tekrox 2004-12-17 12:03 ID:Heaven [Del]

seems I son't have permission to the /var directory :(
also apache 1.33

13 Name: Lain!zJuWe9wYoU 2004-12-17 17:07 ID:XywupQGP [Del]

>and now want to hcarge me $200 per time I need to use it!

Get a new provider.

14 Name: .tekrox 2004-12-18 00:31 ID:Heaven [Del]

hoorah!
talked to another admin and he gave us shell straight away - and is investigating the perl problems :)

15 Name: .tekrox 2004-12-21 11:14 ID:Heaven [Del]

IT LIVES!
seems i had to the line
print "Content-type: text/html\n\n";

just after the hashbang on wakaba.pl it would just spit out 500 errors; after re-reading the error log on the server I decided to actually google "premature end of script headers"; seems it doesn't like perl scripts with html output with that line -_-

well it all works now!

16 Name: .tekrox 2004-12-21 13:40 ID:Heaven [Del]

ok, now i've got a whole set of mysql problems (yay for me!)
who loves error 500 - can't connect to sql databse!

I've checked all user names, passwords, database names and host setting - all are correct - are were confirmed by being able to login with copy/pasted (just to make sure I wasn't reading wrong!!) values into mysql administrator!

moving the
print "Content-type: text/html\n\n"
line to just before creating the content on the wakaba.pl removed the top error - but it still says sql connect error!

please help, or send a hitman to remove me !!

17 Name: !WAHa.06x36 2004-12-21 18:03 ID:bp3xLTL/ [Del]

Maybe the SQL server is using a non-standard port?

18 Name: Albright!LC/IWhc3yc 2004-12-25 18:46 ID:jitntdOJ [Del]

Hmm... I'm trying to do an upgrade to the most recent version of Wakaba, and I'm getting the same 500 errors: premature end of headers. Even when I do a fresh install and do the bare minimum configuration, nothin' but 500s all around.
http://www.pichan.org/newc/wakaba.pl

I don't see this line >>15 mentions in wakaba.pl... Did you put it there yourself? I haven't touched wakaba.pl (at least, where I'm trying a fresh install.)

WAHa, please, make this thing easier to install/upgrade already...

19 Name: !WAHa.06x36 2004-12-26 10:03 ID:0JfUyyqo [Del]

>>18

It IS much easier to upgrade now. This is some sort of strange bug, it seems, but I have no idea what causes it. And I am not at home at the moment so I can't do proper testing. What happens if you run it from the command line?

20 Name: !WAHa.06x36 2004-12-26 10:11 ID:0JfUyyqo [Del]

>>18

I can't reproduce this either. Here's a fresh install, with only the basic settings set: http://magnesium.net/~dag/test/wakaba.pl

21 Name: Albright!LC/IWhc3yc 2004-12-26 20:53 ID:pGgQN+z0 [Del]

>>19: If you meant run wakaba.pl from the command line...

[rygar]$ perl wakaba.pl
Status: 301 Go West
Location: wakaba.html
Content-Type: text/html

<html><body><a href="wakaba.html">wakaba.html</a></body></html>[rygar]$

(Go West? whiskey tango foxtrot)

I tried running the other .pl files and didn't get any unexpected results... wakaba_style.pl and futaba_style.pl spat out a lot of "bareword operator" errors, but so did the same files from a working Wakaba installation when I tried them...

Could the version of Perl have anything to do with it? My server is running v5.6.1.

22 Name: !WAHa.06x36 2004-12-27 08:03 ID:f+yS3ZKe [Del]

That output is entirely correct, and should not cause any "Premature end of script headers" errors. I suspect there's something wrong with the server setup.

...you did set the right permissions on them, right?

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