On 12/03/2020 03:42 AM, Michael wrote:
> On Thursday, 3 December 2020 04:09:15 GMT the...@sys-concept.com wrote:
>> When I try to configure sql-ledger, /localhost/sql-ledger/index.html
>> I get an error:  Forbidden: You don't have permission to access this
>> resource.
>>
>> Apache starts normally but there is an entry in /var/logs/apache/error_log 
>> (how to make it go way)
>>
>> [:notice] [pid 5015] ModSecurity for Apache/2.9.3
>> (http://www.modsecurity.org/) configured. [:notice] [pid 5015] ModSecurity:
>> APR compiled version="1.7.0"; loaded version="1.7.0" [:notice] [pid 5015]
>> ModSecurity: PCRE compiled version="8.44 "; loaded version="8.44
>> 2020-02-12" [:notice] [pid 5015] ModSecurity: LIBXML compiled
>> version="2.9.10" [:notice] [pid 5015] ModSecurity: Status engine is
>> currently disabled, enable it by set SecStatusEngine to On.
>> [mpm_prefork:notice] [pid 5016] AH00163: Apache/2.4.46 (Unix)
>> OpenSSL/1.1.1g PHP/7.4.11 configured -- resuming normal operations Wed Dec
>> 02 20:38:26.746392 2020] [core:notice] [pid 5016] AH00094: Command line:
>> '/usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D
>> LANGUAGE -D PHP -D SECURITY -d /usr/lib64/apache2 -f
>> /etc/apache2/httpd.conf' [authz_core:error] [pid 4900] [client ::1:46226]
>> AH01630: client denied by server configuration:
>> /usr/local/sql-ledger/index.html
>>
>>
>> The above error log entry has nothing to with the below configuration except
>> the last line: [authz_core:error] [pid 4900] [client ::1:46226] AH01630:
>> client denied by server configuration: /usr/local/sql-ledger/index.html
>>
>> My sql-ledger_apache.config  2.4 config
>>
>> Alias /sql-ledger /usr/local/sql-ledger/
>> <Directory /usr/local/sql-ledger>
>>   AllowOverride All
>>   AddHandler cgi-script .pl
>>   AddDefaultCharset On
>>   Options ExecCGI Includes FollowSymlinks
>>   Require ip 10.0.0.109
>> </Directory>
>>
>> <Directory /usr/local/sql-ledger/users>
>>   Require all denied
>> </Directory>
>>
>> All the configuration entries are in main server (not in .htaccess)
> 
> In the first instance try adding double quotes for all paths, e.g.
> 
> Alias "/sql-ledger" "/usr/local/sql-ledger/"
> Directory "/usr/local/sql-ledger">
> ...
> 
> and so on.  Then restart the server.

Thanks Michael, the correct setting is:

Alias /sql-ledger /usr/local/sql-ledger/
AddHandler cgi-script .pl

<Directory /usr/local/sql-ledger>
  Options ExecCGI Includes FollowSymlinks
  AllowOverride all
  Require all granted
</Directory>

<Directory /usr/local/sql-ledger/users>
  AllowOverride none
  Require all denied
</Directory>

But it wasn't my only problem, the old sql-ledger-2.8.35  was not
compatible with the newer software; the solution was to upgrade to newer
sql-ledger-3.2.9 that run with current postgresql-12
But this version of sql-ledger-3.2.9  has a bugs.
The backup script doesn't work correctly.  It works with one database
but, with another database when trying to back it up it  gave an error
(the backup doesn't work):
(The backup worked correctly on sql-ledger-2.8.35)

"Wide character in print at line 2060" and CPU goes 100%

The solution (fix, courtesy of my daughter) is to make a change in the
file:
sql-ledger/SL/AM.pm

(line #2040   add after "my $fields;" line:
 my $myString;

(line #2059   after:
      $fields .= join ',', map { $dbh->quote($_) } @arr;
      $fields .= ")";

------ replace  --------
    print OUT qq|$query $fields;\n|;
}
------ end replace ------

----  with ----------
      $myString = qq|$query $fields;\n|;
      $myString =~ s/[^\x00-\x7f]//g;
      print OUT $myString;
}
--- end with ----------

Hope, it will save somebody hours of trying to troubleshoot this error.

Reply via email to