Unofficial documentation how to do interesting things and work around problems in ProcessMaker

Moderator: amosbatto

Forum rules: Unofficial documentation for features which have not been tested by Quality Assurance or may change in future versions of ProcessMaker
#791753
ProcessMaker won't be able to upgrade to PM 3.2 or later if the MySQL password contains + (plus sign) or %## (percent sign followed by two numbers), because a code change added in PM 3.2 replaces these symbols in the password. These passwords are found in the files processmaker/shared/sites/WORKSPACE/db.php and processmaker/shared/sites/WORKSPACE/databases.php.

When trying to run the php processmaker upgrade or php processmaker database-upgrade command, the following error message will appear if the passwords contain these symbols:

Errors upgrading workspace workflow: [wrapped: connect failed [Native Error: Access denied for user 'database-name'@'host' (using password: YES)] [User Info: database-user]]

For example:
Code: Select all
# cd /opt/processmaker
# php processmaker upgrade
Checking files integrity...
checksum.txt not found, integrity check is not possible
Integrity check failed, do you want to continue the upgrade? [Y/n] y
Clearing cache...
Upgrading workspaces (1/1): workflow
> Updating database...
Errors upgrading workspace workflow:  [wrapped: connect failed [Native Error: Access denied for user 'wf_workflow'@'localhost' (using password: YES)] [User Info: wf_workflow]]

Safe upgrade for files cached by the browser

Upgrade finished but there were errors upgrading workspaces.
Please check the log above to correct any issues.
To fix this problem, edit the processmaker/gulliver/thirdparty/creole/Creole.php file with a plain text editor (such as nano, gedit or Notepad++) and change lines 315-317 from:
Code: Select all
        if (!is_null($dsn)) {
            $info['pass'] = urldecode($info['pass']);
        }
To:
Code: Select all
        /* comment out to fix bug with urldecode() replacing characters in password:
        if (!is_null($dsn)) {
            $info['pass'] = urldecode($info['pass']);
        }
        */
Then, it should be possible to use the php processmaker upgrade or php processmaker database-upgrade command and continue with the rest of the upgrade.
#822001
Hello Amos,

Would this solution work also for PM 3.3.0?
I am trying to upgrade the ProcessMaker from 3-1-community to 3.3.0 and I have the same error.
However, I cannot find these lines in the Creole.php file.

Best Regards,
fibo2358
#822008
The location of the file has changed. In version 3.3.0, edit processmaker/thirdparty/creole/Creole.php and change line 312 from:
Code: Select all
        $info['pass'] = urldecode($info['pass']);
To:
Code: Select all
        //$info['pass'] = urldecode($info['pass']);
#822124
Hello Amos,

Thank you for your advice.
After this change, the php processmaker upgrade completes OK, but after completing all the steps of the upgrade procedure I cannot login to ProcessMaker.

I put the correct credential within the ProcessMaker login form and get the following messages:
"Warning: mysqli_connect(): (HY000/1045): Access denied for user 'wf_workflow'@'localhost' (using password: YES) in /opt/processmaker/thirdparty/creole/drivers/mysqli/MySQLiConnection.php on line 80"

RuntimeException:

[wrapped: connect failed [Native Error: mysqli_connect(): (HY000/1045): Access denied for user 'wf_workflow'@'localhost' (using password: YES)] [User Info: wf_workflow]]

Please help.

Best Regards,
fibo2358
#822134
Make a backup copy of your file processmaker/shared/sites/workflow/db.php and then edit the file to change the password to a string without any symbols:

For example, if you have this file:
Code: Select all
<?php
// Processmaker configuration
  define ('DB_ADAPTER',     'mysql' );
  define ('DB_HOST',        'localhost' );
  define ('DB_NAME',        'wf_workflow' );
  define ('DB_USER',        'wf_workflow' );
  define ('DB_PASS',        'z!4B_HPW13-etqr' );
  define ('DB_RBAC_HOST',   'localhost' );
  define ('DB_RBAC_NAME',   'wf_workflow' );
  define ('DB_RBAC_USER',   'wf_workflow' );
  define ('DB_RBAC_PASS',   'z!4B_HPW13-etqr' );
  define ('DB_REPORT_HOST', 'localhost' );
  define ('DB_REPORT_NAME', 'wf_workflow' );
  define ('DB_REPORT_USER', 'wf_workflow' );
  define ('DB_REPORT_PASS', 'z!4B_HPW13-etqr' );
Then change DB_PASS, DB_RBAC_PASS and DB_REPORT_PASS to a string without any symbols like this:
Code: Select all
<?php
// Processmaker configuration
  define ('DB_ADAPTER',     'mysql' );
  define ('DB_HOST',        'localhost' );
  define ('DB_NAME',        'wf_workflow' );
  define ('DB_USER',        'wf_workflow' );
  define ('DB_PASS',        'z4BHPW13etqr' );
  define ('DB_RBAC_HOST',   'localhost' );
  define ('DB_RBAC_NAME',   'wf_workflow' );
  define ('DB_RBAC_USER',   'wf_workflow' );
  define ('DB_RBAC_PASS',   'z4BHPW13etqr' );
  define ('DB_REPORT_HOST', 'localhost' );
  define ('DB_REPORT_NAME', 'wf_workflow' );
  define ('DB_REPORT_USER', 'wf_workflow' );
  define ('DB_REPORT_PASS', 'z4BHPW13etqr' );
Also edit your processmaker/shared/sites/workflow/databases.php file and make the same change to the passwords here:
Code: Select all
<?php
$dbAdapter    = 'mysql';
$dbHost       = 'localhost';
$dbName       = 'wf_workflow';
$dbUser       = 'wf_workflow';
$dbPass       = 'z4BHPW13etqr';
$dbRbacHost   = 'localhost';
$dbRbacName   = 'wf_workflow';
$dbRbacUser   = 'wf_workflow';
$dbRbacPass   = 'z4BHPW13etqr';
$dbReportHost = 'localhost';
$dbReportName = 'wf_workflow';
$dbReportUser = 'wf_workflow';
$dbReportPass = 'z4BHPW13etqr';
Then, login to mysql as the "root" user and change the password of your wf_workflow user:
mysql -u root -p
ALTER USER 'wf_workflow'@'localhost' IDENTIFIED BY 'z4BHPW13etqr';
New REST POINT 404 NOT FOUNT

I am trying to create new REST API with 3.3.4-c[…]

New REST Endpoint 404 error

I try to do the same with 3.3.4-community I canno[…]

Hi Amos, Now migrating already done. How to : 1.[…]