Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Build all error - invalid token

Quote Reply
Build all error - invalid token
Build all has stopped working successfully for us. We have updated Perl, and the XML:Parse and XML:Simple modules.

Here is the error:
Building category Health & Beauty ...
Links: 8
Done

Building category Holiday & Seasonal ...
Links: 3
Done

Building category Housewares, Home Goods ...
Links: 12
Building subpage: 2
Content-type: text/html

Software error:

not well-formed (invalid token) at line 153, column 133, byte 7880 at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 187



For help, please send mail to the webmaster (tech@samsa.com), giving this error message
and the time and date of the error.




A fatal error has occured:
[Mon Aug 22 10:53:35 2005] nph-build.cgi: [Mon Aug 22 10:53:35 2005] nph-build.cgi: not well-formed (invalid token) at line 153, column 133, byte 7880 at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 187

Please enable debugging in setup for more details.

Stack Trace ====================================== Links (76974): Links::environment called at /home/wholesaleroom/www/cgi-bin/admin/Links.pm line 524 with no arguments. Links (76974): Links::fatal called at /usr/local/lib/perl5/site_perl/5.8.7/CGI/Carp.pm line 314 with arguments ([Mon Aug 22 10:53:35 2005] nph-build.cgi: [Mon Aug 22 10:53:35 2005] nph-build.cgi: not well-formed (invalid token) at line 153, column 133, byte 7880 at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 187 ). Links (76974): CGI::Carp::realdie called at /usr/local/lib/perl5/site_perl/5.8.7/CGI/Carp.pm line 400 with arguments ([Mon Aug 22 10:53:35 2005] nph-build.cgi: [Mon Aug 22 10:53:35 2005] nph-build.cgi: not well-formed (invalid token) at line 153, column 133, byte 7880 at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 187 ). Links (76974): CGI::Carp::die called at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 192 with arguments ( not well-formed (invalid token) at line 153, column 133, byte 7880 at /usr/local/lib/perl5/site_perl/5.8.7/mach/XML/Parser.pm line 187 ). Links (76974): XML::Parser::parse called at /usr/local/lib/perl5/site_perl/5.8.7/XML/Simple.pm line 339 with arguments (XML::Parser=HASH(0x8f2bea4), XML Output © Copyright 2002-2005 ALDnet Media Group, LLC. All rights reserved. housewares home goods page 2 1 20 20 25 0.09375 seconds                 kustomsites.com         http://www.wholesale411.com/cgi-bin/core/xgo.cgi?sid=8943967688&n=1         Build your own web site - fast, inexpensive and easy. No html or programming skills needed. Pick from over 800 quality designs. Customize colors, images and text. Lots of extras included.         0.06         999991                         webspawner.com         http://www.wholesale411.com/cgi-bin/core/xgo.cgi?sid=8943967688&n=2         The Fast, Easy and Free way to create webpages. Our automated system lets you design and develop customized web pages in minutes - without having to learn HTML. Great for beginners!         0.05         999992 Any information you have would be extremely appreciated. 
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Hi,

Looks like an XML format error. Which additional plugins/globals do you have setup that access XML::Simple and XML::Parser? (i.e my SearchFeedResults plugin).

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Build all error - invalid token In reply to
We have these plugins installed:
Ace_PPC
Category_Adverts
Data_Import
Expire_Links
Multi_Categories
phpAdsNew2
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Mmmm.. very odd. None of those even use XML :/

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Build all error - invalid token In reply to
OK - what additional information can I provide?

Thanks!
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Could you send over LinksSQL admin panel details, so I can take a look? (you'll have to be quick, as I'm finishing for the night in 15 mins =)).

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Build all error - invalid token In reply to
Is this what you need?

Thanks!

Last edited by:

mikestackhouse: Aug 22, 2005, 10:57 AM
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Is this what you need?

System Information Stack Trace ====================================== Links (13741): Links::environment called at GT::Template::_call_func line 821 with arguments (0). Links (13741): GT::Template::_call_func called at /home/wholesaleroom/www/cgi-bin/admin/templates/admin/compiled/setup_env.html.compiled line 52 with arguments (GT::Template=HASH(0x822c22c), Links::environment, 0). Links (13741): GT::Template::parsed_template called at /home/wholesaleroom/www/cgi-bin/admin/GT/Template.pm line 640 with arguments (GT::Template=HASH(0x822c22c)). Links (13741): GT::Template::_parse called at /home/wholesaleroom/www/cgi-bin/admin/GT/Template.pm line 122 with arguments (GT::Template=HASH(0x822c22c), setup_env.html, HASH(0x822c358)). Links (13741): GT::Template::parse called at /home/wholesaleroom/www/cgi-bin/admin/Links.pm line 309 with arguments (GT::Template, setup_env.html, ARRAY(0x822c3ac), HASH(0x822c358)). Links (13741): Links::admin_page called at /home/wholesaleroom/www/cgi-bin/admin/admin.cgi line 49 with no arguments. Links (13741): main::main called at /home/wholesaleroom/www/cgi-bin/admin/admin.cgi line 23 with no arguments. System Information ====================================== Perl Version: 5.008007 Links SQL Version: 2.2.0 Running under mod_perl: No Running under SpeedyCGI: No @INC = /home/wholesaleroom/www/cgi-bin/admin /usr/local/lib/perl5/site_perl/5.8.7/mach /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.7/BSDPAN /usr/local/lib/perl5/5.8.7/mach /usr/local/lib/perl5/5.8.7 . CGI INPUT ====================================== do => page page => setup_env.html CGI Cookies ====================================== __support_check => 1 ENVIRONMENT ====================================== AUTH_TYPE => Basic DOCUMENT_ROOT => /home/wholesaleroom/www GATEWAY_INTERFACE => CGI/1.1 GT_TMPDIR => /home/wholesaleroom/www/cgi-bin/admin/tmp HTTP_ACCEPT => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/pdf, */* HTTP_ACCEPT_ENCODING => gzip, deflate HTTP_ACCEPT_LANGUAGE => en-us HTTP_CONNECTION => Keep-Alive HTTP_COOKIE => __support_check=1 HTTP_HOST => www.wholesaleroom.com HTTP_REFERER => http://www.wholesaleroom.com/cgi-bin/admin/admin.cgi?page=setup_nav.html HTTP_USER_AGENT => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) PATH => /bin:/usr/bin QUERY_STRING => do=page&page=setup_env.html REMOTE_ADDR => 63.85.129.9 REMOTE_PORT => 35128 REMOTE_USER => wholesaleroom REQUEST_METHOD => GET REQUEST_URI => /cgi-bin/admin/admin.cgi?do=page&page=setup_env.html SCRIPT_FILENAME => /home/wholesaleroom/www/cgi-bin/admin/admin.cgi SCRIPT_NAME => /cgi-bin/admin/admin.cgi SERVER_ADDR => 63.85.129.22 SERVER_ADMIN => tech@samsa.com SERVER_NAME => www.wholesaleroom.com SERVER_PORT => 80 SERVER_PROTOCOL => HTTP/1.1 SERVER_SIGNATURE => Apache/1.3.31 Server at www.wholesaleroom.com Port 80 SERVER_SOFTWARE => Apache/1.3.31 (Unix) mod_perl/1.29 AuthMySQL/2.20 PHP/4.3.8 mod_ssl/2.8.19 OpenSSL/0.9.7d UNIQUE_ID => QwoRGT9VgRYAADV3CAw
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Quote:
Is this what you need?

Nope :P I need to be able to look at your admin panel/scripts/globals, to see where it could be coming from. Not a lot I can do based from the error message ;)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Build all error - invalid token In reply to
OK - how do I get it to you? Do you need to log on?
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
Hi,

You can email it to andy @ ultranerds. com , or send it via PM (email is prefered, as its more secure Smile).

Literally just LinksSQL admin panel details should be enough. I can use FileMan to look at your files, and see which ones could be causing the problem.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [mikestackhouse] Build all error - invalid token In reply to
All sorted =) It was down to a "weird" charachter being sent via an XML feed (in a global). Managed to fix it by removing occurences of that charachter :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Build all error - invalid token In reply to
Hi again Andy,

It appears that when we moved this site onto a new server we somehow returned back to the same error when we run the build back in 2005. I believe the code you changed originally was found in a section of the template globals where I see lines with an abnormal rectangle character:$page =~ s// /sig;Can you tell me how you changed the code to fix the error? I tried simply removing all instances of the rectangle - which didn't work. I imagine I need to replace it with something else?

Any assistance greatly appreciated!

Code:
sub {


use XML::Simple;
use LWP::Simple;
#use Data::Dumper;


my $DEBUG = 0;

my $additional_keyword = q|wholesale|;

my $query = $_[0] ||$IN->param('query') ;
$query =~ s/^\s//g;
$query =~ s/\s$//g;
$query =~ s/ /\+/g;
$query =~ s/\//\+/g;
$query =~ s/\W/+/g;
$query =~ s/\+$//g;
$query = lc($query);

# Section 1....
my $url = "http://www.wholesale411.com/cgi-bin/core/xml.cgi?cb=wholesaleroom&q=" . $query;

if ($DEBUG) { print $url . "<BR>"; }

my $page = get($url);
$page =~ s/^.*<\?xml.*\?>//s;

$page =~ s|\Q<BR>||sig;
$page =~ s|\Q<CR>||sig;


if (length($page) < 1) {
return;
}
$page =~ s/([\x7E-\xFF])/"#" . ord($1) . ";"/sge;

$page =~ s// /sig;

my $ref = XMLin($page);
my $link_count = $ref->{searchinfo}->{count};

print "Results: $link_count <BR>" if $DEBUG > 0;

if ($link_count < 1) {
my $back = redo_grab($query,$_[1]);
return $back;
} else {
my $back = grab_results($ref,$_[1]);
return $back;
}


# routine that will try and grab just one of the words from the entry, otherwise it will just use "wholesale"
sub redo_grab {

my $query = $_[0];

my @cut = split /\+/, $query;
push @cut, 'wholesale'; # hard-code the last option...

foreach (@cut) {

chomp;
my $query = $_;

if (length($_) < 4) { next }

$query =~ s/^\s//g;
$query =~ s/\s$//g;
$query =~ s/ /\+/g;
$query =~ s/\//\+/g;
$query =~ s/\W/+/g;
$query =~ s/\+$//g;
$query = lc($query);

# Section 1....
my $url = "";

if ($DEBUG) { print $url . "<BR>"; }

my $page = get($url);
$page =~ s|\Q<BR>||sig;
$page =~ s|\Q<CR>||sig;

if (length($page) < 1) {
return;
}

$page =~ s// /sig;

my $ref = XMLin($page);
my $link_count = $ref->{searchinfo}->{count};

print "Results: $link_count <BR>" if $DEBUG > 0;

if ($link_count < 1) {
next;
} else {
my $back = grab_results($ref,$_[1]);
return $back;
}

}

}

# call with: Links::Utils::grab_results($hashref,$count)
sub grab_results {

my $html_links;
my $count = 0;
my $hashref = $_[0];
my $link_count = $hashref->{searchinfo}->{count};

# if ($link_count && $DEBUG) {
# use Data::Dumper;
# return "<PRE>" . Dumper($hashref) . "</PRE>";
# }


if ($link_count > 1) {
$link_count = $_[1] if($_[1] && $link_count>$_[1]);
for ($count = 0; $count < $link_count; $count++) {

if (!$hashref->{results}->{listing}[$count]->{title}) { next; }

# get the variables all setup...
my $results;
$results->{Description} = $hashref->{results}->{listing}[$count]->{description};
$results->{Title} = $hashref->{results}->{listing}[$count]->{title};
$results->{ShowURL} = $hashref->{results}->{listing}[$count]->{url};
$results->{Links_PPC_Bid}= $hashref->{results}->{listing}[$count]->{bid};
$results->{URL} = $hashref->{results}->{listing}[$count]->{redirect};
$results->{PPCXML} = 'wholesale411.com';

# put the links into HTML format...
$html_links .= Links::SiteHTML::display('link', $results );

}

} else {

if (!$hashref->{results}->{listing}->{title}) { next; }

# get the variables all setup...
my $results;
$results->{Description} = $hashref->{results}->{listing}->{description};
$results->{Title} = $hashref->{results}->{listing}->{title};
$results->{ShowURL} = $hashref->{results}->{listing}->{url};
$results->{Links_PPC_Bid}= $hashref->{results}->{listing}->{bid};
$results->{URL} = $hashref->{results}->{listing}->{redirect};
$results->{PPCXML} = 'wholesale411.com';

# put the links into HTML format...
$html_links .= Links::SiteHTML::display('link', $results );
}

return $html_links;
}


}
Quote Reply
Re: [Hillary] Build all error - invalid token In reply to
I see that Andy has not posted since December 9 - so if any of the forum experts could help me with this issue I would love to hear from you! Thanks.