Categories
Uncategorised

Console app hangs until a key is pressed

On Windows,

When you run a console application, it happens that it freezes and it unfreezes just by hitting a key.

That behavior just made me lose about an hour of computing time this morning. Like it is often, the answer seem to be on StackOverflow http://stackoverflow.com/questions/39664389/console-application-freezes-until-key-pressed-mouse-clicked

I’m trying this.

Categories
Development Security Technical Support

sysPass 2.1.8 – Text not being translated

After some hours being lost, I discovered why sysPass translation system was not doing anything even if locale was installed.

The issue lies in setLocales (/inc/SP/Core/Language.class.php), it doesn’t set all language variable.

putenv('LANG=' . $lang);

is not enough. The following line needs to be added.

putenv('LANGUAGE=' . $lang);

It works with this but according to ubuntu help page, the value we set for LANGUAGE would not be ideal. See for yourself at https://help.ubuntu.com/community/EnvironmentVariables.

I’m guessing the difference between LANG and LANGUAGE has to do with how the combo Apache/PHP is running. I didn’t see anything that indicated setting both variables might be wrong.

I discovered the fix which works with PHP 7.1.* when I saw the comment from “yuricardenas at gmail dot com” in the PHP manual, http://php.net/manual/en/book.gettext.php.