PHP on Linux
  • 1 Minute to read
  • Dark
    Light
  • PDF

PHP on Linux

  • Dark
    Light
  • PDF

Article summary

1. Download and install the Prefix installation file:

Check out the Getting Started Prefix page to download and install Prefix on your workstation.

2. Create and set the permissions for the PHP profiler installation folder.

mkdir -p "/usr/local/stackify/stackify-php-apm"

chmod -R 777 "/usr/local/stackify/stackify-php-apm"

3. Get the Prefix PHP profiler from Stackify.

https://stackifyversionwarehouse.azurewebsites.net/v1/package/stackify-php-apm/linux
And put it in a folder of your choice. (It doesn’t need to be the final installation folder)

mkdir -p “/tmp/php_profiler
wget -O “/tmp/php_profiler/profiler.tar.gz” \ “https://stackifyversionwarehouse.azurewebsites.net/v1/package/stackify-php-apm/linux”    

4.Go into the directory and extract profiler.tar.gz

cd “/tmp/php_profiler”
tar -xzf “profiler.tar.gz”

5. Run install.sh to install the PHP profiler

./install.sh

Use sudo if you need permissions.

sudo ./install.sh

6. Set the StackifyPrefix environment variable:

In your /etc/environment file, append the following command
StackifyPrefix=1
Add the following lines to your php.ini

[stackify]
extension=stackify.so
stackify.application_name=My PHP Application
stackify.environment_name=Production

Replace the application_name and environment_name values with your application and environment name

7. Verify your requests show in Prefix


Was this article helpful?