> ## 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 configuration

Configure AppSignal for PHP through the `config/appsignal.php` file. The `appsignal install` command creates this file for you.

```sh Shell theme={null}
vendor/bin/appsignal install
```

## Configure AppSignal

Open `config/appsignal.php` and set the required values:

<CodeGroup>
  ```php title="Laravel" theme={null}
  return [
  	'active' => true,
  	'app_name' => 'My app',
  	'environment' => 'production',
  	'push_api_key' => env('APPSIGNAL_PUSH_API_KEY'),
  	'collector_endpoint' => env('APPSIGNAL_COLLECTOR_ENDPOINT'),
  ];
  ```

  ```php title="Symfony" theme={null}
  return [
  	'active' => true,
  	'app_name' => 'My app',
  	'environment' => 'production',
  	'push_api_key' => $_ENV['APPSIGNAL_PUSH_API_KEY'],
  	'collector_endpoint' => $_ENV['APPSIGNAL_COLLECTOR_ENDPOINT'],
  ];
  ```

  ```php title="Vanilla PHP" theme={null}
  return [
  	'active' => true,
  	'app_name' => 'My app',
  	'environment' => 'production',
  	'push_api_key' => $_ENV['APPSIGNAL_PUSH_API_KEY'],
  	'collector_endpoint' => $_ENV['APPSIGNAL_COLLECTOR_ENDPOINT'],
  ];
  ```
</CodeGroup>

Set the Push API key and collector endpoint URL in your `.env` file:

```bash title=".env" theme={null}
APPSIGNAL_PUSH_API_KEY=<your-push-api-key>
APPSIGNAL_COLLECTOR_ENDPOINT=<your-collector-endpoint-url>
```

AppSignal provides the Push API key and collector endpoint URL when you create a new application.

## Validate configuration

The AppSignal for PHP package includes an `appsignal validate` command to check that the current configuration is valid.

```sh Shell theme={null}
vendor/bin/appsignal validate
> The AppSignal config is valid.
```

## Test the app

Once your application is configured, start it and check whether data arrives in AppSignal. The ["Performance > Traces"](https://appsignal.com/redirect-to/app?to=performance/traces) page is a good place to start, where you'll see samples of traces from your application.

If you still don't see data after following the installation instructions, [contact support](mailto:support@appsignal.com?subject=PHP%20installation%20issue) and we'll help you finish setup.

All available AppSignal configuration options are listed on the [configuration options page](/php/configuration/options).
