YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
PERL - script produced no output (Read 4,946 times)
 Mar 8th, 2011 at 2:33pm
There are no actions to perform.  

ayjayef 
Junior Member
**
Offline
Posts: 82


None
PERL - script produced no output
Win2003 Server
IIS6 webserver
running current Activastate perl 5.12.3
and Yabb2.5

After installing a mod I get an error " script produced no output".

Code Select All
Content-type: text/html

'D:\[i](filepath here)[/i]\test3.pl' script produced no output
 



I can recreate the error using:..

Code Select All
#!perl
$blah="fred"
print "<html><head><title>It lives!</title></head><body><h1>It really lives!</h1></body></html>\n";
 



and if I add the semi-colon at the end of line two $blah="fred";
it works fine without error.

So it is a syntax error in one of the many files that this mod modifies.

Is there a trick to getting more detailed errors (eg: which line number at least) out of Perl on a windows machine?
 
 
IP Logged  
 Reply #1 - Mar 14th, 2011 at 1:39pm
There are no actions to perform.  

ayjayef 
Junior Member
**
Offline
Posts: 82


None
Re: PERL - script produced no output
anyone please?
 
 
IP Logged  
 Reply #2 - Mar 18th, 2011 at 11:12pm
There are no actions to perform.  

Monsen 
YaBB Legends (Active)
*
Offline
Posts: 10,103
Bergen, Norway


YaBB 1 Gold
Re: PERL - script produced no output
Try the tricks described at http://www.yabbforum.com/codex/YaBB.pl?num=1217258635, they can help in diagnosing errors.
 
 
IP Logged  
 Reply #3 - Mar 19th, 2011 at 1:41am
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,623
Land of the Blazing Sun!


None
Re: PERL - script produced no output
I need to ask:

Did you post this question in the topic for the particular mod over on BoardMod??

It might also be useful to know which mod it is...

Smiley
 
I find your lack of faith disturbing.
 
IP Logged  
 Reply #4 - Mar 19th, 2011 at 1:29pm
There are no actions to perform.  

ayjayef 
Junior Member
**
Offline
Posts: 82


None
Re: PERL - script produced no output
Monsen wrote on Mar 18th, 2011 at 11:12pm:
Try the tricks described at http://www.yabbforum.com/codex/YaBB.pl?num=1217258635, they can help in diagnosing errors.


Thanks Monsen.  
I tried the (fatals to browser) and even in a known good script it gave the same error.

Code Select All
#!perl

CGI::Carp qw(fatalsToBrowser);

$blah="fred";
print "<html><head><title>It lives!</title></head><body><h1>It really lives!</h1></body></html>\n";

 



the exact same script without the (fatals to browser) line works fine.

Code Select All
#!perl
$blah="fred";
print "<html><head><title>It lives!</title></head><body><h1>It really lives!</h1></body></html>\n";

 






JonB wrote on Mar 19th, 2011 at 1:41am:
Did you post this question in the topic for the particular mod over on BoardMod??


Thanks for the reply Captain John.
No I didnt as its a mod for a different version of YaBB and someone will just tell me its unsuported which is why I'm trying to understand whats going on.

The mod is Carsten's rating mod for v2.4 and I'm installing it in v2.5.
I know someone else that got it going in v2.5 and I'm close but have an error somewhere that I want to troubleshoot... ergo the simple script above that I use to replicate the same error.

It's so frustrating not getting a usable error message!
« Last Edit: Mar 19th, 2011 at 1:31pm by ayjayef »  
 
IP Logged  
 Reply #5 - Mar 21st, 2011 at 12:06pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,623
Land of the Blazing Sun!


None
Re: PERL - script produced no output
Did you run YaBB with debugging turned on???

I will do some more looking at Active Perl, but I do have a strightforward suggestion in the man time.

Open the mod file in a text editor. - its just a series of search & replacement instructions

Note the files affected/modified. you should only be concerned with the .pl files. NOTE some data files ARE.pl files - they are effectively a series of assignment statements - and therefore must obey Perl syntax rules - like statements ending in a semicolon...

Now, using a programmer's editor that supports Perl Syntax (such as notepad++ or Crmson editor);

Open each .pl file, and make sure the editor's syntax/formatiing view is set to Perl.

Now just review the code, it should be all color coded.

IF the problem is a syntax error (as you suspect), you should be able to spot it.

You can alternatively create a test install of YaBB and manually apply the mod, this should likely cause you to 'trip over' the errror (provided it is a syntax error).

I note from a bug report, you have mofdified your code with a fix from carsten (and I don't know if you have any other mods) - other Mods and bug fixes can impact seemingly unrealted pieces of code...

A good thing to do would be to run a code comparator (like WinMerge) with an installed test copy of the original 2.5 code against your installed code.  It will find EVERY difference in the two installs.  This might be just the trick for you...

http://winmerge.org/

I use it to debug and document my code all the time.  When I have sites/applications that have been up for a while, even with conscientous use of self-documentation and read-mes/change files, little code fixes slip by all the time.

I hope one of these suggestions helps you out...

Good Luck
Wink

 
I find your lack of faith disturbing.
 
IP Logged  
 Reply #6 - Apr 21st, 2011 at 5:14pm
There are no actions to perform.  

ayjayef 
Junior Member
**
Offline
Posts: 82


None
Re: PERL - script produced no output
Thanks for all the tips JonB!

I'm embarrased to say that I've been using Crimson Editor for 6 years odd and only just found out from you that I could set the script type.  Nice feature, great editor!

(Sadly) I fixed the problem using brute force.  

I manually edited the files and after each edit reloaded the site to see if it broke.

When I found the step that was breaking it I then broke it down line by line till I found the problems:

Code Select All
$_[0] =~ s/\~/%7E/g;

$_[0] =~ s~%24~$~g;

$_[0] =~ s~%5C~\~g;
 



Thanks again for your tips, even the ones I didnt use this time I'll remember in the future.

Cool
 
 
IP Logged  
 Reply #7 - Apr 21st, 2011 at 6:17pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,623
Land of the Blazing Sun!


None
Re: PERL - script produced no output
Crimson is indeed a great little editor! I keep the portable version on a thumb drive, works great.

Doesn't matter how you found it, its fixed now.  Cool

Thanks for letting us know, and I'm glad its werkin' for ya.

Wink

BTW, if you ever have to move script code that is modified, WInMerge can find all your cumulative changes - the you install clean code and retro-fit all the changes.  will also analyze your config files as well (that may need hand tinkering due to server configuration and version issues with the host software.

Good Luck and brew me a cup!

Smiley
 
I find your lack of faith disturbing.
 
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.