> ## 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 für PHP konfigurieren

Konfigurieren Sie AppSignal für PHP über die Datei `config/appsignal.php`. Der Befehl `appsignal install` erstellt diese Datei für Sie.

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

## AppSignal konfigurieren

Öffnen Sie `config/appsignal.php` und legen Sie die erforderlichen Werte fest:

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

Legen Sie den Push-API-Key und die Collector-Endpoint-URL in Ihrer `.env`-Datei fest:

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

AppSignal stellt Ihnen den Push-API-Key und die Collector-Endpoint-URL beim Erstellen einer neuen Anwendung zur Verfügung.

## Konfiguration validieren

Das AppSignal-für-PHP-Paket enthält den Befehl `appsignal validate`, mit dem Sie prüfen können, ob die aktuelle Konfiguration gültig ist.

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

## Anwendung testen

Sobald Ihre Anwendung konfiguriert ist, starten Sie sie und prüfen, ob Daten in AppSignal eintreffen. Die Seite [„Performance > Traces"](https://appsignal.com/redirect-to/app?to=performance/traces) ist ein guter Ausgangspunkt; dort sehen Sie Beispiele von Traces aus Ihrer Anwendung.

Wenn Sie nach dem Befolgen der Installationsanweisungen immer noch keine Daten sehen, [kontaktieren Sie den Support](mailto:support@appsignal.com?subject=PHP%20installation%20issue) und wir helfen Ihnen, die Einrichtung abzuschließen.

Alle verfügbaren AppSignal-Konfigurationsoptionen sind auf der [Seite zu den Konfigurationsoptionen](/php/configuration/options) aufgeführt.
