[help] Problem with Perl and Apache

Hello Aqua-Softians!

I am very close to finally completing my website redesign, www.seph.ws.

I offer my CV as a downloadable file and I wanted to keep track of the downloads and such, so, i went and downloaded a script (perl, cgi) that seemed to cover my needs.

I followed all the instructions, the admin.cgi works, however, in the CV section, when i click on download it gives me a 500 error. I then proceeded to check the error logs of the server and it says "premature end of script header", so, as usual, i went to google and searched for the causes, checked for it to be encoded in UNIX, done; checked for the print commands to be specifying HTML, done; and many more.

I then proceeded to add "use CGI::Carp qw(fatalsToBrowser);" under the perl path as to be able to debug and the message i get is:

syntax error at download.cgi line 87, near "$content=~ s/%(..)/pack(""

Execution of download.cgi aborted due to compilation errors.

if i go to line 87, i find the following...

...

$content=~ s/%(..)/pack("c",hex($1))/ge;

$fields{$key}=$content;

...

And i dont know what that means, among the languages i know, perl is not one of them.

I attach the file as a zip so that maybe someone can be kind enough to help me out. Else, if someone knows of a good working script to do what i needed, i can avoid all this crap :P

Thanx in advance!

PS: Yes, CHMOD is set to 755 on the files ;)

// Seph

thescript.zip

Attachment: thescript.zip

#253580

I do notice that on line 87, there is a space between =~ and s/%(..)/pack("c",hex($1))/ge; while on other lines it doesn't have that space.

#253585

:( i tried that, re-uploaded and still the same problem

Thank you for taking the time, i appreciate it.

#253594

Thank you all for your comments :)

... After a long night of nasty debugging and some 10 perl introductory tutorials, i got the damn cricket abuser to work :)

Thanx again for those of you who took the time to read it, i know it was a long post...

I would post what i did to fix it, but after sooo many things i tried, i dont even know what it was :confused:

#253724

Good to hear that it's working Seph.

Nice site design.

#253747

Thank you kjwebb :) - gotta try to remember what the hell i did hehehe.

#253749