Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

The Infamous Premature end of Script error

Quote Reply
The Infamous Premature end of Script error
Hello all, I'm trying this as a last resort before I switch to something new and I'm really hoping that someone can help me resolve this problem. I've read many, many posts, checked, double checked, and triple checked my configuration files, directories, permissions and can still not get rid of the bloody Error 500-Premature end of script : admin.cgi.

Here is my story. I downloaded the Links 2 zip file from the Gossamer-Threads website to my Windows 2000 PC. I unzipped the files using WinZip, then used notepad to modify the Links.cfg file and the path to my Hosting Providers Perl (for all .cgi files), then I used WSFTP to upload the modified files to my Hosting Providers server.

I have verified the following

- Hosting Provider (Logicore) supports CGI, and has Perl v5.8.0-88.3
- Logicore also says they support perl-CGI 2.81-88.3 (not sure if this matters)
- path to Perl is /usr/bin/perl (which I have changed on all CGI files)
- Permissions on the files and directories are correct. (I set these myself and double checked)
- Logicore runs Apache (Red Hat Linux) servers


I've also tried just unzipping the file using WinZip, uploading the unmodified files to my server, then editing them directly on the server using my admin console File Manager. This also did not work.

The only thing that I can think of that there are these CR/LF characters in the files that the server does not like, or that WinZip is not a good program to use to unzip the master Links 2.0 files. I don't know what program I can use (in Windows) that will show me whether or not there are these CR/LF. I am no expert, but have enough knowledge to get by.

One question I might have is the following:
When specifying paths there are two types that I see.
1. the path the server's Perl. I'm told this is /usr/bin/perl. So this tells me that from the root of the server there is a directory /usr, then bin, then perl. I have no problem with this.

2. The path to my configuration files (for my site). I only have a portion of the server's space represented by a "virtual" directory. My admin login get's me to / where I can go up, however logically beneath / there are probably other directories for other users (eg. /usr/vhosts/<your virtual dir>/) Am I supposed to use the "virtual path" or the "absolute path"? Does my Hosting Provider need to do something to the permissions in the /usr/bin/perl directory for my application to be able to recognize it is there?

Can anyone give me some advise on what to try next?
Quote Reply
Re: [Caper] The Infamous Premature end of Script error In reply to
When you set the path to perl, you did leave in the hash-bang, didn't you?

#!/usr/local/bin/perl

You need absolute paths, your host should have provided this information for you. Read this for more info:

http://theonetruechurch.com/resource/index.shtml


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] The Infamous Premature end of Script error In reply to
Thank you PerlFlunkie,

Yes I did leave in the hash-bang. I'll check out the link that you sent. I also discovered that no one else on my Host provider's server is running cgi, so it may not be setup correctly. They have enabled some log files for me to have a look.

I'll be in touch. Thanks again.
Quote Reply
Re: [Caper] The Infamous Premature end of Script error In reply to
We are using plesk 7.0 with redhat 9 and having same problem if we use

/usr/bin/perl it gives error
/usr/bin/perl -w it works
/usr/bin/perl -T it gives error

fatal error: Insecure dependency in open while running with -T switch at nph-build.cgi line 693, line 1.

What is this error
Megrisoft
Web Hosting Company
India Software Company
SEO Company