PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Premature End Of Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Premature End Of Script

    I have been reading and working on this issue till the morning but I can not find a solution yet. So I decided to post it here.

    This is a part of my error log.
    [Wed Apr 28 12:29:14 2010] [error] [client 88.254.120.15] (2)No such file or directory: exec of '/var/www/ftp/asmarsiv.com/cgi-bin/search.cgi' failed, referer: http://www.asmarsiv.com/arsive_gozat.php
    [Wed Apr 28 12:29:14 2010] [error] [client 88.254.120.15] Premature end of script headers: search.cgi, referer: http://www.asmarsiv.com/arsive_gozat.php
    I removed suexec.

    This is httpd.conf
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    # Order deny,allow
    # Deny from all
    </Directory>
    #LoadModule rewrite_module modules/mod_rewrite.so
    #Listen 85.25.78.28:9999
    RLimitMEM 1073741824 1610612736
    RLimitCPU 300 420
    Timeout 300
    AddHandler cgi-script .cgi
    This is a part of my sites config file
    # CGI Directory
    ScriptAlias /cgi-bin/ /var/www/ftp/asmarsiv.com/cgi-bin/
    <Location /cgi-bin>
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
    AddHandler cgi-script cgi
    </Location>
    Still the search.cgi script gives the same error.

    Any solution?

    By the way a Hello World perl script runs fine.
    I am uploading all the files in a rar file to the server and then extracting them.

    search.cgi works on ubuntu 8.04 x64. Is the x64 architect of ubuntu cause this?
    Last edited by Computeus; Apr-28-2010, 07:33 PM.

  • #2
    To start with see this FAQ,
    Q. I get a "Premature end of script" error

    By the way a Hello World perl script runs fine.
    As pointed out in the FAQ, the search.cgi is not a Perl script, and in fact having the Perl interpreter configured to handle all CGI requests is a common server configuration error.

    As a first step in checking that it runs on your server, you should be able to Telnet into your server and run search.cgi from the Unix command line.

    Comment


    • #3
      Originally posted by wrensoft View Post
      To start with see this FAQ,
      Q. I get a "Premature end of script" error



      As pointed out in the FAQ, the search.cgi is not a Perl script, and in fact having the Perl interpreter configured to handle all CGI requests is a common server configuration error.

      As a first step in checking that it runs on your server, you should be able to Telnet into your server and run search.cgi from the Unix command line.
      I changed the OS from Ubuntu x64_86 to Debian x86 with the same settings. And search.cgi works fine.

      Comment

      Working...
      X