# Php bin/console sw:media:cleanup kommt 3 ausgaben

**URL:** <https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963>\
**Category:** Allgemein\
**Created:** [15. April 2022 um 22:32 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963 "2022-04-15T22:32:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Topsat24](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Topsat24](https://forum.shopware.com/u/Topsat24)\
**Post date:** [15. April 2022 um 22:32 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/1 "2022-04-15T22:32:41Z")

</div>

Hallo,  
wenn ich überflüssige Bilder in Shopware löschen möchte, kommt diese ausgabe unten raus.  
kann mir bitte jemand helfen?  
danke und MfG

root@xyz:/var/www/vhosts/todos.de/httpdocs# php bin/console sw:media:cleanup  
WARNING! Could not connect to database. Message from SQL Server: could not find driver in /var/www/vhosts/todos.de/httpdocs/engine/Shopware/Components/DependencyInjection/Bridge/Db.php

## Searching for unused media files.

In Container.php line 248:

Circular reference detected for service „Shopware\Components\Model\ZendDbIn  
itializer“, path: "shopware\_media.garbage\_collector → shopware\_media.garba  
ge\_collector\_factory → Shopware\Components\Model\ZendDbInitializer → db -

> Shopware\Components\Model\ZendDbInitializer".

In Container.php line 272:

The „db\_connection“ service is synthetic, it needs to be set at boot time b  
efore it can be used.

In Container.php line 272:

The „db\_connection“ service is synthetic, it needs to be set at boot time b  
efore it can be used.

sw:media:cleanup [–delete]

---

<div class="post-metadata">

**Author:** ![NextMike](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@NextMike](https://forum.shopware.com/u/NextMike)\
**Post date:** [16. April 2022 um 07:40 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/2 "2022-04-16T07:40:46Z")

</div>

Läuft der Shop denn überhaupt?! Entweder läuft die DB nicht, oder die Zugangsdaten in config.php passen nicht.

---

<div class="post-metadata">

**Author:** ![Topsat24](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Topsat24](https://forum.shopware.com/u/Topsat24)\
**Post date:** [16. April 2022 um 22:49 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/3 "2022-04-16T22:49:18Z")

</div>

ja die webseite läuft und datenbank zugangsdaten sind im config.php korrekt.

was kann ich noch machen?

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [17. April 2022 um 07:10 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/4 "2022-04-17T07:10:01Z")

</div>

Hallo,

falls es sich um einfaches Shared Hosting handelt hast Du evtl. keinen Zugriff auf den MySQL Socket. Falls die Datenbank lokal liegt, in der config.php „localhost“ durch „127.0.0.1“ ersetzen.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Topsat24](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Topsat24](https://forum.shopware.com/u/Topsat24)\
**Post date:** [17. April 2022 um 19:38 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/5 "2022-04-17T19:38:27Z")

</div>

Hallo,  
habe localhost durch 127.0.0.1 ersetzt kommt selbe fehler!  
gruss

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [17. April 2022 um 21:26 UTC](https://forum.shopware.com/t/php-bin-console-swcleanup-kommt-3-ausgaben/93963/6 "2022-04-17T21:26:48Z")

</div>

Ansonsten halt Deinen Hoster ansprechen …
