> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AppSignal for PHP requirements

There are two requirements to get started with the PHP package:

1. An actively supported [PHP version](https://www.php.net/supported-versions). See our [maintenance policy](/support/maintenance-policy).
2. The OpenTelemetry PHP extension.

We will guide you through installing the OpenTelemetry extension.

## Install OpenTelemetry PHP extension

The OpenTelemetry PHP extension provides hooks in PHP functions that this package uses to instrument your application. This is a PHP extension that you need to install and enable in your PHP environment.

First, make sure the required build dependencies are available on your system.

<CodeGroup>
  ```bash title="Ubuntu / Debian" theme={null}
  sudo apt-get install gcc make autoconf
  ```

  ```shell title="macOS" theme={null}
  brew install gcc make autoconf
  ```
</CodeGroup>

Then, install the OpenTelemetry PHP extension using either [PECL](https://pecl.php.net/), [pie](https://github.com/php/pie), [pickle](https://github.com/FriendsOfPHP/pickle), or [docker-php-extension-installer](https://github.com/mlocati/docker-php-extension-installer):

<CodeGroup>
  ```shell title="PECL" theme={null}
  pecl install opentelemetry
  ```

  ```shell title="pie" theme={null}
  # Install pie (skip this step if pie is already installed)
  curl -L https://github.com/php/pie/releases/latest/download/pie.phar -o /usr/local/bin/pie && chmod +x /usr/local/bin/pie

  # Install the extension
  pie install open-telemetry/ext-opentelemetry
  ```

  ```shell title="pickle" theme={null}
  # Install pickle (skip this step if pickle is already installed)
  curl -L https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar -o /usr/local/bin/pickle && chmod +x /usr/local/bin/pickle

  # Install the extension
  pickle install opentelemetry
  ```

  ```dockerfile title="docker-php-extension-installer" theme={null}
  # Use the docker-php-extension-installer script in your Dockerfile when using official PHP Docker images
  ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
  RUN install-php-extensions opentelemetry
  ```
</CodeGroup>

Finally, enable the extension in your PHP installation's configuration file. The configuration file is usually named `php.ini`, and its location can be found by running `php --ini`. Add the following lines to it:

```ini INI theme={null}
[opentelemetry]
extension=opentelemetry.so
```

<Note>
  When using the [docker-php-extension-installer](https://github.com/mlocati/docker-php-extension-installer) script to install the `opentelemetry` extension, the extension is automatically enabled and you don't need to manually edit the `php.ini` file.
</Note>

## Create a new AppSignal application

Please follow the [installation guide](/guides/new-application) first, when adding a new application to AppSignal.

At the end of that guide, you will receive a Push API key and a collector endpoint URL. You will need both to configure AppSignal for PHP.
