Page Index Toggle Pages: 1 [2] 3 4 5
Topic Tools
Very Hot Topic (More than 25 Replies) CGI Error - HTTP Errors (Read 32,585 times)
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 #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 #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 #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
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
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/ /&nbsp;/g;
$quota[1] =~ s/^ +//;
$quota[1] =~ s/ /&nbsp;/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
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
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
 
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
 
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
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
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 #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
 
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 #44 - Jun 29th, 2009 at 9:10am
Post Tools
OH, and one more thing:

Settings.pl will throw a cgi error as it does not contain a shebang, so wouldn't know what to do  Wink
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #43 - Jun 29th, 2009 at 9:07am
Post Tools
fresh 2.4 installed (same problem)
fileviewer available as before

couple of things to consider:
1- .pl scripts in package have shebang '--' switch, some servers don't like it
2- I tried the '-W' switch, didn't like it

3- now have no switch

4- I only ever ran NT and 2003 and, provided the perl directory is on the root of C (C:\perl), shebang should be
'C:\perl\bin\perl.exe'  same as the environment path on CPU

NEVER 'C:/perl/bin/perl' unless the environment path has been manually changed!! both must be the same.

I only mention that to you when testing my pl files

Lou
  
Back to top
 
IP Logged
 
louwk
YaBB Newcomer
*
Offline



Posts: 31
Re: CGI Error - HTTP Errors
Reply #42 - Jun 29th, 2009 at 8:43am
Post Tools
OK, here is what I'll do right now:
clean install vs 2.4

As I said earlier, I tried to run 'advanced_settings.pl' vs 2.3.1, just to see what would happen. Well, it ran fine, except when saving some settings, it tried to write to something which it could find; no surprise, as it was running in 2.4

I assume, therefore, that it might have written to something, which just clashes with whatever you are doing.

So, clean install, fileviewer stays, get what you need

Lou
  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: CGI Error - HTTP Errors
Reply #41 - Jun 28th, 2009 at 10:09pm
Post Tools
@louwk -

I'm sorry, I was little unclear, TickToo is not posting at the moment so the questions/remarks were for you.

I just went in and downloaded the Settings.pl I file asked you to look at.

I saved it locally as Latest_Settings.pl

This is what I find when I open it in my code editor:

Code
Select All
<html><head><title>Error</title></head><body><head><title>Error in CGI Application</title></head>
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not returning a complete set of HTTP headers.</body></body></html> 



Strange, huh?

Shocked
  

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