Bug#869994: sql-ledger: Can't locate bin/mozilla/login.pl in @INC

2017-12-08 Thread Robert J. Clay
Hi Neil!

On Thu, Dec 7, 2017 at 6:48 AM, Neil Redgate  wrote:
> On Wed, 2017-12-06 at 12:46 -0500, Robert J. Clay wrote:
>
> As a reminder;  the title of the bug you opened was changed to the
> following to better reflect the issue with the sql-ledger package:
>
> sql-ledger: Can't locate bin/mozilla/login.pl in @INC
>
> Thank you for changing the title.
>
>> On Sun, Jul 30, 2017 at 4:09 AM, Neil Redgate  wrote:
>
> 
>> I have contacted the developer of sql-ledger and he has given me a couple of
>> suggestions - which I hope to look into later today.
>
>
>And did any of those suggestions help?
>
>Since there is going to be the same issue with any of the more
> recent versions of Perl, I've been wondering if he was going to
> release a new version that fixed the issue...
>
> I contacted the developer, and he offered the following advice -
>
>
> SQL-Ledger code is generic. There is an
>
> eval  { require "sql-ledger.conf"; };
>
> which may call @INC.
>
> comment the line and see if it works.
>
>
> Unfortunately there was no improvement, I did the following -
>
> A) commented out the eval line in admin.pl and login.pl only
> launched admin and login pages separately.
> Both returned 500: Internal Server Error message
> My browser's debugging page states this page "failed to load the resource
> 'favicon.ico' (http://localhost/faviocn.ico)
> favicon.ico is only mentioned in the admin.pl and login.pl files in the
> directory /bin : $form->{favicon} = "favicon.ico";
> In these files, the line immediately preceding it is $form->{stylesheet} =
> "sql-ledger.css";

   That quite likely was due to not being able to find it, which is
part of the problem when the code (like in SQL-Ledgers) assumes that
the 'current directory' is included in the search path in @INC.


>
> B) commented out the eval line in all 26 .pl files in the parent directory
> (including admin and login)
> The same error result occurred: 500: Internal Server Error message
> My browser's debugging page states this page "failed to load the resource"
> 'admin.pl' or 'login.pl' depending on which action I took.

   Possibly the same issue, with it not being able found the scripts...

>
> On my debian system, when perl5.24 was installed, there was a temporary
> workaround to allow apache2 and postgresql to work with perl.
> This involved commenting out the only line (below) in the file
> /etc/perl/sitecustomize.pl -
>
> pop @INC if $INC[-1] eq '.' and !$ENV{PERL_USE_UNSAFE_INC};
>
> If this line was left uncommented, postgresql failed to work through a web
> browser and gave the same message - 500 Internal Server Error
> I understand that perl 5.26 removes the insecurity associated with '.'

   Yes, with Perl 5.26 they dropped having the current directory (".")
in the @INC array altogether, as well as dropping the site customize
line (or even checking for it). that was an option to add it back in
the a sys admin wanted to.


> While investigating the perl-postgresql connection, I came across a bug
> report in debian that the current postgresql 9.6 version could not be
> built/complied against perl 5.26.
> A solution has been targeted for release in "August"
>
> I do not know if this has been achieved?

 I do believe it was  (and since then made it to Testing...) but as I
mentioned then and Gregor also confirmed, that is not something that
was relevant to this issue with SQL-Ledger.


>  Hence, waiting to try again, with a fresh
> testing install and install/configuration of sql-ledger.

   I am most interested in how that goes for you, especially if you
add the same kind of block of code that I did, with the appropriate
path for your install of SQL-Ledger of course.  (Although I'm mostly
interested in the package, and in fact am working on adopting it, I
may try a manual install of a newer version as well...)


> I can access phppgadmin; pgadmin3; phpmyadmin, so I do not think there is a
> problem with a webbrowser interface, postgresql or php

  No, I agree; it's not an issue at the browser end.


> However there is a problem with this - when I try and backup (save to file
> or email) I get the error message -
>
> Wide character in print at SL/AM.pm line 2012 (this is repeated 4 times)
> and a screen of "random text" in lines and no spaces, but beginning with
> Content-Type: application/file: Content-Disposition: attachment;
> filename=ndres-3.2.4-20171207.sql.gz
>
> I have never had this issue when I was able to run 3.24 on my PC
> Have you come across this problem in your experience with sql-ledger?

  No, I haven't;  at least not yet...   Is SQL-Ledger utf-8 safe?
IIRC, postgresql defaults to using utf-8 in it's more recent versions
in new installs...



> Once I have a fresh testing installed, I will let you know how I fared with
> installing and setting up of sql-ledger and whether I can launch the
> package.

> I trust this is acceptable to you?

   Of course it is and I am very 

Bug#869994: sql-ledger: Can't locate bin/mozilla/login.pl in @INC

2017-12-08 Thread Robert J. Clay
Hi Neil!

On Thu, Dec 7, 2017 at 10:26 AM, Robert J. Clay  wrote:
> Note also that I'm still working with the existing version of
> SQL-Ledger in Debian, which is still only 3.08.

  And although the patch I used looks like it resolved the error
(although I was getting it as "Can't locate bin/mozilla/admin.pl in
@INC" without the patch since it was a new install on Debian Testing
and I hadn't gotten to the point of trying a login yet) but other
errors were coming up.instead. But it's also true that the 3.08
version is quite old and it needs to be tested with the v3.25 version
in any case.


> Attempting to build a
> new package based on the new SQL-Ledger v3.25 results in other errors

   Despite those, it looks like I need to try that patch I made with
the SQL-Ledger version 3.25 & see how it works with the newer version,
& see that newer version works on a Debian Testing install without
that "Can't locate" error in the way.  If that at least works, I can
work on resolving the other packaging issues I found.



-- 
Robert J. Clay
rjc...@gmail.com



Bug#869994: Fwd: Bug#869994: sql-ledger: Can't locate bin/mozilla/login.pl in @INC

2017-12-08 Thread Robert J. Clay
-- Forwarded message --
From: Robert J. Clay <rjc...@gmail.com>
Date: Thu, Dec 7, 2017 at 10:26 AM
Subject: Re: Bug#869994: sql-ledger: Can't locate bin/mozilla/login.pl in @INC
To: Neil Redgate <nredg...@ndres.co.uk>


Hi Neil!

Note that I've changed the subject for these emails back to reflect
the current title of the bug.

On Thu, Dec 7, 2017 at 6:48 AM, Neil Redgate <nredg...@ndres.co.uk> wrote:

>
> Please see my embedded comments below -
>
>
> On Wed, 2017-12-06 at 12:46 -0500, Robert J. Clay wrote:
>
> As a reminder;  the title of the bug you opened was changed to the
> following to better reflect the issue with the sql-ledger package:
>
> sql-ledger: Can't locate bin/mozilla/login.pl in @INC
>
> Thank you for changing the title.

   For the email to which you've just replied; I changed it back to
the old subject so that hopefully you would see it more easily,.
   The retitle of the bug itself was done by one of he Debian
Developers who were corresponding with on that bug back then.


> On Sun, Jul 30, 2017 at 4:09 AM, Neil Redgate <nredg...@ndres.co.uk> wrote:
>
>
> I contacted the developer, and he offered the following advice -
>
>
> SQL-Ledger code is generic. There is an
>
> eval  { require "sql-ledger.conf"; };
>
> which may call @INC.
>
> comment the line and see if it works.
>
> Unfortunately there was no improvement, 

I wonder if he (the SQL-Ledger author) has looked at that same Perl
v5.26 reference noted earlier in the bug regarding this issue?

https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/perldelta.pod#Removal-of-the-current-directory-%28%22.%22%29-from-@INC

What I referenced is in that and what I'm going to try is adding the
following code to the scripts, where that path is as it is installed
with the Debian package:

--
BEGIN {
my $dir = "/usr/share/sql-ledger";
chdir $dir or die "Can't chdir to $dir: $!\n";
# safe now
push @INC, '.';
}
--

Note that I say "try" because although I've created a patch that makes
that change in the application scripts, I still need to create a new
LXC container (with Debian Testing or Unstable installed) where I can
test it after building a test version of the SQL-Ledger package with
that patch..
Note also that I'm still working with the existing version of
SQL-Ledger in Debian, which is still only 3.08. Attempting to build a
new package based on the new SQL-Ledger v3.25 results in other errors
(as I noted in the open bug regarding updating the package to that new
version [1]) and I want to see if this patch helps with this issue
before addressing anything else.

I'll follow up further (to you, as well as the bug), later.



Robert J. Clay
rjc...@gmail.com
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862953


-- 
Robert J. Clay
rjc...@gmail.com



Bug#869994: sql-ledger: Can't locate bin/mozilla/login.pl in @INC

2017-07-29 Thread Robert J. Clay
> I will attempt to let the sql-ledger developer know of the situation
> though I am not a subscriber to their forum.

I also am very interested in that;  please let know (or just reply to
the bug) what you find out about it. I was able to find postings about
similar issues in the forums but not ones specific to installations
attempting to use it with Perl v5.26.



-- 
Robert J. Clay
rjc...@gmail.com