Page Index Toggle Pages: 1 2 3 [4] 5 
Topic Tools
Very Hot Topic (More than 25 Replies) CGI Error - HTTP Errors (Read 33,971 times)
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #45 - Jun 29th, 2009 at 9:14am
Post Tools
nor is it designed to return anything (no code to return anything)
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #46 - Jun 29th, 2009 at 9:16am
Post Tools
it's 4:00 AM over there and you're asleep?
ghee
Huh
  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: CGI Error - HTTP Errors
Reply #47 - Jun 29th, 2009 at 1:36pm
Post Tools
Hi louwk,

IIS doesn't use the shebang line, at least in versions 5 & 6. The reason is that ActiveStates configures itself as a Web Service Extension by default.  This means that IIS 'knows' what Perl is, its extensions, where to find it, and how to launch it.  No need for a Shebang - IF the ActiveStates default install was followed, and IIS was installed on the Server at that time.

IIS isn't really a web server, its an application server.  IIS uses perlis.exe rather than perl.exe. Perlis.exe is designed to work within IIS. The big advantage is that the worker pool process can manage the Perl instances and that the .dll library is only loaded once. 

Here's a well written explanation of how it works and the advantages, complete with his experiments.

http://www.geocities.com/herong_yang/perl/perl_iis.html

Good Luck
Wink
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #48 - Jun 29th, 2009 at 2:24pm
Post Tools
yes, you are correct. Provided your mime type is configured correctly and your path is set correctly.
Your script still needs something to return, though
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #49 - Jun 29th, 2009 at 2:28pm
Post Tools
I just ran every settings.pl since vs gold 1.3.1 and all give me a cgi error.

they are setting files, not scripts and will throw an error each and every time
  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: CGI Error - HTTP Errors
Reply #50 - Jun 29th, 2009 at 4:14pm
Post Tools
ummm, what they really are is chunks of code IMO.

Note that all the 'data' is in the form of assignment statements. Its all perfectly valid Perl.

They are not meant to be run as scripts in and of themselves AFAIK. I'm asking how it works from those who know more than I.

Smiley
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: CGI Error - HTTP Errors
Reply #51 - Jun 30th, 2009 at 3:14am
Post Tools
Hi louwk & TickToo

Here's the latest.  Based on louwk's report that he could substitute the 2.3.1 version of Settings_Advanced.pl and my execution trace of the code, plus my logging on TickToo's server and checking things, plus running his forum as admin. I was going to 'diff' the files but they are very 'diff'erent.   The developers have a suggested course of action. 

Bear in mind, we have no way to test this as my Test servers are not experiencing the problem.  When we find what is wrong, we may have an explanation.

in Settings_Advanced.pl 2.4, code was added for Disk checking.

Its right near the top.

Code
Select All
# Free Disk Space Checking
my @disk_space = qx{df -k .};
map { $_ =~ s/ +/  /g } @disk_space;

my @find = qx(find . -noleaf -type f -printf "%s-");

$hostusername = $hostusername || (split(/ +/, qx{ls -l YaBB.$yyext}))[2];
my @quota = qx{quota -u $hostusername -v};
$quota[0] =~ s/^ +//;
$quota[0] =~ s/ / /g;
$quota[1] =~ s/^ +//;
$quota[1] =~ s/ / /g;
my $quota_select = qq~$quota[0]<br />$quota[1]~;
if ($quota[2]) {
	my $ds = (split(/ +/, $disk_space[1], 2))[0] if !$enable_quota;
	$quota_select .= qq~<br /><select name="enable_quota_value">~;
	for (my $i = 2; $i < @quota; $i++) {
		$quota[$i] =~ s/^ +//;
		$quota[$i] =~ s/ +/&nbsp;&nbsp;/g;
		$quota_select .= qq~<option value="$i" ~ . ${isselected($i == $enable_quota || ($ds && $quota[$i] =~ /^$ds/))} . qq~>$quota[$i]</option>~;
	}
	$quota_select .= '</select>';
} 



they suggest you comment out one code block at a time, to see if we can ascertain where the problem lies.

inserting the # (hash/number sign) at the beginning of a statement in Perl will comment it out, and prevent execution.  Perl statements all end in the semicolon ';'.  I expect you guys may now this, but its also in case others follow these steps.

I always do these things in a code editor so the syntax checker can tell me what's up with my changes.

Please let me know what happens.

Good Luck
Smiley
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #52 - Jun 30th, 2009 at 9:37am
Post Tools
OK, as soon as I comment out
...
if ($quota[2]) {   <------
...

no cgi error. And that is the only line to comment out.
However, once it opens the setting page, there is nothing to set; just left with a page button.

I leave it like that for you to fetch
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #53 - Jun 30th, 2009 at 9:38am
Post Tools
sorry,
just left with a SAVE button
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #54 - Jun 30th, 2009 at 9:55am
Post Tools
BUT, then I removed the # and removed the last }
NO cgi error

the second last }
still no error

then removed
     }
     $quota_select .= '</select>';
}

no error, but still nothing to set
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #55 - Jun 30th, 2009 at 9:59am
Post Tools
AND THEN IT DAWNED ON ME!!!

check your code, there is one } short

uncomment everything, throw another } at the end and no more error.

Or better still, put it where it belongs:
---
     for (my $i = 2; $i < @quota; $i++) {
---
ONE } before the last { (close your clause)

However, there is still nothing to set; so I assume it has to be fixed before an install is perforemed?
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #56 - Jun 30th, 2009 at 10:14am
Post Tools
all that excitement!!!
one short? NO
one too many at the end of that block

---
        }  <----NOT WANTED
     $quota_select .= '</select>';
}
---
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #57 - Jun 30th, 2009 at 10:26am
Post Tools
and then I removed the whole section as pasted by you above, cut the lot
from:
# Free Disk Space Checking
...
to
..
     $quota_select .= '</select>';
}

and guess what, it works and I got my settings. Do I have all the settings? well, I don't know, I have never seen them before in 2.4
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #58 - Jun 30th, 2009 at 2:22pm
Post Tools
my perl yabb forum!?
Angry
  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: CGI Error - HTTP Errors
Reply #59 - Jun 30th, 2009 at 6:27pm
Post Tools
Hi louwk -

What's with the angry face thing?  I have the impression from your posts that your server is working correctly now. 

I'm at work right now installing a new server. I'll take a look when I get a chance later today if what you want me to confirm is that you have 'all your options'. Here's a screen shot of the Advanced Tabs

I can't imagine why it would not be as designed, but I didn't write it either.   

Smiley





  

adv_tabs.png (Attachment deleted)

I find your lack of faith disturbing.
Back to top
IP Logged
 
Page Index Toggle Pages: 1 2 3 [4] 5 
Topic Tools