For couple of days I am trying to install latest stable open source version 3.3.3 of OrangeHrm on Linux. I have tried on CentOS 7, Ubuntu Server 16.04, Ubuntu Server 14.04. All these I installed on VirtualBox. I followed different guideline explained on different sites. For example.

On each of the installation, when I access both inside virtual machine or from host, I end up with internal server error with blank page.

The error occurs after I enter the database details.

The error occurs on install.php and chrome shows installerUI.php in dev tools.

I tried with both existing blank database and with new database also. Both with root DB user as well as with other privileged user.

I would preferable like to have it installed on CentOS.

I think it must be very simple installation and I might be missing some silly simple detail.

Any guidelines and resources would highly appreciated.


I had the same problem. Here is how to solve it:

First, generically speaking, you can tail the orangehrm.log file in your installation to check for errors. It will be inside your orangehrm folder, following the path ./symfony/log/orangehrm.log (e.g.: /var/www/html/symfony/log/orangehrm.log).

For me, it said:

Uncaught Error: Call to undefined function mysql_connect()

Apparently, it is trying to use a deprecated set of functions, not available on php7.0. The article you posted uses php5, but in Ubuntu 16.04, for example, php7 is the default.

So, follow this article in order to remove the default php7.0 (if you have it installed) and install PHP 5.6:

Installing PHP 5.6 on Xenial (16.04)

Then restart Apache server (sudo service apache2 restart) and check you PHP version.

After that, you will need to change the default enconding for your MySQL installation too, if your have an up to date version (of MySQL or MariaDB), because OrangeHRM's installation will fail otherwise. This is a workaround, actually. Since version 5.5.3, the default enconding changed to utf8mb4, allowing less characters on keys, indexes, etc. If you don't change it back to utf8, you will see the error Specified key was too long; max key length is 767 bytes during OrangeHRM's install, failing to create tables, etc.

Edit the following file and specify the default char set for MySQL:

sudo nano /etc/mysql/my.cnf

Note that this file might be in different locations. If you don't find it, run: mysqld --help --verbose 2> /dev/null | grep -A1 'Default options' to get other possible paths.

The result should look like this, after editing the file (this is just a subset of the file contents):

# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.

# This group is read both both by the client and the server
# use it for options that affect everything

default-character-set = utf8

default-character-set = utf8

init-connect='SET NAMES utf8'

Other locations/files to look for this configuration:


And if you're using MariaDB:


Look for any line defining default-character-set = utf8mb4 and change it to default-character-set = utf8

Execute the following command to make sure you got them all:

mysql --print-defaults

And then restart MySQL (sudo service mysql restart).

Connect to MySQL:

sudo mysql -u root -p

Run the following to check your current char set values:

SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';

Now, provision the database itself (replace your_db_name, your_db_user and password by your actual values):

create database your_db_name CHARACTER SET utf8 COLLATE utf8_unicode_ci;
grant all privileges on your_db_name.* to 'your_db_user'@'localhost' identified by "password";
show databases;
flush privileges;

One last thing: make sure you have the extension/module php5.6-xml. Install it if you don't (sudo apt-get install php5.6-xml), otherwise you're going to see the error PHP Fatal error: Call to undefined function simplexml_load_file() on your logs and you won't be able to login to OrangeHRM after the installation is done.

Finally, try the installation again. Make sure you use an "Existing Empty Database".

This is how my page looks like:

OrangeHRM database install page

And here are some more references:

https://dba.stackexchange.com/questions/59126/set-value-of-character-set-client-to-utf8mb4 https://dba.stackexchange.com/questions/76788/create-a-database-with-charset-utf-8 https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.