PHP APM Troubleshooting Guide
  • Updated on 09 Oct 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

PHP APM Troubleshooting Guide

  • Print
  • Share
  • Dark
    Light

Verify Compatibility

PHP Version Support

  • Stackify supports PHP versions 5.4 to 5.6 and 7.0 to 7.3.

Web Server Support

  • Apache 2 (mod_php)

  • Nginx (PHP-FPM)

Verify Extension Installation

1. Create an info.php file w/ the following contents:

<?php
   phpinfo();
?>

2. Using a web browser access the info.php page. Search for the stackify module.

2018-08-27 PHP Troubleshooting .png

3. If stackify is not shown, restart web server and refresh browser.

4. If stackify is still not shown, verify that the extensions directory contains stackify.so and Stackify.php. Extension directory is identified as extension_dir in the info.php results.

  • 4a. If the extensions directory does not contain the stackify files, a manual linking is required.

  • 4b. Symlinks can be used to setup the stackify extension files:

sudo ln -s /usr/local/stackify/stackify-php-apm/linux_[32|64]/stackify-[php-version].so [extension_dir]/stackify.so

Replace [32|64] and [php-version] with the values matching your setup. Run ls -l /usr/local/stackify/stackify-php-apm/linux* to see all supported versions.

sudo ln -s /usr/local/stackify/stackify-php-apm/Stackify.php [extension_dir]/Stackify.php
  • 4c. Restart web server and refresh the browser view of info.php.

5. If Application Name and/or Environment Name are not shown in the stackify module, verify that the following contents are added to the php.ini. Location of php.ini can be found in the info.php property Loaded Configuration File (Restart web server and refresh browser).

[stackify]
extension=stackify.so
stackify.application_name=Sample Application
stackify.environment_name=Test

6. Check if SELinux is enabled by running sudo sestatus. If SELinux is enabled and current mode is enforcing, temporarily disable to see if SELinux is the cause of the issue sudo setenforce 0.

7. Review your application's error log for any references to stackify - contact Stackify Support with details of the logs.

8. Check log directory permissions via sudo getfacl /usr/local/stackify/stackify-php-apm/log.

Expected output:

# file: usr/local/stackify/stackify-php-apm/log
# owner: stackify
# group: stackify
user::rwx
group::rwx
other::rwx

9. Check if open_basedir is configured. Adjust value to include /usr/local/stackify/.

10. If you are running CloudLinux with CageFS enabled, update CageFS permissions to include /usr/local/stackify.
Add /usr/local/stackify to /etc/cagefs/cagefs.mp and run sudo cagefsctl --remount-all.
Full details can be found at CloudLinux - CageFS

11. Ensure that disable_functions does not include symlink in your php configuration.

Was this article helpful?