Uninstalling the eG PHP Transaction Profiler

To uninstall the eG PHP Profiler, follow the steps below:

  1. Login to the system hosting the profiler.
  2. Go to the shell prompt and switch to the opt/egurkha/lib directory.
  3. Issue the following command at the prompt to uninstall the profiler:

    ../eGPHPBTM_UnInstall.sh -e <Mode_in_which_the_Profiler_was_installed>

    For instance, if the eG PHP Profiler was installed in the mod_php mode, then the command for uninstallation will be:

    ../eGPHPBTM_UnInstall.sh -e 1

    Likewise, if the if the eG PHP Profiler was installed in the php-fpm mode, then the command for uninstallation will be:

    ../eGPHPBTM_UnInstall.sh -e 2

    Its evident therefore that prior to executing this command, you should determine the mode in which the profiler was installed. To achieve this, do the following:

    • From the PHP terminal, issue the following command, if you want to check if the profiler was installed in the mod_php mode:

      php -m

      On the other hand, if you want to check if the profiler was installed in the php-fpm mode, issue the following command:

      php-fpm -m

    • Regardless of which command you execute, the result will be a list of PHP modules. If the eG_phpBTM module appears in the PHP modules list of a command, then you can conclude that the profiler was installed in the corresponding mode. For example, if the eG_phpBTM module appears in the output of the php -m command, then it means that the profiler was installed in the mod_php mode.

    • Alternatively, you can perform the following check to figure out the mode in which the profiler was installed:

      • Open the terminal, and run the following command (only if you have not run it before):

        echo '<?php phpinfo(); ?>' > /var/www/html/phpinfo.php

        This command, when run for the first time, creates a phpinfo.php file in the directory from which the target PHP application loads its files. By default, this is the /var/www/html directory. However, if the application files are loaded from a different directory in your environment, then make sure that you change the command above to create the phpinfo.php file in that directory. Then, the command writes key configuration information (eg., PHP version, mode in which the PHP application runs etc.) related to that application to the phpinfo.php file.

      • Then, open the browser, and type either of the following in the address bar, if the phpinfo.php file is created in the default directory (i.e., the /var/www/html directory):

        http://<URL_of_target_application>/phpinfo.php

        (OR)

        https://<URL_of_target_application>/phpinfo.php

        On the other hand, if the phpinfo.php file was created in a different directory, then type either of the following in the address bar of the browser:

        http://<URL_of_target_application>/<Full_Path_to_phpinfo.php>

        (OR)

        https://<URL_of_target_application>/<Full_Path_to_phpinfo.php>

      • The configuration details of the target PHP application will then be displayed. Here, if the Server API is displayed as Apache 2.0 Handler, then you can conclude that the application is running in the mod_php mode. Now, search for eG_phpBTM in that page. If the search leads you to a separate section titled eG_phpBTM (as shown by Figure 1), then it means that the profiler is installed in the mod_php mode.

        Figure 1 : Verifying the mode in which the profiler was installed

      • On the other hand, if the Server API is displayed as FPM/FastCGI, and a search for eG_phpBTM in that page leads you to Figure 1, then it means that the profiler was installed in the php-fpm mode.

  4. The following messages will then appear:

    Removing eG_phpBTM.ini from /etc/php.d/

    Removing the PHP BTM module from /usr/lib64/php/modules/

  1. Upon successful uninstallation, the following message will appear:

    -------------------------------------------------------------------

    eG PHP BTM Uninstalled Successfully

    -------------------------------------------------------------------