5,001

(4 replies, posted in Translations)

Thanks Joe. The number of downloads since 1st May 2014 (FA v2.3.21 was released in May 2014) shows the US, India and Indonesia leading in that order quite closely but the rest of the world is less than 50% of the lowest of these.

This info should be useful for consultants to offer their services in virgin territories.....or position themselves where the fish are.

WEBROOT=/var/www/frontac
WORKDIR=`pwd`
cd ${WEBROOT}/
wget http://www.apmuthu.com/files/menu_entry.png
# mkdir -p themes/{aqua,cool,default}/images
echo themes/{aqua,cool,default}/images/ | xargs -n 1 cp -f menu_entry.png
rm -f menu_entry.png
cd ${WORKDIR}
WEBROOT=
WORKDIR=

This will make for a clearer Add icon.

5,003

(4 replies, posted in Translations)

It is possible that all .com, .net and .org hostnames are assumed to be from US in AWStats. The sitestats I had put up was for pages that had google analytics / ads in them and relied on GeoIP for source determination. Surprised that Kenya does not figure in the stats between India and Canada. Try updating the GeoIP in AWStats if it is used.

Actually, I find quite a lot of enquiries for FA in India recently and wondered how it grew. "Tally" is the leading brand of Accounting software here in India but customers are getting fed up with the licence activation system now that their servers seem to be getting virus and power related breakdowns frequently. Many are now looking for a skin to ape the Tally look and feel to reduce the learning curve.

I have not run a single commercial install of FA till date and have only supported others installs and that too not in India. FA has been more of an example project to convince wannahaves of the maturity of Open Source.

I would like some repo site stats too to be published - that would be more on the usage side.

Maybe we need a General Topic on the FA Forum.

5,004

(4 replies, posted in Translations)

India, Kenya and Canadian IPs seem to be the biggest visitors according to Google Analytics.

Wiki-ed it.

Ref: Forum Post

The Official Git Mirror clone url is:

git://devel.frontaccounting.com:git/fa-stable

5,007

(2 replies, posted in FA Modifications)

The extension id can be unique if it is parsed from the max value of the id in the array and not from the array count.

When an extension is removed (after de-activation from all domains), will these security parameters too be removed from the security_roles tables and be available for re-use?

Is there any list of security area_identifiers across all official extensions to prevent unintended re-use across ones from different authors?

5,008

(10 replies, posted in Installation)

The browseable url is:
http://devel.frontaccounting.com/git/?p=fa-stable.git

Hope the said port 9418 is open for such cloning.

The IP reverse resolves to my.frontaccounting.com

To troubleshoot, the PortScan will be handy:

<Scan>
    <Info>PortScan</Info>
    <Host>176.31.120.126
        <Hostname>my.frontaccounting.com</Hostname>
        <OpenPort>SSH [22]</OpenPort>
        <OpenPort>SMTP [25]</OpenPort>
        <SMTPServer>220 ks395322.kimsufi.com ESMTP Postfix (Debian/GNU)</SMTPServer>
        <OpenPort>HTTP [80]</OpenPort><OpenPort>imap [143]</OpenPort>
        <IMAPServer>[CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.</IMAPServer>
        <OpenPort>587</OpenPort>
        <HTTPServer>Apache/2.2.16 (Debian)</HTTPServer>
        <HTTPTitle>400 Bad Request</HTTPTitle>
    </Host>
</Scan>

5,009

(9 replies, posted in Modules Add-on's)

The latency from here to your host at both www.garrapato.com and the repo subdomain are about 330 to 350 ms and that may not be an issue as I've worked with far slower ones.

Please delete gz files in the modules/_cache folder and then try again. The code does not bother to retrieve the gz files afresh and relies on existing ones even if their sha1sum is different if they exist locally (YMMV).

Also request how / which file you made as Release.sig.

The automation scripts placed in the farepo folder (permissions 700,  execute as ./getrelease) for creating the various gz files are:

Filename: getconfigs

#!/bin/sh

# Use with
# find ./2.3/extensions/ -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip > Extensions.gz

tar xOzf $1 _init/config |  sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' && 
echo -n SHA1sum: && 
sha1sum $1 | cut -d" " -f1 && 
echo

Filename: getrelease

#!/bin/sh

SRCDIR=./2.3/
RELFILE=${SRCDIR}Release

find ${SRCDIR}extensions/ -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Extensions.gz
find ${SRCDIR}charts/     -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Charts.gz
find ${SRCDIR}languages/  -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Languages.gz
find ${SRCDIR}themes/     -type f -name *.pkg -exec ./getconfigs \{\} \; | gzip -f > ${SRCDIR}Themes.gz

echo Path: charts > ${RELFILE}
echo Type: chart >> ${RELFILE}
echo Filename: Charts.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Charts.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: extensions >> ${RELFILE}
echo Type: extension >> ${RELFILE}
echo Filename: Extensions.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Extensions.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: languages >> ${RELFILE}
echo Type: language >> ${RELFILE}
echo Filename: Languages.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Languages.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
echo Path: themes >> ${RELFILE}
echo Type: theme >> ${RELFILE}
echo Filename: Themes.gz >> ${RELFILE}
echo Version: 2.3 >> ${RELFILE}
echo SHA1sum: `sha1sum ${SRCDIR}Themes.gz | cut -d" " -f1` >> ${RELFILE}
echo >> ${RELFILE}
gzip -f ${RELFILE}

5,010

(10 replies, posted in Report Bugs here)

Fixes needed for negative stock to work and other cosmetic changes:

File: includes/db/sql_functions.inc
Fix: missing end of file closing php tag "?>"

File:  inventory/transfers.php
Fix: Change line 79 from:
global $Refs;
to
global $Refs, $SysPrefs;

File: sales/includes/ui/sales_order_ui.inc
Fix: Remove Line 138:
    global $SysPrefs;'
as it is no longer needed.

****** All these issues and others have been addressed in the subsequent commit. *******

5,011

(10 replies, posted in Installation)

Have you tried Hg2Git mirrorring?

http://stackoverflow.com/questions/1389307/convert-a-mercurial-repository-to-git

https://github.com/vitaly/hg2git

http://repo.or.cz/w/hg2git.git

http://blog.appveyor.com/2014/02/23/converting-mercurial-repository-to-git-on-windows/

http://arr.gr/blog/2011/10/bitbucket-converting-hg-repositories-to-git/

5,012

(9 replies, posted in Modules Add-on's)

I deactivated the cfdi extension for the Sandbox and then tried to delete the cfdi pkg in vain. It appears that there may be some openssl issue in verification. Try to bypass the signed pkg requirement in the first post in this thread and see if that is the problem.

Also please list the steps taken to make the Release.sig file so I can replicate here.

To the extent possible try to avoid using htaccess file and place it's contents in the apache conf directly with no overrides.

In the files admin/inst_module.php (line 42) and includes/packages.inc (line 518), the extensions array element 'active' is assigned as false instead of 0.

During normal usage, the installed_extensions.php files toggle it between 0 and 1 and it is never set as true anywhere. Is this the desired functionality - boolean false on install and then integer 0 / 1 during usage?

5,014

(2 replies, posted in FA Modifications)

$next_extension_id is stored in the {webroot}/installed_extensions.php file.

It is used in:

admin/inst_module.php
admin/db/maintenance_db.inc ---> writing to the installed_extensions file(s)
includes/packages.inc
index.php ----------------------------> set during install on CoAs
sql/alter2.3/php --------------------> updation of extension array elements

In general it is declared as a global variable from within functions and used and sometimes incremented. It is never decremented.

Actually it can be obtained by querying the $installed_extensions array and choosing to be one more than the highest key number or 1 if empty array.

This way we can make the array in each company (must make it a different name) have the same elements for the activated extensions.

Is this extension id stored in any FA table as a foreign key?

A trigger on the bespoke database to populate records in the FA db might be another way out.

5,016

(1 replies, posted in Modules Add-on's)

Well here is the code to make an unsigned pkg for FA:

# Install ar command
apt-get install binutils

# ar usage - not used here
# ar rcs _data customernotes.php hooks.php

MODULENAME=customernotes-2.3.21-1
WEBROOT=/var/www/frontac

mkdir -p ${WEBROOT}/modules/_cache/${MODULENAME}
# upload the _init and extn files
cd ${WEBROOT}/modules/_cache/${MODULENAME}
tar -czf _data customernotes.php hooks.php
tar -czf ../../${MODULENAME}.pkg _init _data
rm -rf ${WEBROOT}/modules/_cache/${MODULENAME}
# download the ${WEBROOT}/modules/${MODULENAME}-2.3.21-1.pkg

The _init/config file will contain the extension description and parameters and will need to be appended to the Extensions file and compressed to Extensions.gz and placed in the repo root. The Extensions.gz's sha1sum should be placed in the Release file and compressed to Release.gz and placed in the repo root.

The _init/files can be prepared by referring the FAWiki.

5,017

(1 replies, posted in Dimensions)

You may want to set a default value for the Dimension id field in the various tables in the meanwhile.

To stay within FA, use Quick Entries or use the TextCart Extension. Otherwise:

1. Take a backup of FA
2. Post a typical entry thru the FA web interface
3. take another backup of FA
4. Compare the backups using tools like WinMerge
5. Skip the normal audit trail and logging entries and focus on the meat of the insert / updates
6. Make a template out of the insert / update sqls making the timestamp entries NOW() where appropriate (and likewise for current date)
7. Export the record variables from your manual invoice system
8. Mailmerge with the sql template created in 6
9 upload the mailmerged sql statements in a MySQL client or append them to the backup and then restore it.
10. Make sure no entries are made / changed in FA in the meanwhile.

5,019

(4 replies, posted in Setup)

Upload your extension and post the link here. Code will be reviewed by the developers and packaged and placed in the official repo if working well.

5,020

(9 replies, posted in Modules Add-on's)

Attempting to visit http://repo.garrapato.com/ results in a "no content here" webpage instead of prompting for a username and password. If you have set no username and password for it's access, then comment out / remove the first two array elements. It should then work.

The extensions did not download within FA but only when manually the URLs were entered in FireFox.

http://repo.garrapato.com/2.3/ seems to be password protected though.

http://repo.garrapato.com/2.3/extensions/cfdi-2.3.0-1.pkg did successfully download after providing the credentials.

http://repo.garrapato.com/2.3/extensions/zen_import-2.3.15-1.pkg also was successfully downloaded without asking for the credentials again and it is the official signed pkg.

Expect you created the Extensions.gz and Release.gz properly (since it displays only a subset including yours), otherwise enable error display and check out the SHA1sums in them if you are manually making it.

Make sure that the FA webroot has the FA.pem file if you are using any official pkgs.

Also see if the same problem arises if FA is installed in the server's webroot:
from
http://garrapato.com/sandbox/fa/
to
http://garrapato.com/

You are using latin1 charset - try utf8 / utf8-general-ci


Did you actually compile the pkgs listed in the repo? If so, please list the method you used right from key creation to pkg creation and repo updation.

5,021

(1 replies, posted in Modules Add-on's)

The standard extensions, themes, languages and charts of accounts are signed by the FA devs (private key will not be divulged) and their public key is part of the FA (FA.pem) download.

The format of the extension packages (pkg) and it's distribution is based on the standard debian repo system and is slightly modified. The functions to achieve it are said to be in the archive.inc and packages.inc files in the includes folder.

A first draft attempt at placing a file with the following contents in a php file in the webroot and then attempting to build a package was tried in vain:

<?php 
$path_to_root=".";
$pkgname='customernotes';
$mypkg = $pkgname . '-2.3.21-1.pkg';
include_once "./config.php";
include_once "./config_db.php";
include_once "./includes/packages.inc";

$pkg = new gzip_file("_data");
$options['prepend'] = PKG_CACHE_PATH.'/'.$pkgname.'/';
$pkg->set_options($options);
$list = Array(
"customernotes.php",
"hooks.php"
);
$pkg->add_files($list);
$pkg->create_archive();
rename('./_data', PKG_CACHE_PATH.'/'.substr(basename($filename), 0, -4).'/_data');
$pkg = new pkg_file($mypkg);
$list = Array(
"_init/*",
"_data"
);
$pkg->add_files($list);
$pkg->create_archive();

?>

The aim is to create a private / public key pair and then build and sign these packages and host them in a personal repo. This way many users will be able to make extensions and distribute them at will. FA can then be made to partake of multiple repos as well. The $repo_auth if used in config.php would take precedence over the one in version.php.

The following standard code from the PHP Manual may be used to generate the PKI keys needed:

<?php
// Fill in data for the distinguished name to be used in the cert
// You must change the values of these keys to match your name and
// company, or more precisely, the name and company of the person/site
// that you are generating the certificate for.
// For SSL certificates, the commonName is usually the domain name of
// that will be using the certificate, but for S/MIME certificates,
// the commonName will be the name of the individual who will use the
// certificate.
$dn = array(
    "countryName" => "UK",
    "stateOrProvinceName" => "Somerset",
    "localityName" => "Glastonbury",
    "organizationName" => "The Brain Room Limited",
    "organizationalUnitName" => "PHP Documentation Team",
    "commonName" => "Wez Furlong",
    "emailAddress" => "wez@example.com"
);

// Generate a new private (and public) key pair
$privkey = openssl_pkey_new();

// Generate a certificate signing request
$csr = openssl_csr_new($dn, $privkey);

// You will usually want to create a self-signed certificate at this
// point until your CA fulfills your request.
// This creates a self-signed cert that is valid for 365 days
$sscert = openssl_csr_sign($csr, null, $privkey, 365);

// Now you will want to preserve your private key, CSR and self-signed
// cert so that they can be installed into your web server, mail server
// or mail client (depending on the intended use of the certificate).
// This example shows how to get those things into variables, but you
// can also store them directly into files.
// Typically, you will send the CSR on to your CA who will then issue
// you with the "real" certificate.
openssl_csr_export($csr, $csrout) and var_dump($csrout);
openssl_x509_export($sscert, $certout) and var_dump($certout);
openssl_pkey_export($privkey, $pkeyout, "mypassword") and var_dump($pkeyout);

// Show any errors that occurred here
while (($e = openssl_error_string()) !== false) {
    echo $e . "\n";
}
?> 

5,022

(9 replies, posted in Modules Add-on's)

For those on the LAN with no internet connection, a local FA repo can be setup with ability to use unsigned packages. Grab the repo bundle from my GitHub Repo (may not be upto date) and extract it to your locally resolvable domain like: http://localhost.or.localdomain.com/farepo/2.3/ such that the themes, languages, charts and extensions folders are under it.

Now in the config.php file, append the following code:

// LAN repo (0), WAN repo with signed packages (1)

    $repo_sign = 0;

// Comment out parameters not used

    $repo_auth = array(
//         'scheme' => 'http://',        // 'ftp://', 'https://'
//         'login' => '',
//         'pass' => '',
         'host' => 'localhost.or.localdomain.com',
         'path' => 'farepo',             // no leading or trailing slashes (/)
         'branch' => '2.3'             // Repository branch for current sources version
    );

Now edit the function get_pkg_or_list() in includes/packages.inc file:

1. Append the $repo_sign variable to the list of global variables.
2. Replace the line:

        if (openssl_verify($data, $sig, $cert) <= 0) {

with

        if ((!isset($repo_sign) || $repo_sign == 1) && openssl_verify($data, $sig, $cert) <= 0) {

Now the local repo is fully functional since the config.php parameters override the values in version.php.

@joe - can this flag ($repo_sign = true;) and a commented out repo array be included in the config.php file along with the changes in the includes/packages.inc in the mainstream stable distribution itself?

Try Quick Entry - See Wiki

I have not bothered to clone it from the official Git but rather rely on changes from the release to release file sets and then when I have time, I manually get the changed files and vet them before incorporation into my repo - that's why it will lag behind from time to time.

You can however use the hg2git and clone directly from the HG repo.

@itronics maintains the Official Git Mirror and probably he can shed some light.

5,025

(8 replies, posted in Modules Add-on's)

You might also want to look at:
http://www.kvcodes.com/2014/08/create-page-navigation-tables-frontaccounting/

Part II is archived here.