Sql ledger using forum..

Discussion in 'General' started by yurtboy1, Nov 21, 2007.

  1. yurtboy1

    yurtboy1 New Member

    http://www.howtoforge.com/ledgersmb_debian_etch_p2
    Thanks for the how to.
    I got stuck in the end with this error
    500 error - Internal Server Error!
    The account is setup with cgi
    and the file/folder are 755
    The error log has this
    Premature end of script headers: login.pl
    Any thoughts?
     
  2. catdude

    catdude New Member

    Is this installed ona machine you have shell access to? If so, try executing login.pl from the command line. That will probably give you an error message that will make troubleshooting a little easier.
     
  3. yurtboy1

    yurtboy1 New Member

    good advice

    here is the error
    maketext doesn't know how to say:
    Version
    as needed at bin/login.pl line 81
    Compilation failed in require at login.pl line 88.

    I will go back and look over my perl setup.
     
  4. yurtboy1

    yurtboy1 New Member

    This is the error from perl Build.pl
    * ERROR: Version 0.53 of Locale::Maketext::Lexicon is installed, but we need version >= 0.56
    ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
    of the modules indicated above before proceeding with this installation.

    Deleting Build
    So I will see about updating this.
     
  5. yurtboy1

    yurtboy1 New Member

    Okay now after running
    perl -MCPAN -e'CPAN::Shell->install("Locale::Maketext::Lexicon")'
    I noticed this earlier but messed up in fixing it then.
    Build test shows this
    and missing Test/Trap.pm
     
    Last edited: Nov 21, 2007
  6. yurtboy1

    yurtboy1 New Member

    Okay Build test says all test pass

    restarted apache and same error?
    Any more thoughts?
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Try
    Code:
    install -f Locale::Maketext::Lexicon
    on the Perl shell.
     
  8. yurtboy1

    yurtboy1 New Member

    Seems it is up to date
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Does
    Code:
    perl Build.pl
    still show the same error?
     
  10. yurtboy1

    yurtboy1 New Member

    I am error free at the console
    root@server1:/var/www/www.rivervalleywebhosting.com/web/ledger# perl Build.PL
    Checking prerequisites...
    Looks good

    Deleting Build
    Removed previous script 'Build'

    Creating new 'Build' script for 'LedgerSMB' version '1.2.8'

    and Build test
    All tests successful.
    Files=6, Tests=1401, 2 wallclock secs ( 0.11 usr 0.01 sys + 1.70 cusr 0.08 csys = 1.90 CPU)
    Result: PASS
    -----------------but still --------------------
    Premature end of script headers: login.pl or admin.pl

    I am will to pay on this one for help?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Any errors in the error.log file of the website?
     
  12. yurtboy1

    yurtboy1 New Member

    Still stuck

    attached is my apache.
    Man this is tough it all works at the concole not he web.
    still getting Premature end of script headers: login.pl
     

    Attached Files:

  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the errors of the apache error log and not the apache configuration file.
     
  14. yurtboy1

    yurtboy1 New Member

    This is a tail of the last 100 or so lines
    [Fri Nov 23 22:55:55 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 22:56:14 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 22:56:15 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 22:58:32 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 22:58:33 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 22:58:34 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:07:22 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:09:08 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:09:56 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:10:03 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:11:50 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:11:51 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:20:24 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:21:32 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:21:44 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:22:32 2007] [error] [client 71.192.7.37] Premature end of script headers: admin.pl
    [Fri Nov 23 23:23:25 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:23:27 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Fri Nov 23 23:29:08 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Sat Nov 24 20:39:03 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Sat Nov 24 20:40:40 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Sat Nov 24 20:43:30 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Sat Nov 24 20:43:32 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl
    [Sat Nov 24 20:56:04 2007] [error] [client 71.192.7.37] Premature end of script headers: login.pl

    Note the pattern ( -:
    But if I run the file at the console it seems to end here
    ------------------last few lines---------
    <input type="hidden" name="path" value="bin/mozilla" />
    <input type="hidden" name="js" value="" />
    <button type="submit" name="action" value="login">Login</button>
    </form>
    </p>
    </td>
    </tr>
    </table>
    <p><a href="admin.pl"
    >Administrative login</a></p>
    </center>
    </body>
    </html>
    ---------------end code------
    As if it is going well?
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Please make sure that the login.pl file uses Unix linebreaks, not Windows linebreaks.
     
  16. yurtboy1

    yurtboy1 New Member

    Since I do not use windows I am not sure

    how they could be that?
    Any thoughts on how it may be?
     
  17. yurtboy1

    yurtboy1 New Member

  18. till

    till Super Moderator Staff Member ISPConfig Developer

    If you open the login.pl file on the shell with a editor like vi, does it contain characters like:

    ^M

    at the end of the lines?
     
  19. yurtboy1

    yurtboy1 New Member

    Here are some screen shots, no M's though

    Again I never touched it with Windows or nano until now.
    I do not use Windows so?
    Thanks for all your help so far,
     

    Attached Files:

  20. pongraczi

    pongraczi Member

    Maybe Solved for you: SQL-Ledger login.pl

    Hi,

    I solved my lighttpd + sq-ledger problem by debugging the issue.
    It seems, in the SL/Form.pm file there is a perl interpreter invocation, which use no path to the interpreter.
    You just add the absolute path to the perl interpreter and everything seems fine now.

    Please note, I used a Hungarian fork of sql-ledger, so, the line number should be different.

    How to fix it?
    • Open SL/Form.pm
    • Locate the redirect subroutine (nearly line #393)
    Original code:
    Code:
    sub redirect {
      my ($self, $msg) = @_;
    
      if ($self->{callback}) {
    
        ($script, $argv) = split(/\?/, $self->{callback});
    
            exec ("perl", $script, $argv);
       
      } else {
        
        $self->info($msg);
        exit;
      }
    
    }
    
    New code:
    Code:
    sub redirect {
      my ($self, $msg) = @_;
    
      if ($self->{callback}) {
    
        ($script, $argv) = split(/\?/, $self->{callback});
    
            exec ("/usr/bin/perl", $script, $argv);
       
      } else {
        
        $self->info($msg);
        exit;
      }
    
    }
    
    You should try to find other perl invocation without absolute path and fix those too.
    That's all.

    Good luck!

    István
     

Share This Page