Please rate how useful you found this document: 
Average: 2.3 (3 votes)

Overview

After installing ProcessMaker, it may be necessary to modify the configuration of Apache, PHP and MySQL for certain situations which are listed on this page.

Configuring Apache

To configure Apache edit its httpd.conf file (or apache2.conf and ports.conf files if using Debian/Ubuntu). The other file to modify is the pmos.conf file which holds the VirtualHost definition for ProcessMaker. The location of these two files depends upon the operating system:

Red Hat/CentOS/Fedora:

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/pmos.conf

Debian/Ubuntu/Mint:

/etc/apache2/apache2.conf
/etc/apache2/ports.conf
/etc/apache2/sites-available/pmos.conf

Windows XP/Server 2000/2003:

C:\Program Files\ProcessMaker-X_X_X\apache\conf\httpd.conf
C:\Program Files\ProcessMaker-X_X_X\apache\conf\pmos.conf

Windows Vista and later:

C:\Users\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\apache\conf\httpd.conf
C:\Users\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\apache\conf\pmos.conf

Restarting Apache

After changing a setting in the httpd.conf or pmos.conf files, restart Apache for the new configuration to go into effect:

Red Hat/CentOS/Fedora:

service httpd restart

Debian:

service apache2 restart

Ubuntu/Mint:

sudo service apache2 restart

SuSE/OpenSUSE:

systemctl start apache2.service

FreeBSD:

/usr/local/etc/rc.d/apache22 restart

Windows XP/Server 2000/2003:
Open a DOS terminal and navigate to where Apache is installed and restart the service:

cd C:\Program Files\ProcessMaker-X_X_X\apache\bin httpd.exe -k restart -n "ProcessMakerApache"

Windows Vista and later:
Open a DOS terminal and navigate to where Apache is installed and restart the service:

cd C:\User\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\apache\bin httpd.exe -k restart -n "ProcessMakerApache"

Compression to improve ProcessMaker performance

ProcessMaker performance can be improved by using ZIP compression when uploading/downloading pages. Compression should be supported by all modern web browsers. The compression uses Apache's deflate module, which should have been enabled when ProcessMaker was installed.

Note: The deflate module is enabled if the Apache configuration file httpd.conf contains a line like:

LoadModule deflate_module modules/mod_deflate.so

In Debian/Ubuntu/Mint, the deflate module can be enabled in Apache with the following command (issued as root or using sudo):

a2enmod deflate

After adding the deflate module, restart apache.

To enable ZIP compression, edit the pmos.conf file. Add the following lines in the VirtualHost definition:

<IfModule mod_deflate.c> SetOutputFilter DEFLATE <IfModule mod_setenvif.c> # Netscape 4.x has some problems BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48, the above regex won’t work. You can use the following # workaround (comment the above line and uncomment the below line) to get the desired effect: # BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html # Don’t compress already-compressed files SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary SetEnvIfNoCase Request_URI .(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary </IfModule> <IfModule mod_headers.c> # Make sure proxies don’t deliver the wrong content Header append Vary User-Agent env=!dont-vary </IfModule> </IfModule>

Then, restart Apache for the new settings to take effect.

Configuring ProcessMaker to use SSL/TLS

If your organization needs greater security to protect sensitive data being passed between web clients and the ProcessMaker server, it may be a good idea to set up a SSL or TLS connection which can be accessed through the https protocol (rather than the standard http protocol).

Follow the steps in the following tutorials to set up an SSL-secured web server in Red Hat/CentOS, Debian/Ubuntu and Windows. After creating the certificates that will be used by the ProcessMaker server, then configure ProcessMaker to use https in Apache.

Edit the file /etc/apache2/sites-available/pmos.conf and add the following lines in bold:

# Please change the ip address with your server ip address and # the ServerName with you own subdomains. NameVirtualHost your_ip_address #processmaker virtual host <VirtualHost your_ip_address > ServerName "your_processmaker_domain" DocumentRoot /opt/processmaker/workflow/public_html DirectoryIndex index.html index.php # Add this part for https SSLEngine on SSLCertificateFile /etc/apache2/apache.pem SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire <Directory "/opt/processmaker/workflow/public_html"> AddDefaultCharset UTF-8 AllowOverRide none Options FollowSymlinks Order allow,deny Allow from all RewriteEngine on RewriteRule ^.*/(.*)$ sysGeneric.php [NC,L] ExpiresActive On ExpiresDefault "access plus 1 day" ExpiresByType image/gif "access plus 1 day" ExpiresByType image/png "access plus 1 day" ExpiresByType image/jpg "access plus 1 day" ExpiresByType text/css "access plus 1 day" ExpiresByType text/javascript "access plus 1 day" AddOutputFilterByType DEFLATE text/html </Directory> </VirtualHost>

Then restart the Apache web server so the altered configuration will take effect. Now it possible to use ProcessMaker over SSL. Login to ProcessMaker by using the https protocol:

https://<IP-ADDRESS>

Configuring PHP

To change the configuration of PHP, edit its php.ini file with a plain text editor (such as Notepad in Windows and vim or nano in Linux/UNIX). The location of the php.ini file depends on your operating system:

Red Hat/CentOS/Fedora:
/etc/php.ini
Debian/Ubuntu/Mint/SuSE/openSUSE:
/etc/php5/apache2/php.ini
In Debian/Ubuntu systems with multiple web servers:
/etc/php5/cgi/php.ini
FreeBSD:
/usr/local/etc/php.ini
Windows XP/Server 2000/2003:
C:\Program Files\ProcessMaker-X_X_X\php\php.ini
Windows Vista and later:
C:\Users\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\php\php.ini

After changing a setting in the php.ini file, restart Apache for the new PHP configuration to go into effect.

Checking the PHP modules

To check whether all the required PHP modules are installed, enter the following command in a terminal:

Linux/UNIX:

php -m

Windows:

Navigate to where PHP is installed. For example:

cd c:\Users\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\php

Then, issue the command:

php -m

If an error message about a missing MSVCR100.dll file appears when executing the command:

Then, install or update the Microsoft Visual C++ 2010 Redistributable Package for 32 bit or 64 bit.

ProcessMaker interface to check PHP modules

To check whether all the required PHP modules are loaded from inside ProcessMaker version 2.5.0 and later, log in as a user such as "admin" who has the PM_SETUPADVANCE permission in his/her role. Then go to ADMIN > Settings > PHP Information and check whether all the required modules are listed.

Uploading large Input Documents

If planning on uploading large Input Documents while running processes, the post_max_size and upload_max_filesize should be increased to more than the default 2MB. For instance, if planning on uploading files as large as 24MB, then:

post_max_size = 24M upload_max_filesize = 24M

After modifying these settings, restart Apache.

Setting the Time Zone

The time zone for ProcessMaker can be set under ADMIN > Settings > System in ProcessMaker 2.0.40 and later or by manually editing the time_zone setting in the env.ini file in version 2.0.29 or later. For previous versions, see Default Time Zone.

Nonetheless, it is also recommended to set the same time zone in the date.timezone setting in the php.ini file. See this list of available time zones. For example to set PHP to use Eastern Standard Time in the US, set date.timezone to "America/New_York":

date.timezone = "America/New_York"

In the US, use these time zones:

US standard time zone PHP time zone
Eastern America/New_York
CentralAmerica/Chicago
MountainAmerica/Denver
Mountain no DSTAmerica/Phoenix
PacificAmerica/Los_Angeles
Alaska America/Anchorage
HawaiiAmerica/Adak
Hawaii no DSTPacific/Honolulu

After changing the time zone, restart Apache for the changes to take effect.

Managing Login Sessions in ProcessMaker

By default, ProcessMaker logs out a user after 24 minutes of inactivity. This time can be changed by setting the value of session.gc_maxlifetime in php.ini.

session.gc_maxlifetime = 1440 expressed in seconds

In addition, the session.cache_expire sets how long data in the cache is stored and session.cache_limiter sets whether data is cached by the web browser and proxies.

session.cache_expire = 180 expressed in minutes session.cache_limiter = nocache

After modifying these settings, restart Apache.

More rows in an Output Document

In PHP 5.3.9 and later, the max_input_vars setting limits the maximum number of posted variables. By default, max_input_vars is set to 1000, which will generate approximately 300 rows in a grid in an Output Document. If this value is too small, then grids in Output Documents may be truncated.

To generate more rows, increase this setting in the php.ini configuration file:

max_input_vars = 8000

Then, restart Apache for the new setting to take effect.

Note: If using the Suhosin security patch, then change the following settings in the suhosin.ini configuration file.

In Red Hat/CentOS/Fedora:

/etc/php5/apache2/conf.d/suhosin.ini

In Debian/Ubuntu/Mint:

/etc/php5/conf.d/suhosin.ini

Configure the file as follows:

suhosin.post.max_vars = 8000 suhosin.request.max_vars = 8000

Importing large processes

To import large processes it may be necessary to increase the memory_limit to 256M in php.ini:

memory_limit=256M

After modifying this setting, restart Apache.

PHP Accelerators

Installing an opcode cache manager, such as Zend, Alternative PHP Cache (APC), XCache, eAccelerator or ionCube EncoderZend, can double the speed of ProcessMaker and decrease the load on your server's CPU. Of the available PHP accelerators, ProcessMaker recommends APC, because it is maintained by PHP developers, but APC, Xcache and eAccelerator all have good performance.

Make sure to restart Apache after installing an opcode cache manager and only use one opcode cache manager at a time.

Installing APC

Debian/Ubuntu/Mint:

APC can be installed from your distribution's repository:

apt-get install php-apc

Red Hat/CentOS/Fedora:

See this tutorial to install APC in Red Hat/CentOS/Fedora.

Windows:

See this tutorial to install APC in Windows. Make sure to download the version of APC compiled for your version of PHP.

Insertion of quotation marks and backslashes

To prevent single quotation marks and backslashes from being automatically inserted in Output Documents, turn off magic quotes in php.ini.

; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = Off ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with instead of \'). magic_quotes_sybase = Off

After modifying these settings, restart Apache.

Verification of files using the fileinfo extension

Version 2.8.0 and later uses the fileinfo extension in PHP to verify the extension of uploaded files and ensure that the file extension matches the contents of the file. The fileinfo extension is included by default in PHP 5.3.0 and later, but it may need to be enabled. Use the php -m in the command line or go to ADMIN > Settings > System Information in ProcessMaker to check whether the fileinfo extension is enabled.

Windows:

Enable the fileinfo extension by editing the php.ini file with a plain text editor and adding or uncommenting the following line:

extension=php_fileinfo.dll

Then, restart Apache. Then verify that the extension is enabled.

Linux/UNIX:

In most Linux/UNIX distributions, the fileinfo extension is enabled by default in PHP. If not add the following line to the php.ini file:

extension=php_fileinfo.so

Then restart Apache to use the fileinfo extension.

Configuring MySQL

MySQL can be configured by editing its my.cnf file (which is named my.ini in Windows). Its location depends on the operating system:

Red Hat/CentOS/Fedora/SuSE/OpenSUSE:

/etc/my.cnf

Debian/Ubuntu/Mint:

/etc/mysql/my.cnf

Windows XP/Server 2003:

C:\Program Files\ProcessMaker-X_X_X\mysql\my.ini

Windows Vista and later:

C:\Users\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\mysql\my.ini

Restarting MySQL

After modifying the my.cnf file, restart MySQL:

Red Hat/CentOS/Fedora:

service mysqld restart

Debian/Ubuntu/Mint/SuSE/OpenSUSE:

service mysql restart

Windows XP/Server 2000/2003:
Open a DOS terminal and navigate to where MySQL is installed and restart the service:

cd C:\Program Files\ProcessMaker-X_X_X\mysql\bin httpd.exe -k restart -n "ProcessMakerMysql"

Windows Vista and later:
Open a DOS terminal and navigate to where MySQL is installed and restart the service:

cd C:\User\USERNAME\AppData\Roaming\ProcessMaker-X_X_X\mysql\bin httpd.exe -k restart -n "ProcessMakerMysql"

Triggers in MySQL 5.5 and later

To avoid problems running triggers in MySQL 5.5 and later, edit the my.cnf configuration file and set the binlog_format to log by rows, rather an statements:

binlog_format=row

For more information, see the MySQL documentation. Then, restart MySQL for the new setting to take effect.

Increasing the thread stack size

According to the Mysql manual, the default thread stack is 128K, which sometimes is not enough to execute long queries, e.g., long joins. If the thread stack is too small, the following Thread stack overrun (MySQL ERROR 1436) may occur:

ERROR 1436 (HY000) at line 5992: Thread stack overrun: 8384 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld -O thread_stack=#' to specify a bigger stack.

If this problem is encountered, edit the MySql configuration file my.cnf and increase the size of the thread_stack setting in the following line:

# The stack size of each thread (default: 192K) thread_stack = 512K

Then, restart MySQL for the change to take effect.

Changing the database location, MySQL user or password

It is necessary to update the encrypted information in the paths_installed.php file after:

  • changing the location of the ProcessMaker databases,
  • changing the MySQL user with superglobal privileges to create databases for new workspaces (which is usually the "root" user), or
  • changing the password of that MySQL user.

First make the changes in MySQL, then update the information in ProcessMaker. See: Changing the MySQL.


Checking the ProcessMaker Requirements

Inside the ADMIN tab, an option to check the ProcessMaker requirements was added in versions 2.5 and later. This option checks whether all the requirements are correctly installed and lists which versions are installed.

Login to ProcessMaker as a user with the PROCESSMAKER_ADMIN role. Then go to ADMIN > Settings > Check PM Requirements:

After installing any missing requirements, click on the Check again button to verify whether everything is properly installed.