# Fehlermeldung beim Löschen des Caches in Shopware 6

**URL:** https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742
**Category:** Administration
**Created:** [25. März 2020 um 10:12 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742 "2020-03-25T10:12:26Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![opalion](https://avatars.discourse-cdn.com/v4/letter/o/a587f6/32.png) [@opalion](https://forum.shopware.com/u/opalion)
#### Post date: [25. März 2020 um 10:12 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742/1 "2020-03-25T10:12:26Z")

</div>

Hallo, wenn ich im Shopware-Root-Ordner stehe und eingebe

php bin/console cache:clear

Dann kommt folgende Fehlermeldung:

Warning: Unsupported declare ‘strict\_types’ in /home/op003rz4/www/home/shopware6/bin/console on line 2

Parse error: syntax error, unexpected ‘class’ (T\_CLASS), expecting identifier (T\_STRING) or variable (T\_VARIABLE) or ‘{’ or ‘$’ in /home/op003rz4/www/home/shopware6/bin/console on line 22

&nbsp;

Kennt hier jemand eine Lösung? Vielen Dank für jegliche HIlfe.

---

<div class="post-metadata">

### Author: ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)
#### Post date: [25. März 2020 um 10:29 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742/2 "2020-03-25T10:29:59Z")

</div>

Teste mal „php -v“

Damit siehst du welche PHP Version du in der Konsole hast, klint so als wäre die zu alt

---

<div class="post-metadata">

### Author: ![opalion](https://avatars.discourse-cdn.com/v4/letter/o/a587f6/32.png) [@opalion](https://forum.shopware.com/u/opalion)
#### Post date: [25. März 2020 um 17:08 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742/3 "2020-03-25T17:08:14Z")

</div>

Danke. Nun funktioniert der Aufruf, aber es kommt folgende Fehlermeldung:

&nbsp;

In AbstractMySQLDriver.php line 93:

&nbsp; An exception occurred in driver: SQLSTATE[HY000] [2002] php\_network\_getaddresses: getaddrinfo failed: Name or servi  
&nbsp; ce not known

In PDOConnection.php line 31:

&nbsp; SQLSTATE[HY000] [2002] php\_network\_getaddresses: getaddrinfo failed: Name or service not known

In PDOConnection.php line 27:

&nbsp; SQLSTATE[HY000] [2002] php\_network\_getaddresses: getaddrinfo failed: Name or service not known

In PDOConnection.php line 27:

&nbsp; PDO::\_\_construct(): php\_network\_getaddresses: getaddrinfo failed: Name or service not known

&nbsp;

Hatte das schon mal wer?

---

<div class="post-metadata">

### Author: ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)
#### Post date: [25. März 2020 um 17:50 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742/4 "2020-03-25T17:50:45Z")

</div>

Trag mal statt localhost am besten 127.0.0.1 als Datenbank-URL in die .env Datei ein. Dein PHP kann die Adresse per Terminal irgendwie nicht auflösen.

---

<div class="post-metadata">

### Author: ![opalion](https://avatars.discourse-cdn.com/v4/letter/o/a587f6/32.png) [@opalion](https://forum.shopware.com/u/opalion)
#### Post date: [29. März 2020 um 10:54 UTC](https://forum.shopware.com/t/fehlermeldung-beim-loschen-des-caches-in-shopware-6/65742/5 "2020-03-29T10:54:09Z")

</div>

Die Lösung war, das die DATABASE\_URL in der .env Datei umzustellen war, sodass auch man auch über die console auf die Datenbank connecten war. Der Provider hat uns in dem Fall eine andere Domain gegeben, mit der es dann funktioniert hat. Problem lag nicht an Shopware.
