# Ist Shopware 5.7.x wirklich mit PHP 8 kompatibel?

**URL:** <https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922>\
**Category:** Shopware 5\
**Created:** [7. Juli 2021 um 08:23 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922 "2021-07-07T08:23:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [7. Juli 2021 um 08:23 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/1 "2021-07-07T08:23:31Z")

</div>

In meiner Testumgebung 5.7.2 schaue ich mir eben die Sache mit PHP8 an. Hier tauchen im Zusammenhang mit PHP 8.0.7 immer wieder Fehler auf. Unter PHP 7.4.x gibt es diese Fehler nicht.

Ich rufe nur die Startseite auf, und …

```auto
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

```

Dann habe ich eine Shopseite mit Inhaltstypen erstellen, diese Seite lässt sich nicht mehr aufrufen …

```auto
Uncaught TypeError: Cannot access offset of type string on string in /var/.../var/cache/production_202106241450/templates/frontend_Responsive_de_DE_1_secure/04/3d/2b/043d2b52894ca690bc32a1a611f718a34b981400.snippet.index.tpl.php

```

Und im Backend sind alle Cache-Ordner verschwunden:

 ![2021.07.07-10_00_32](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/c/ce6597ea7abaa8bfbac7ca0ecc22e4cf647031af.png)

Selbst wenn ich Cookie lösche und den Cache per Hand kille, tauchen diese Fehler wieder neu auf.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [27. Juli 2021 um 11:26 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/2 "2021-07-27T11:26:06Z")

</div>

Die Ursache für die Fehlermeldungen konnte ich in der Zwischenzeit beheben. Aber meine Cache-Ordner werden sind immer noch verschwunden bzw. werden nicht angezeigt. Keine sichtbare Fehlermeldung.

Ist das nur bei mir so?

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [27. Juli 2021 um 11:29 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/3 "2021-07-27T11:29:57Z")

</div>

PHP 8.0.6, SW 5.7.2 - bei mir ist der Inhalt da.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [27. Juli 2021 um 14:12 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/4 "2021-07-27T14:12:22Z")

</div>

Verstehe ich (noch) nicht.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [27. Juli 2021 um 14:27 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/5 "2021-07-27T14:27:22Z")

</div>

Also ich habe noch einmal nachgeschaut. Die PHP Version ist jetzt bei 8.0.8. Wenn ich den Cache manuell neu laden möchte, kommt dies:

```auto
Fatal error: 
Uncaught Error: Call to undefined function Shopware\Components\opcache_get_status() in /var/.../engine/Shopware/Components/CacheManager.php:418 Stack trace: 

#0 /var/.../engine/Shopware/Controllers/Backend/Cache.php(79): Shopware\Components\CacheManager->getOpCacheCacheInfo() 
#1 /var/.../engine/Library/Enlight/Controller/Action.php(182): Shopware_Controllers_Backend_Cache->getInfoAction() 
#2 /var/.../engine/Library/Enlight/Controller/Dispatcher/Default.php(478): Enlight_Controller_Action->dispatch() 
#3 /var/.../engine/Library/Enlight/Controller/Front.php(228): Enlight_Controller_Dispatcher_Default->dispatch() 
#4 /var/.../engine/Shopware/Kernel.php(191): Enlight_Controller_Front->dispatch() 
#5 /var/.../vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel->handle() 
#6 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(477): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle() 
#7 /var/.../engine/Shopware/Components/HttpCache/AppCache.php(261): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward() 
#8 /var/.../vendor/symfony/http-kernel/HttpCache/HttpCache.php(267): Shopware\Components\HttpCache\AppCache->forward() 
#9 /var/.../engine/Shopware/Components/HttpCache/AppCache.php(102): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass() 
#10 /var/.../shopware.php(122): Shopware\Components\HttpCache\AppCache->handle() 
#11 {main} thrown in /var/.../engine/Shopware/Components/CacheManager.php on line 418

```

Zend OPcache ist aber auch korrekt installiert. Hier scheint etwas nicht zu stimmen.

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [27. Juli 2021 um 14:39 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/6 "2021-07-27T14:39:10Z")

</div>

Das ggf. ?

[https://issues.shopware.com/issues/SW-26152](https://issues.shopware.com/issues/SW-26152)

Mein Backend sagt zwar, OPCache wäre aktiv, aber im Cache wird immer und ewig „0 Bytes“ angezeigt.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [28. Juli 2021 um 06:10 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/7 "2021-07-28T06:10:08Z")

</div>

Oh, das ist ein guter Tipp. Werde ich heute gleich mal überprüfen.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [28. Juli 2021 um 12:15 UTC](https://forum.shopware.com/t/ist-shopware-5-7-x-wirklich-mit-php-8-kompatibel/88922/8 "2021-07-28T12:15:42Z")

</div>

Es war tatsächlich so, dass die Funktion „opcache\_get\_status“ deaktiviert war. Wahr wohl auch Standard bei der Installation von PHP8. Diese Einstellung wieder gelöscht, opcache\_get\_status wieder aktiv und zack sind die Cache-Ordner auch wieder zu sehen.

Die eigentliche Funktion fragt nur an, ob Zend OPcache aktiv. Also wie im Ticket schon erwähnt.
