If you are getting the "Premature end of script headers" you are set up to be 
executing the script.  There is another problem.  When you execute the script 
on the command line, is the first pice of output:

Content-type: text/html



(with 2 blank lines following)?

If its not, that is what apache is complaining about.  Apache leaves the 
headers up to the scripts, so you need (at the very least) to send the 
content type.  A simple script to make sure everything is working would be 
this:

#!/bin/perl -w
print "Content-type: text/html\n\n";
print "Hello World";


If that dosnt work, then there are other errors, and let us know.


Jay




On Thursday 13 September 2001 09:53 pm, you wrote:
> Greetings everyone,
>
> Got a small problem. I have APache running on a test server at home,
> with perl and mysql. So far, so good.
>
> Now, I want to add perl/cgi capability, so I can run a couple of perl
> scripts that I wrote a long time ago. Anyhoo, the scripts run ok from
> the command line, except for the fact that they don't have an http
> request string to use in the environment variable -- the point is, the
> perl interpreter says everything is ok with the scripts.
>
> However, Apache will simply not run my scripts from my user directory! I
> even created a really simple script, to see if Apache was barfing on
> something within the script in spite of perl itself saying it was ok.
> Apache won't even run a simple perl script. The error is the infamous,
> "Premature end of script headers".
>
> Scripts seem to run fine in /home/httpd/cgi-bin/, but not in my home
> directory (/home/user/www/cgi-bin/, where 'www' is set up as the
> UserDir).
>
> As far as I can tell, I have things configured to allow user cgi's in
> /home/user/www/cgi-bin/.
>
> Why won't Apache run scripts from my home web directory???
>
> I can copy the relevant parts of the config files if anyone deems it
> necessary. Otherwise, I am hoping I can simply get a pointer to some
> docs or other help, as I have run out of ideas.
>
> Dave

-- 
Jay Kline
list at slushpupie.com
http://www.slushpupie.com
--
Another good night not to sleep in a eucalyptus tree.