Forum Moderators: coopster & phranque

Message Too Old, No Replies

Athena webserver script, need help!

I messed this up and need to fix it.

         

webmstr

3:25 am on Mar 12, 2005 (gmt 0)

10+ Year Member



I am a webmaster for a library, and was trying to change the background color on their athena.pl file....well I did something stupid (hindsight is 20/20) and I copied the file to notepad, and found the background color...then saved it and put it back on the server in the same spot. Well, it didn't work, and it now won't even pull up the card catalog. This error message comes up...

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

syntax error at C:\ATHWEB\CGI\athweb.pl line 2244, near "print"
Missing right bracket at C:\ATHWEB\CGI\athweb.pl line 4066, at end of line
Execution of C:\ATHWEB\CGI\athweb.pl aborted due to compilation errors.

Okay, so I guess it isn't as easy as just switching out the hex color. Maybe by saving it in notepad it messed it up.

Any help would be appreciated. The original athena.pl is gone...I would need to fix this file
TIA~

wruppert

4:58 am on Mar 12, 2005 (gmt 0)

10+ Year Member



The script is not working because you introduced a syntax error into the program. Likely a very simple typo of some sort around line 2244. Possibly just before that line.

Compile the program at the command line:
perl -c C:\ATHWEB\CGI\athweb.pl

You should clearly see the errors there.
If you can't find your typo, post line 2240-2250 or so and someone will probably spot it.

webmstr

5:33 am on Mar 12, 2005 (gmt 0)

10+ Year Member



Well I don't know how to compile, and don't have a program to do it I don't think....and I can't see what the line numbers are in Notepad.

I am not a programmer so this is why I am in this mess! lol

If there is a program I need to download to get this information so that I can post it let me know.
thanks again:-)

kaled

11:57 am on Mar 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you upload in ascii mode.

Windows uses <CR><LF> as linebreaks but unix typically uses just <LF> (I think). If you uploaded in binary mode, the script is likely to fail. Having said that, I would not expect the error messages you are seeing.

Otherwise, you could download ActivePerl (it's free) and try to compile what you have. The error messages may be cryptic but someone here may be able to help.

Alternatively, ask admin to restore the original file from backup.

Kaled.

wruppert

3:10 pm on Mar 12, 2005 (gmt 0)

10+ Year Member



My copy of Notepad (WinXP prof) has a "View" menubar item with a "Status Bar" item. Select that item to activate the status bar, if it is not already checked. The line number appears in the lower right hand corner after "Ln". ("Col" is the column number within that line.) With that info in hand, you should be able to post lines 2240-2250.

Did you try to type "perl -c C:\ATHWEB\CGI\athweb.pl" at the command prompt? The "-c" option is how you check the syntax of a perl program without actually running it.

webmstr

3:40 pm on Mar 12, 2005 (gmt 0)

10+ Year Member



well, I looked at my notepad here at home, and it doesn't have the ability to check the status bar or goto...however, when I get to the library on Monday, (since the director won't be able to go today) I will get the file and then see if I can't use the status bar on her version of notepad, and then I will post those lines.
Thank you guys!
till Monday!

webmstr

12:34 pm on Mar 15, 2005 (gmt 0)

10+ Year Member



I lucked out. The library had a backup folder with the file in it. Thank you all for your help however!