• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

500 internal server error

C

charlz

Guest
I have a helloworld cgi file and keep getting this (error logs say the same "Premature end of script headers: test.cgi "

NOTE: when I run it from the command line <b>it works</b> ./test.cgi
PHP:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "test";

But form browser gives this:

Server error!
The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: test.cgi

If you think this is a server error, please contact the webmaster.

Error 500

After reading through the forums I have made sure that all these things:
1. files and folders are 755
2. was loaded in ascii format
3. CGI is turned on in plesk
4. code is sound (as above) no missing semi-colons etc..
5 psa-suexec is up to date.

What else could be the problem? I have tried it with and w/out mod perl being active all with the same result.

thanks!
 
may sound like a stupid question ( but you did not say so in your post... )

is it in your cgi-bin folder ?
 
Originally posted by jspilon
may sound like a stupid question ( but you did not say so in your post... )

is it in your cgi-bin folder ?

yes it is in there and cgi is enabled.
 
Back
Top