Ask questions about installing and configuring ProcessMaker 3
By balestro
#795296
Hi!

I have a processmaker 3.0.1.8-community (https://github.com/tomolimo/processmake ... stallation) installed in CentOS 7 with php 5.6.31, apache 2.4.6. MySQL have another VM.

I uses this version because i want to connect with another server thats containd GLPI (using plugin).

When I try to edit or create some Process (new or imported) the system returns to me:

Notice: Undefined index: access_token in /opt/processmaker/workflow/engine/controllers/designer.php on line 259

Warning: Smarty error: unable to read resource: ".html" in /opt/processmaker/gulliver/thirdparty/smarty/libs/Smarty.class.php on line 1095


Sorry for my english. :D


tks
User avatar
By amosbatto
#795300
It looks like you aren't able to do automatic authentication with oAuth2.

To debug, edit your workflow/engine/controllers/designer.php file and change lines 60-62 from:
Code: Select all
        $clientToken["client_secret"] = $client['CLIENT_SECRET'];
                   
        $consolidated = 0;
To:
Code: Select all
        $clientToken["client_secret"] = $client['CLIENT_SECRET'];
        //debug start
        if (!isset($clientToken['access_token'])) {
			print '<pre>$clientToken:';
			var_dump($clientToken);
			print '$headers:';
			var_dump($headers);
			die;
        }
        //debug end
                   
        $consolidated = 0;
Now when you try to edit a process, you should see information on the screen. Copy it and post it here.
By balestro
#795552
Hi Amosbatto,

Thanks for your answer.

For me this code is at 119-123 lines.
Code: Select all
  $clientToken["client_secret"] = $client['CLIENT_SECRET'];



        $consolidated = 0;

I did what you said to me. Now when I try to edit some process I see information of the debug.
Code: Select all
$clientToken:array(4) {
  ["error"]=>
  string(14) "invalid_client"
  ["error_description"]=>
  string(56) "Client credentials were not found in the headers or body"
  ["client_id"]=>
  NULL
  ["client_secret"]=>
  NULL
}
$headers:array(4) {
  ["PHP_AUTH_USER"]=>
  NULL
  ["PHP_AUTH_PW"]=>
  NULL
  ["Content-Type"]=>
  string(20) "multipart/form-data;"
  ["Authorization"]=>
  string(10) "Basic Og=="
}
User avatar
By amosbatto
#795560
The debug info shows that you are unable to do the automatic login using REST. Delete your code changes so that PM will no longer show the debug info.

Are you sure that your login session didn't expire? What happens if you login again and try to create a new process?

If it isn't an expired login session, then I have no idea how to fix your problem. I suspect that the REST login isn't able to access MySQL to check the password in the database, but I'm not sure. Did you use the Bitnami installer or is this a manual install?

I suggest that you do a normal manual installation of PM and then create a database connection to the remote server where you are running GLPI. Then you can use executeQuery() in a trigger to write data to the database on the remote server running GLPI. Another option is to set up database replication to copy PM's database to your remote server running GLPI. A third option is to create a cron script that uses mysqldbcopy to copy the PM database to your remote server every night.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]