• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Premature end of script headers

RickD75

New Pleskian
Hi All,

We have migrated an old Plesk server (7.5) to Plesk 11. It seems everything worked out well, but we face one issue. Websites are not allowed to execute Perl script within the cgi-bin directory. Example: formmail.pl (chmod 755)

Error_log reports: Premature end of script headers. Anyone got an asnwer to this issue?

[Sun Feb 17 17:24:42 2013] [error] [client 192.168.1.220] failed to open log file /var/log/httpd/suexec_log
[Sun Feb 17 17:24:42 2013] [error] [client 192.168.1.220] fopen: Permission denied
[Sun Feb 17 17:24:42 2013] [error] [client 192.168.1.220] Premature end of script headers: formmail.pl

Thanks!
 
Check the ownership on the cgi-bin directory. It is likely to be wrong. This happened to me too after a migration.

Cross-check with a domain that you create on the new server from scratch for the right way for the owenership to be set. It is either domainuser.psacln or domainuser.psasrv. One of these gives you the error, the other is the right one. I'm afraid I don't remember exacly which one it is supposed to be :-(
 
Dear Faris,

I have created a new domain on the server, this is what I have found:

drwxr-x--- 3 user-new-domain psaserv 4096 Feb 18 21:12 cgi-bin
drwxr-x--- 2 user-mig-domain psaserv 4096 Feb 17 17:24 cgi-bin

So, user-mig-domain is the dir thats migrated from the old server. user-new-domain is the new created cg-bin dir. Can you see anything wrong with it?
 
Argh! Those look fine and match mine. I thought it would be a simple fix :-(

What about the permissions on the file itself? Try adjusting those?
 
The problem has been solved now, in my case it was caused by a missing Perl Package 'perl-CGI' that was not installed correct or not installed at all. An easy way to find out:

[root@machine cgi-bin]# perl formmail.pl

If you get an error, like 'Can't locate CGI.pm' it's most likely the Perl Package is missing.
 
Back
Top