Ask questions about installing and configuring ProcessMaker 3

Moderator: amosbatto

User avatar
By Damian
#815151
Estimados:

En la configuracón de PROCESSMAKER, la carpeta shared se direccionó a un disco de mayores capacidades para soportar los casos; sin embargo al momento de acceder a la configuración de la base de datos (shared/sites/workflow/db.php) toma su tiempo y le vuelve lento al sistema.

Como puedo mover el archivo de configuración de la base de datos dentro del core (workflow/engine) a fin de minimizar los tiempos de acceso.


Gracias por su ayuda

Damián
By amosbatto
#815176
No hay una manera facil cambiar la ubicación de db.php si no es debajo del directorio /shared/, porque hay muchas referencias en el código fuente:
Code: Select all
# grep --include=*.php -R -n db.php *
framework/src/Maveriks/WebApplication.php:489:        if (!file_exists(PATH_DB . SYS_SYS . PATH_SEP . "db.php")) {
framework/src/Maveriks/WebApplication.php:513:        require_once (PATH_DB . SYS_SYS . "/db.php");
gulliver/bin/tasks/pakeGulliver.php:1174:  $dbFile = PATH_SHARED . 'sites' . PATH_SEP . $projectName . PATH_SEP . 'db.php';
gulliver/bin/tasks/pakeGulliver.php:1176:    $dbFile = PATH_GULLIVER_HOME . 'bin' . PATH_SEP . 'tasks' . PATH_SEP . 'templates' . PATH_SEP . 'db.php.tpl';
gulliver/bin/tasks/pakeGulliver.php:1738:    $dbFile = PATH_DB . $workspace . PATH_SEP . 'db.php';
gulliver/bin/tasks/pakeGulliver.php:1906:  $dbfile = $directory . PATH_SEP . 'db.php';
gulliver/bin/tasks/pakeGulliver.php:2055:  $dbFile = PATH_DB . $workspace . PATH_SEP . 'db.php';
rbac/engine/config/environments.php:28:      'dbfile' => PATH_DB . 'production' . PATH_SEP . 'db.php' ,
rbac/engine/config/environments.php:33:      'dbfile' => PATH_DB . 'os' . PATH_SEP . 'db.php', 
rbac/engine/config/environments.php:39:      'dbfile' => PATH_DB . 'test' . PATH_SEP . 'db.php' ,
rbac/public_html/sysUnnamed.php:15:  if ( !is_file( "/shared/workflow_data/sites/".$webAddress."/db.php") ) {
vendor/luracast/restler/public/examples/_015_oauth2_server/Auth/Server.php:39:            include_once $dir . 'rebuild_db.php';
workflow/engine/bin/tasks/cliWorkspaces.php:466:  if (!file_exists(PATH_DB . $workspace . '/db.php')) {
workflow/engine/bin/tasks/cliWorkspaces.php:494:  require_once( PATH_DB . $workspace . '/db.php' );
workflow/engine/bin/cron_single.php:174:    if (is_dir(PATH_DB . $workspace) && file_exists(PATH_DB . $workspace . PATH_SEP . 'db.php')) {
workflow/engine/bin/cron_single.php:211:        $fileDb = fopen(PATH_DB . $workspace . PATH_SEP . 'db.php', 'r');
workflow/engine/bin/verify_solr.php:185:    if (file_exists (PATH_DB . $sObject . PATH_SEP . 'db.php')) {
workflow/engine/bin/verify_solr.php:237:      $sContent = file_get_contents (PATH_DB . $sObject . PATH_SEP . 'db.php');
workflow/engine/bin/reindex_solr.php:198:    if (file_exists (PATH_DB . $sObject . PATH_SEP . 'db.php')) {
workflow/engine/bin/reindex_solr.php:249:      $sContent = file_get_contents (PATH_DB . $sObject . PATH_SEP . 'db.php');
workflow/engine/bin/cron.php:204:                            if (file_exists(PATH_DB . $entry . PATH_SEP . 'db.php')) {
workflow/engine/bin/cron.php:213:                if (!is_dir(PATH_DB . $workspace) || !file_exists(PATH_DB . $workspace . PATH_SEP . 'db.php')) {
workflow/engine/config/environments.php:28:      'dbfile' => PATH_DB . 'production' . PATH_SEP . 'db.php' ,
workflow/engine/config/environments.php:33:      'dbfile' => PATH_DB . 'workflow' . PATH_SEP . 'db.php', 
workflow/engine/config/environments.php:39:      'dbfile' => PATH_DB . 'test' . PATH_SEP . 'db.php' ,
workflow/engine/config/databases.php:28:    if (!file_exists(PATH_DB . SYS_SYS . '/db.php'))
workflow/engine/config/databases.php:29:        throw new Exception("Could not find db.php in current workspace " . SYS_SYS);
workflow/engine/config/databases.php:31:    require_once(PATH_DB . SYS_SYS . '/db.php');
workflow/engine/methods/setup/upgrade_SystemAjax.php:45:    eval( getDatabaseCredentials( PATH_DB . $workspace . PATH_SEP . 'db.php' ) );
workflow/engine/methods/login/sysLogin.php:92:                    if (file_exists (PATH_DB . $file . '/db.php')) {
workflow/engine/classes/class.system.php:123:            if (is_dir( $filename ) && file_exists( $filename . "/db.php" )) {
workflow/engine/classes/class.system.php:591:        //count db.php files ( workspaces )
workflow/engine/classes/class.system.php:594:            if (is_dir( PATH_DB . $sObject ) && substr( $sObject, 0, 1 ) != '.' && file_exists( PATH_DB . $sObject . PATH_SEP . 'db.php' )) {
workflow/engine/classes/class.system.php:615:                if (file_exists( PATH_DB . $sObject . PATH_SEP . 'db.php' )) {
workflow/engine/classes/class.system.php:616:                    eval( $this->getDatabaseCredentials( PATH_DB . $sObject . PATH_SEP . 'db.php' ) );
workflow/engine/classes/class.wsTools.php:76:        $this->dbPath = $this->path . '/db.php';
workflow/engine/classes/class.wsTools.php:232:     * Scan the db.php file for database information and return it as an array
workflow/engine/classes/class.wsTools.php:239:            throw new Exception("Could not get db.php in workspace " . $this->name);
workflow/engine/classes/class.wsTools.php:329:     * This assumes this workspace already has a db.php file, which will be changed
workflow/engine/classes/class.wsTools.php:356:            throw new Exception("Could not find db.php in the workspace");
workflow/engine/classes/class.wsTools.php:361:            throw new Exception("Could not read database information from db.php");
workflow/engine/classes/class.wsTools.php:370:            throw new Exception("Could not write database information to db.php");
workflow/engine/classes/class.wsTools.php:375:        //Clear the cached information about db.php
workflow/engine/classes/class.serverConfiguration.php:267:                        if (file_exists(PATH_DB . $file . '/db.php')) {
workflow/engine/classes/class.serverConfiguration.php:268:                            //print $file."/db.php <hr>";
workflow/engine/classes/class.Installer.php:229:            //Generate the db.php file
workflow/engine/classes/class.Installer.php:230:            $db_file = $path_site . 'db.php';
workflow/engine/controllers/installer.php:751:            // Generate the db.php file and folders
workflow/engine/controllers/installer.php:762:            $db_file = $path_site . 'db.php';
workflow/engine/controllers/installer.php:1067:            //Generate the db.php file and folders
workflow/engine/controllers/installer.php:1069:            $db_file = $path_site . "db.php";
workflow/engine/controllers/main.php:539:                        if (file_exists( PATH_DB . $file . '/db.php' )) {
workflow/engine/templates/login/showDBFiles.php:99:            $dbFile = $DB_MODULE[$DB_INDEX]['path'] . $moduleFile . '/db.php';
workflow/public_html/bootstrap.php:325:  // if SYS_TEMP exists, the URL has a workspace, now we need to verify if exists their db.php file
workflow/public_html/bootstrap.php:327:    //this is the default, the workspace db.php file is in /shared/workflow/sites/SYS_SYS
workflow/public_html/bootstrap.php:328:    if ( file_exists( PATH_DB .  SYS_TEMP . '/db.php' ) ) {
workflow/public_html/bootstrap.php:329:      $pathFile = $filter->validateInput(PATH_DB .  SYS_TEMP . '/db.php','path');
workflow/public_html/sysGeneric.php:572:// if SYS_TEMP exists, the URL has a workspace, now we need to verify if exists their db.php file
workflow/public_html/sysGeneric.php:574:    //this is the default, the workspace db.php file is in /shared/workflow/sites/SYS_SYS
workflow/public_html/sysGeneric.php:575:    $pathFile = PATH_DB . SYS_TEMP . '/db.php';
workflow/public_html/sysUnnamed.php:13:  if ( !is_file( "/shared/workflow_data/sites/".$webAddress."/db.php") ) {
Puedes copiar el archivo db.php a otro lugar:
cp /opt/processmaker/shared/sites/workflow/db.php /opt/processmaker/workflow/engine/config/db.php

Y cambiar las referencias más utilizadas en el código.
Por ejemplo, en workflow/engine/config/databases.php:31 cambia de:
Code: Select all
   require_once(PATH_DB . SYS_SYS . '/db.php');
a:
Code: Select all
   require_once(PATH_CONFIG . 'db.php');
Send for clarification

Cost: Will you be using PM entrerprise or open sou[…]

SMS Gateway

Hello natesh, I have a Get ready to use integrate[…]

delete information after CSV export

thanks for your attention, i have some change on y[…]

Thanx again amosbatto... I'll re-check file permis[…]