Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By pawansaxena
#828727
Hello all,

I am running processmaker 3.4, i can see that there is a env.ini file residing in the workflow/engine/config directory but that have some environment values as APP_ENV and it is set to production.
Also there's a environments.php file in the same directory but with different variables, i am not sure whether that file plays a role anymore or it is just sitting there.

Whenever i see the logs ( even on dev i see the production text in the logs and not dev, as i have not setup the dev env)
Can anyone help me as where and how can i use different env.ini files for different environment and tell processmaker to use respective environment values.
By pawansaxena
#828868
This is a good wiki link. But whenever i want to set some environment variable, i didn't want to go and change the .env.ini file directly. I wanted to extend this functionality to have some .env in project root.

I am able to do so by changing some code in System.php inside /workflow/engine/src/Processmaker/Core/System.php

Inside getSystemConfiguration method add below lines :
Code: Select all
if (!empty($globalIniFile)) {
            $appEnvFile = app()->environmentFile();
            $appEnvFilePath = PATH_TRUNK . $appEnvFile;
            if (file_exists($appEnvFilePath)) {
                if (($appEnvConfig = @parse_ini_file($appEnvFilePath)) !== false) {
                    $config = array_merge($config, $appEnvConfig);
                }
            }
        }

        if (!empty($wsIniFile)) {
            $appEnvFile = app()->environmentFile();
            $appEnvFilePath = PATH_DB . $wsName . PATH_SEP . $appEnvFile;
            if (file_exists($appEnvFilePath)) {
                if (($appEnvConfig = @parse_ini_file($appEnvFilePath)) !== false) {
                    $config = array_merge($config, $appEnvConfig);
                }
            }
        }
Hope it helps someone.

Cheers !!!

:D :D Thanks Amos, it helps me too. Cheers

Processmaker Dynaform keeps Loading

Hi, Please attach here your process and tell me wh[…]

Case Notes

Can we add a user access to case notes of every wo[…]

Could be that the Processmaker Queue has not been […]