Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued Products: Article Manager 1 Add-ons:
GoForum shows No Output

 

 


rlindomph
User

Jul 10, 2004, 5:39 AM

Post #1 of 4 (14951 views)
Shortcut
GoForum shows No Output Can't Post

I have installed goforum 1.09 with yabbse 1.51, phpbb2, and ikonboard. None of the setup is working

script seems to show no output and after about 10 minutes, the 500 server error comes up and with no cgi error in the log.

I concluded that the scripts are not showing output for whatever reason because if I set incorrect parameter or use invalid thread number, the goforum.cgi gave me the appropriate generated error message. But when the correctly configurated, it is not working.

HELP! It seems to work on everone but me. I know it is something simple, but I can't get it to work.


rlindomph
User

Jul 16, 2004, 2:40 PM

Post #2 of 4 (14833 views)
Shortcut
Re: [rlindomph] GoForum shows No Output [In reply to] Can't Post

Can someone please help me?


Luke
Staff / Moderator


Jul 16, 2004, 5:13 PM

Post #3 of 4 (14827 views)
Shortcut
Re: [rlindomph] GoForum shows No Output [In reply to] Can't Post

Hi rlindomph,

Thanks for the post! :)

Because GoForum relies on 3rd party forum software it's difficult to pinpoint what the exact cause may be. It may be possible that the forums you're setting up are no longer compatible with GoForum.

Here's some options:

The source code for GoForum is made available to the public, so you may be able to find a Perl programmer who can help you update the script so that it works with your forum. We have a list of Perl Programmers who may be able to help you here:

http://www.interactivetools.com/resources/Perl_Programmers.html

Another option, if you want site visitors to comment on your articles, one of our customers recently created a "comments" add-on script for Article Manager. The script is written in PHP and can be downloaded from the following thread:

http://www.interactivetools.com/iforum/P30615/

I wish I could have been more help in getting this up and running. If you have any additional questions or concerns please don't hesitate to let me know. :)

Luke Holzken
Product Development


rlindomph
User

Jul 18, 2004, 12:30 AM

Post #4 of 4 (14821 views)
Shortcut
Re: [Luke] GoForum shows No Output [In reply to] Can't Post

I have spend 4 hours today painstakingly troubleshoot through each lines of the goforum.cgi script.

It appears that ever time the GetPage subroutine is called, the script freezes and after 10 minutes gives a 500 error.

I have GoForum 1.09. My server is hypermart. I wonder if the script is not compatible with my webserver since GetPage calls from webserver. I have the same version of yabbse as ThomasK and he seems to get it to work just fine at http://www.motorcyclesearchengine.com/Articles/

HAS ANYONE GET GOFORUM TO WORK WITH HYPERMART?

Version of Perl: 5.6
Version of PHP: 4.3.3
MySQL version 3.23.49

Article manager 1.38
GoForum 1.09

HELP!!! Thanks.

# ----------------------------------------------------------------------------
# Function : GetPage
# Description : Retrieve a page from a webserver and return it
# Usage : $html = &GetPage("www.host.com/index.html");
# ($headers, $html) = &GetPage("http://www.host.com:8080/detail.html?test=1", {
# 'Referer' => 'http://www.host.com:8080/index.html',
# }, %postdata);
# ----------------------------------------------------------------------------
sub GetPage {
my ($url, $send_headers, $post) = @_;
if ($post && ref($post) ne "HASH") { die("Optional third argument must be a hash ref!"); }

### Parse out hostname, optional port, and file
$url =~ s|\w+://||g; # remove http://
my ($host, $port, $file) = $url =~ m|^(.*?)(?::(\d+))?([/?].*)?$|;
$file ||= '/';

### Headers to send
$send_headers->{'User-Agent'} ||= "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)";
$send_headers->{'Host'} ||= $host;

### For post methods get query info
my($query,$query_length,$method,$postdata);
if ($post) {
$postdata = join '&', map { &URL_Encode($_) .'='. &URL_Encode($post->{$_}) } keys %$post;
$send_headers->{'Content-Type'} ||= 'application/x-www-form-urlencoded';
$send_headers->{'Content-Length'} ||= length $postdata;
$method = 'POST';
} else {
$method = 'GET';
}

my($remote, $html, $get_headers);
$remote = IO::Socket::INET->new( Proto => 'tcp', PeerAddr => $host, PeerPort => $port || 80);
unless ($remote) { die 'Can\'t connect to '.$host; } # display error message
$remote->autoflush(1); # unbuffer socket output
print $remote $method.' '.$file.' HTTP/1.0'."\n"; # set http request (just like a browser)
foreach (keys %{$send_headers}) {
print $remote $_ . ': ' . $send_headers->{$_} . "\n"; # send headers
print STDOUT $_ . ': ' . $send_headers->{$_} . "\n"; # send headers
}
print $remote "\n"; # we've finished sending our headers
print $remote $postdata . "\n\n" if $post; # and send our post data if necessary
while (<$remote>) { $html .= $_; } # read socket data
close($remote);

print STDOUT "Postdata: $postdata\n\n";

### Separate headers from HTML, if there's no \n\n, everything ends up in $html
($get_headers, $html) = $html =~ /^(.*?(?:\r\n|\n)(?:\r\n|\n))?(.*)$/s;
$html =~ s/\r\n/\n/sgo; # remove return chars (\r)

if (wantarray) { return ($get_headers, $html); } # return headers and page content
else { return $html; } # return page content

}

# ----------------------------------------------------------------------------
# URL : URL encoding/decoding Perl routines. URL encoding is an common
# encoding scheme where non A-Za-z0-9+*.@_- characters are replaced
# with a character triplet of "%" followed by the two hex digits.
#
# Usage : $URL_encoded = &URL_Encode("$plaintext");
# : $plaintext = &URL_Decode("$URL_encoded");
# ----------------------------------------------------------------------------

sub URL_Encode {
my($text) = $_[0]; # text to URL encode
$text =~ s/([^A-Za-z0-9\*\.\@\_\-])/ # replace odd chars
uc sprintf('%%%02x',ord($1))/egx; # with %hex value
$text =~ tr/ /+/; # replace " " with "+"
return $text; # return URL encoded text
}

sub URL_Decode {
my($text) = $_[0]; # URL encoded text to decode
$text =~ tr/+/ /; # replace "+" with " "
$text =~ s/%([A-F0-9]{2})/pack('C', hex($1))/egi; # replace %hex with chars
return $text; # return decoded plain text
}

# ----------------------------------------------------------------------------
# ReadForm : Read input from CGI form. Parse input from a
# GET or POST form and return a hash of form names and values.
#
# Usage : %in = &ReadForm();
# ----------------------------------------------------------------------------

sub ReadForm {

my($name,$value,$pair,@pairs,$buffer,%hash); # localize variables
my($file,$path,$ext); # localize variables

binmode(STDIN); # for windows systems

### Read GET or POST form into $buffer (for regular forms)
if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
elsif ($ENV{'REQUEST_METHOD'} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; }

@pairs = split(/&/, $buffer); # Split into name/value pairs
foreach $pair (@pairs) { # foreach pair
($name, $value) = split(/=/, $pair); # split into $name and $value
$name =~ tr/+/ /; # replace "+" with " "
$value =~ tr/+/ /; # replace "+" with " "
$name =~ s/%([A-F0-9]{2})/pack('C', hex($1))/egi; # replace %hex with char
$value =~ s/%([A-F0-9]{2})/pack('C', hex($1))/egi; # replace %hex with char
$name =~ s/\r\n/\n/g; # replace \r\n with \n
$value =~ s/\r\n/\n/g; # replace \r\n with \n

$name =~ s/\x00//g; # remove null bytes
$value =~ s/\x00//g; # remove null bytes

$hash{$name} = $value;
}

return %hash;
}

# prevent artman_db from displaying "Undefined subroutine" error messages
sub _error {
die($@);
}


# ------------------------------------------------------------------------
# Function : INI_Load
# Description : load an ini file into a multilevel ini hash
# Usage : %ini = &INI_Load("$cgidir/file.ini");
# ------------------------------------------------------------------------

sub INI_Load {

### Define values
local(*FILE); # localize filehandle
my($file) = $_[0]; # ini file
my(@lines,$ref,%hash); # scope vars
$ref = \%hash; # reference to hash

### Check for errors
if (!$_[0]) { die "INI_Load : No ini file was specified!\n"; }
if (!-e $_[0]) { die "INI_Load : The ini file '$_[0]' could not be found!\n"; }

# Load file
open(FILE,"<$file") || die("INI_Load : Could open ini file! $!\n");
@lines = <FILE>;
close(FILE);

# parse content and create hash
foreach (@lines) {
/^\s*#/m && next; # skip comments

if (/^\s*\[/m) { # process section heading
$ref = \%hash; # reset ref to hash root
foreach (/\[(.+?)\]/g) { # keep moving deeper in multilevel hash
$ref = \%{$ref->{$_}};
}
next;
}

# load keys and value for section
my $pos = index($_,'='); # get name, value
if ($pos > 0) {
my $name = substr($_,0,$pos); # get name
my $value = substr($_,$pos+1); # get value

# added for goforum 1.09 ini file
$value =~ s/#.*//; # next line added to remove righthand comments (like this one)

foreach ($name,$value) { s/^\s+//; s/\s+$//; } # remove leading/trailing whitespace

# added for goforum 1.09 ini file: removes surrounding single / double quotes.
if (index($value, "'")==0 || index($value, "\"")==0) {
$value = substr($value, 1, length($value)-1);
}
if (index($value, "'")==length($value)-1 || index($value, "\"")==length($value)-1) {
$value = substr($value, 0, length($value)-1);
}

$name =~ /[^a-zA-Z\/0-9_\-]/ && die("INI_Load : Invalid key '$name' in ini file '$file'!\n");
defined $ref->{$name} && die("INI_Load : Key '$name' defined twice in ini file '$file'!\n");
$ref->{$name} = $value; # add to hash
}
elsif ($pos == -1) { # assume value of 1 if no value assigned
my $name = $_;
for ($name) { s/^\s+//; s/\s+$//; } # remove leading/trailing whitespace
if (!length $name) { next; }
#`new` - chris - 28/05/2001 3:49PM - we can allow alternate characters in lists, no?
#$name =~ /[^\w]/ && die("INI_Load : Invalid key '$name' in ini file '$file'!\n");
defined $ref->{$name} && die("INI_Load : Key '$name' defined twice in ini file '$file'!\n");
$ref->{$name} = 1; # add to hash
}

}

return %hash; # return hash of ini values

}

# ----------------------------------------------------------------------------

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4