Those who had been using any FA earlier version in OpenVZ can upgrade using the bash code above. Those who are going to use it for a new FA 2.4.2 installation and want all my mods can modify the above bash scrip and add the apache/php/mysql dependencies in a standard install using a Debian Squeeze template possibly using a debian bootstrap.

2,627

(11 replies, posted in Announcements)

Do not install Fixed Assets extension for FA 2.4.2. It is a native application in FA 2.4.x series - there will be a tab for it. As the Company Admin, login and enable the permission for Fixed Asset Setup for the roles you want, logout and login as such a privileged user. You will see the Fixed Assets tab has the config menu options.

2,628

(9 replies, posted in Installation)

You seem to be using a PHP v7+ which will not work with FA out of the box.

To start with, a Debian Squeeze OpenVZ container running FA v2.3.26+ was used. The install of FA 2.4.2 was done in on it by purging the databse(s) and then using it's credentials in:

apt-get update
apt-get dist-upgrade
apt-get install rsync

== Install of new FA 2.4 ==
* Backup and empty the databases
cd /var/www
mv frontac frontac_bak
wget https://github.com/apmuthu/frontac24/archive/master.tar.gz -O fa24.tar.gz
tar -xzf fa24.tar.gz
mv frontac24* frontac
mv frontac/core/* frontac/
mv frontac/core/.htaccess frontac/x.htaccess
rm -rf frontac/core
rsync -a -v frontac/FA24Mods/* frontac/
rm -rf frontac/FA24Mods
wget https://frontaccounting.com/wbt/media/download_gallery/dejavu.zip
unzip -o dejavu.zip -d frontac/reporting/fonts
chown -R www-data:www-data frontac
find ./frontac -type f -exec chmod 644 \{\} \;
find ./frontac -type d -exec chmod 755 \{\} \;

sed -i -e 's/# hi_IN UTF-8/hi_IN UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales
update-locale en_US ISO-8859-1 en_US.UTF-8 UTF-8 ta_IN hi_IN ar_EG.UTF-8

service apache2 restart

# Session save path     Info     /var/lib/php5

# Install from Browser

tar -czpf install_fa24.tar.gz frontac/install
rm -rf frontac/install

The above will provide all FA24Mods from my repo as well.

That is indeed a good find.

The function display_db_pager() is defined in includes/ui/db_pager_view.inc which is "include"d in includes/db_pager.inc which is "include"d in each table display page. All such pages have your stated order of "include".

The pager routines have no need for page security which is used by the session file which needs to come in later. It is possible that some routines in the pager files may be needed by the session file.

There are functions, includes and code outside of the class definition in the session file. Such includes too may need functions available in the pager files that hence need to precede the session file in order of inclusion.

The fix for this is lines 134-138 in admin/backups.php:

if (get_post('creat')) {
    generate_backup($conn, get_post('comp'), get_post('comments'));
    $Ajax->activate('backups');
};

should be:

if (get_post('creat')) {
    generate_backup($conn, get_post('comp'), get_post('comments'));
    $Ajax->activate('backups');
    $SysPrefs->refresh(); // re-read system setup
};

@joe: can commit this.
Committed.

Setup => Backup/Restore => Backup successfully generated. ....

The themes/default/images/ajax-loader.gif image is still present. It needs to be removed during the ajax call that states the backup was successful.

When charts are installed, they are made available in the installed_extensions.php file in the webroot and available to the default company to create new ones with them. There is no need for these to exist in the company/#/installed_extensions.php file.

This happened on 2015-02-18 when the file was edited.

@joe: can fix this.
Committed.

2,635

(24 replies, posted in Installation)

wink

2,636

(24 replies, posted in Installation)

@PaulShipley: Thanks. It has been Wiki-ed.

Although the last link in your post is correct, it may have been named wrongly: FA 2.4.25 ??

Even providing the whole file here may not be useful. Check your functionality and provide feedback.

2,638

(1 replies, posted in Report Bugs here)

@joe: can commit this.
Committed.

Using trusted unsigned packages possibly in the LAN is made possible by a $repo_sign flag placed in the config.php

Hosting one's own package repo is available in FA. The $repo_auth array in version.php can be overridden by one in the config.php file.

$SysPrefs array is not used in the includes/package.inc file (in FA 2.4) but the config variables are used from their global context.

Commits in my repos:
FA 2.4 commit as of today (Oct 2017).
FA 2.3 commit as of 2014.

Provide context. The standard FA works fine with db_pager. Hence it must be a $path_to_root or include_once  issue.

The fix for FA 2.3 in my FAMods repo can be ported safely to FA 2.4 to avoid errors that fill up the tmp/errors.log file each time the login screen is accessed. At that time, there is no user available to the session and the $haystack will be a null resource instead of an array. It should degrade gracefully. This is observed in Windows XAMPP (1.7.3) installs.

@joe: the two functions affected are verbatim in both versions and hence they can be ported easily.

2,642

(1 replies, posted in Installation)

Periodically purge the errors in the tmp/errors.log file.

Placing echo session_save_path(); just before the @session_destroy(); line in access/logout.php and checking the html source of the logged out page will show where the session files are stored - these too must be purged periodically - they will generally be beyond the webroot and possibly out of reach of the php's permissions to destroy them and hence the error. In linux systems I have not found this issue.

2,643

(5 replies, posted in Announcements)

Forum Usage Stats in the last 1 year is attached herewith.
Averaging a little over 1 new valid user every 2 days, ie., 17+ a month.
A little under a post a day, ie., 26+ a month.

A drastic dwindling of activity probably means that most FA users are now adept in using it and others get assistance offline or by searching the forum and the wiki.

2,644

(1 replies, posted in Report Bugs here)

The file admin/db/company_db.inc has the function get_company_pref($prefs = null):

function get_company_pref($prefs = null)
{
    global $SysPrefs, $db_version;

    if (!isset($SysPrefs->prefs))     // just after first login or reset
        $SysPrefs->refresh();

    $all = $SysPrefs->prefs;

    if (!$prefs)
        return $all;
    elseif (is_string($prefs))
        return @$all[$prefs];

    $ret = array();
    foreach($prefs as $name)
        $ret[$name] = $all[$name];

    return $ret;
}

This can be simplified and made efficient by replacing it with:

function get_company_pref($prefs = null){
    global $SysPrefs, $db_version;

    if (!isset($SysPrefs->prefs))     // just after first login or reset
        $SysPrefs->refresh();

    $all = $SysPrefs->prefs;
    if ($prefs && is_string($prefs))
        return @$all[$prefs];     // silent on absent array element

    if (!is_array($all))
        $all = array();

    return $all;}

Clear the cache and close all instance of the browser, flush the dns cache (windows: ipconfig /flushdns). Clear the errors file in both apache (webserver) and in the FA tmp/errors.log file.

The routine has not been removed. It has been renamed and the extra arguments and their functionality has been removed.

You are using an old version of the module. Get the new release from cambell's repo or take it from mine linked above. Also attached herewith.

Your $module_path may be wrong.
The file ../includes/session.inc should be include-able from there.
Check if DIRECTORY_SEPARATOR issue is involved.

@cotcomsol: Thanks for the feedback.
Updated my FA24Extensions repo for this extension.
It is also attached herewith.

@joe: would you like to copy over the said function to it's original location? This change done in FA 2.4.x has broken the extension thus far. Any changes to functions in FA 2.3 when porting to FA 2.4 should take into account atleast it's use in all official extensions or fix the latter to accommodate such changes.

Added to the FA24Extensions repo.