OrangeHRM

From DreamHost
Jump to: navigation, search

Installing OrangeHRM 2.2.2 on DreamHost

This is a quick how-to for installing OrangeHRM 2.2.2 on DreamHost. There is one particular problem when installing OrangeHRM and this is that it checks for InnoDB support. The checks seem to require root privileges on the database which you will not have. So the below instructions really show you how to bypass those checks so that installation goes smoothly.

1. Make sure that your mysql uses innodb engine. If it does not contact support to turn this option on.

2. Download and copy untar OrangeHRM. I am assuming that you untared OrangeHRM in a directory called orangehrm2.

3. Remove the line SHOW INNODB STATUS from the beginning of each of the scripts in orangehrm2/dbscript.

4. Make the following change in orangehrm2/installer/checkSystem.php:

<tr>
            <td class="tdComponent">MySQL InnoDB Support</td>

            <td align="right" class="tdValues"><strong>
            <?php
                     echo "<b><font color='green'>OK</font></b>";
                    /*
               if(function_exists('mysql_connect') && (@mysql_connect($dbInfo['dbHostName'].':'.$dbInfo['dbHostPort'], $dbInfo['dbUserName'], $dbInfo['dbPassword']))) {

                      $mysqlServer = mysql_query("SHOW INNODB STATUS");

                  if ($mysqlServer) {
                        echo "<b><font color='green'>OK</font></b>";
                  } else if (mysql_errno() == 1235){
                        echo "<b><font color='red'>Disabled</font><a href='./guide/#howToEnableInnoDB'><a href='./guide/#howToEnableInnoDB' target='_blank' ><img border='0' src='images/help.png' alt='help' /></a></b>";
                        $error_found = true;
                  } else {
                        echo "<b><font color='red'>Not Available</font></b>";
                        $error_found = true;
                     }
               } else {
                  echo "<b><font color='red'>Not Available</font></b>";
                  $error_found = true;
               }*/
            ?>
            </strong></td>
          </tr>

To explain what this does, it basically comments out the check for innodb and puts the string echo "<b><font color='green'>OK</font></b>"; which says that the validation went out ok.

5. Open the file orangehrm2/index.php and uncomment the following line:

<li id="approveLeave"><a href="lib/controllers/CentralController.php?leavecode=Leave&action=Leave_FetchLeaveTaken" target="rightMenu"><?php echo $lang_Leave_all_emplyee_taken_leaves; ?> </a></li> 

This actually lets you view the leaves taken. I do not know why this was commented but the leave functionality is really unusable without this. You have to be able to view the taken leaves after all.

6. Follow the instructions for installing OrangeHRM.