openwebmail problem - BSD

This is a discussion on openwebmail problem - BSD ; I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot) When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script in my error_log i see the message error premature end of scripts headers in /cgi-bin/openwebmail/openwebmail.pl What wrong? It's the same on all perl scripts! eg ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: openwebmail problem

  1. openwebmail problem

    I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)

    When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script
    in my error_log i see the message
    error premature end of scripts headers in
    /cgi-bin/openwebmail/openwebmail.pl

    What wrong?

    It's the same on all perl scripts! eg dansguardian.pl


  2. Re: openwebmail problem

    On Sun, 18 Sep 2005 23:17:11 +0200, Krzys2 wrote:

    > I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >
    > When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script in
    > my error_log i see the message
    > error premature end of scripts headers in
    > /cgi-bin/openwebmail/openwebmail.pl
    >
    > What wrong?
    >
    > It's the same on all perl scripts! eg dansguardian.pl


    Try and run it in a terminal and see what errors you get
    --
    Hardware, n.: The parts of a computer system that can be kicked

    The best way to get the right answer on usenet is to post the wrong one.


  3. Re: openwebmail problem

    Shane wrote:
    > On Sun, 18 Sep 2005 23:17:11 +0200, Krzys2 wrote:
    >
    >
    >>I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >>
    >>When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script in
    >>my error_log i see the message
    >>error premature end of scripts headers in
    >>/cgi-bin/openwebmail/openwebmail.pl
    >>
    >>What wrong?
    >>
    >>It's the same on all perl scripts! eg dansguardian.pl

    >
    >
    > Try and run it in a terminal and see what errors you get

    Via terminal all scripts generates right web pages. No error generate in
    /var/www/logs/error_log

    What next?

  4. Re: openwebmail problem

    On Mon, 19 Sep 2005 00:59:24 +0200, Krzys2 wrote:

    > Shane wrote:
    >> On Sun, 18 Sep 2005 23:17:11 +0200, Krzys2 wrote:
    >>
    >>
    >>>I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >>>
    >>>When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script
    >>>in my error_log i see the message
    >>>error premature end of scripts headers in
    >>>/cgi-bin/openwebmail/openwebmail.pl
    >>>
    >>>What wrong?
    >>>
    >>>It's the same on all perl scripts! eg dansguardian.pl

    >>
    >>
    >> Try and run it in a terminal and see what errors you get

    > Via terminal all scripts generates right web pages. No error generate in
    > /var/www/logs/error_log
    >
    > What next?


    nc -vvv
    GET /cgi-bin/openwebmail/openwebmail.pl HTTP/1.0



    --
    Hardware, n.: The parts of a computer system that can be kicked

    The best way to get the right answer on usenet is to post the wrong one.


  5. Re: openwebmail problem

    > nc -vvv
    > GET /cgi-bin/openwebmail/openwebmail.pl HTTP/1.0
    >

    nc -vvv ipserver 80
    Connection to ipserver 80 port [tcp/www] succeeded!
    GET /cgi-bin/openwebmail/openwebmail.pl HTTP/1.0

    HTTP/1.1 500 Internal Server Error
    Date: Mon, 19 Sep 2005 18:20:49 GMT
    Server: Apache/1.3.29 (Unix) PHP/4.3.11 mod_ssl/2.8.16 OpenSSL/0.9.7d
    Connection: close


    Content-Type: text/html; charset=iso-8859-1



    500 Internal Server Error

    Internal Server Error


    The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.


    Please contact the server administrator,
    mydomain and inform them of the time the error occurred,
    and anything you might have done that may have
    caused the error.


    More information about this error may be available
    in the server error log.




    Apache/1.3.29 Server at www.mydomain Port 80



    The error_log add line:
    Premature end of script headers: /cgi-bin/openwebmail/openwebmail.pl

    K.

  6. Re: openwebmail problem

    On Sun, 18 Sep 2005 23:17:11 +0200
    Krzys2 wrote:

    > I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >
    > When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script


    > in my error_log i see the message
    > error premature end of scripts headers in
    > /cgi-bin/openwebmail/openwebmail.pl
    >
    > What wrong?
    >
    > It's the same on all perl scripts! eg dansguardian.pl
    >

    Are you running apache in a chroot? The default apache in OpenBSD was
    chrooted causing people to have to put everything they need for their
    CGI into the chroot environment. The "-u" option will stop it from
    running chrooted.

    I am back on 3.6 so I don't know if OBSD 3.8 still uses chroot for
    Apache. Its a nice idea though.

    Now I have to upgrade. Can't keep up with this team.

  7. Re: openwebmail problem

    Vlad D. Markov wrote:
    > On Sun, 18 Sep 2005 23:17:11 +0200
    > Krzys2 wrote:
    >
    >
    >>I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >>
    >>When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script

    >
    >
    >>in my error_log i see the message
    >>error premature end of scripts headers in
    >>/cgi-bin/openwebmail/openwebmail.pl
    >>
    >>What wrong?
    >>
    >>It's the same on all perl scripts! eg dansguardian.pl
    >>

    >
    > Are you running apache in a chroot? The default apache in OpenBSD was
    > chrooted causing people to have to put everything they need for their
    > CGI into the chroot environment. The "-u" option will stop it from
    > running chrooted.
    >
    > I am back on 3.6 so I don't know if OBSD 3.8 still uses chroot for
    > Apache. Its a nice idea though.
    >
    > Now I have to upgrade. Can't keep up with this team.


    All perl and perllib files i moved to chroot directory. The error
    messages are the same.

  8. Re: openwebmail problem

    Krzys2 wrote:
    > I installed openwebmail-2.51 port on OBSD 3.8 current (snapshot)
    >
    > When i run directly mydomain/cgi-bin/openwebmail/openwebmail.pl script
    > in my error_log i see the message
    > error premature end of scripts headers in
    > /cgi-bin/openwebmail/openwebmail.pl
    >
    > What wrong?
    >
    > It's the same on all perl scripts! eg dansguardian.pl


    Have you enabled 'suexec' for Apache? Type:
    -> httpd -l

    to see if it's enabled (says at the bottom). I don't remember exactly
    how to enable it, but I remember it's setting a chmod flag (execute or
    sticky maybe) on the suexec wrapper.


  9. Re: openwebmail problem

    unbending wrote:
    > Have you enabled 'suexec' for Apache? Type:
    > -> httpd -l
    >
    > to see if it's enabled (says at the bottom). I don't remember exactly
    > how to enable it, but I remember it's setting a chmod flag (execute or
    > sticky maybe) on the suexec wrapper.
    >


    file suexec exsists in /var/www/usr/sbin/ (it's safe??)
    httpd -l
    :
    suexec: disabled; invalid wrapper /usr/sbin/suexec

  10. Re: openwebmail problem

    Krzys2 wrote:
    > file suexec exsists in /var/www/usr/sbin/ (it's safe??)
    > httpd -l
    > :
    > suexec: disabled; invalid wrapper /usr/sbin/suexec


    It's in the right place (/usr/sbin/suexec). Type the following:

    -> chmod +s /usr/sbin/suexec

    Then check to see if it's enabled and try your script again.


  11. Re: openwebmail problem

    unbending wrote:
    >
    > It's in the right place (/usr/sbin/suexec). Type the following:
    >


    yes

    > -> chmod +s /usr/sbin/suexec
    >
    > Then check to see if it's enabled and try your script again.


    ok. suexec: enabled

    and the error messages are the same

    K


  12. Re: openwebmail problem

    Krzys2 wrote:
    > All perl and perllib files i moved to chroot directory. The error
    > messages are the same.


    Sorry, I forgot about this thread...

    You should first try running Apache without the chroot ('-u' option).
    If the script works, you didn't copy everything. One thing that comes
    to mind, though... Scripts normally have a '#!' at the top of the file
    pointing to the program that's supposed to execute them. Did you change
    that to reflect the location of perl in the chroot? Or, did you
    recreate the layout when you copied perl?


  13. Re: openwebmail problem

    Krzys2 wrote
    > All perl and perllib files i moved to chroot directory. The erro
    > messages are the same


    Sorry, I forgot about this thread... :

    You should first try running Apache without the chroot ('-u' option)
    If the script works, you didn't copy everything. One thing that come
    to mind, though... Scripts normally have a '#!' at the top of the fil
    pointing to the program that's supposed to execute them. Did you chang
    that to reflect the location of perl in the chroot? Or, did yo
    recreate the layout when you copied perl



+ Reply to Thread