# Shopware 5.7 und PHP 8

**URL:** <https://forum.shopware.com/t/shopware-5-7-und-php-8/88900>\
**Category:** Allgemein\
**Created:** [6. Juli 2021 um 11:37 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900 "2021-07-06T11:37:20Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [19. Oktober 2021 um 05:59 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/21 "2021-10-19T05:59:14Z")

</div>

Hallo @SmartStylez

kannst du das ein bisschen genauer beschreiben? Was bekommst du für eine Fehlermeldung?

Viele Grüße aus Schöppingen  
Michael Telgmann

---

<div class="post-metadata">

**Author:** ![SmartStylez](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SmartStylez](https://forum.shopware.com/u/SmartStylez)\
**Post date:** [19. Oktober 2021 um 11:59 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/22 "2021-10-19T11:59:10Z")

</div>

@Michael_Telgmann

[Tue Oct 19 13:54:35.534982 2021] [proxy\_fcgi:error] [pid 7390] [client] AH01071: Got error ‚PHP message: PHP Fatal error: Uncaught Error: Call to undefined function Shopware\Components\opcache\_get\_status() in /var/www/vhosts/domain.de/httpdocs/engine/Shopware/Components/CacheManager.php:418\nStack trace:\n#0 /var/www/vhosts/domain.de/httpdocs/engine/Shopware/Controllers/Backend/Cache.php(83): Shopware\Components\CacheManager-\>getOpCacheCacheInfo()\n#1 /var/www/vhosts/domain.de/httpdocs/engine/Library/Enlight/Controller/Action.php(182): Shopware\_Controllers\_Backend\_Cache-\>getInfoAction()\n#2 /var/www/vhosts/domain.de/httpdocs/engine/Library/Enlight/Controller/Dispatcher/Default.php(461): Enlight\_Controller\_Action-\>dispatch()\n#3 /var/www/vhosts/domain.de/httpdocs/engine/Library/Enlight/Controller/Front.php(225): Enlight\_Controller\_Dispatcher\_Default-\>dispatch()\n#4 /var/www/vhosts/domain.de/httpdocs/engine/Shopware/Kernel.php(197): Enlight\_Controller\_Front-\>dispatch()\n#5 /var/www/vhosts/domain.de/httpdocs/vendor/symfony/http-kernel/HttpCache/SubRequestHandler…‘, referer: [https://domain.de/backend/](https://domain.de/backend/)

---

<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:** [19. Oktober 2021 um 12:25 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/23 "2021-10-19T12:25:02Z")

</div>

Hallo @SmartStylez,

Du verwendest offenbar eine Plesk Umgebung - die Funktion opcache\_get\_status ist da standardmässig aus Sicherheitsgründen deaktiviert, da andernfalls im Shared Hosting der OPCache von anderen Kunden ausgelesen werden könnte.

Falls Du einen vServer/dedizierten Server hast, kannst Du unter PHP Einstellungen in Plesk bei Disable Functions das rauslöschen, dann wird Dir der OPCache Status im Backend auch korrekt angezeigt.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [19. Oktober 2021 um 12:25 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/24 "2021-10-19T12:25:37Z")

</div>

Hallo @SmartStylez

sieht so aus, als ob du die OPcache PHP Extension nicht korrekt installiert/konfiguriert hast für die PHP Version, die du gerade im Einsatz hast.

> <https://github.com/shopware/shopware/blob/5.7/engine/Shopware/Components/CacheManager.php#L417-L418>

Hier wird geschaut, ob die Extension aktiv, aber danach wir die Function nicht gefunden.  
Da solltest du mal mit deinem Hoster sprechen.

Viele Grüße aus Schöppingen  
Michael Telgmann

---

<div class="post-metadata">

**Author:** ![SmartStylez](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SmartStylez](https://forum.shopware.com/u/SmartStylez)\
**Post date:** [19. Oktober 2021 um 12:31 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/25 "2021-10-19T12:31:52Z")

</div>

@SCOOPEX @Michael_Telgmann Vielen Dank für eure Antworten. Da es sich um einen offiziellen Hoster handelt und der Fehler mit PHP 7.4 nicht auftritt, werde ich dort einfach man nachhören.

---

<div class="post-metadata">

**Author:** ![Steffffi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/steffffi/32/13846_2.png) [@Steffffi](https://forum.shopware.com/u/Steffffi)\
**Post date:** [22. Oktober 2021 um 07:19 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/26 "2021-10-22T07:19:33Z")

</div>

Gibt es eigentlich einen driftigen Grund, warum man unbedingt PHP 8.0 braucht oder ist das mehr so eine Muskelbeschau?

---

<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:** [22. Oktober 2021 um 08:07 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/27 "2021-10-22T08:07:09Z")

</div>

Kommt drauf an, wie lange Du noch einen Shop betreiben möchtest.  
Mit PHP 7.4 ist ende 2022 Supportende. Wenn Du darüber hinaus noch weiter einen Shop „sicher“ betreiben möchtest, ist ab dann eigentlich PHP 8.x Pflicht.

[https://www.php.net/supported-versions.php](https://www.php.net/supported-versions.php)

Frag Deinen Hoster, wann er Dir PHP 7.4 abdreht.

---

<div class="post-metadata">

**Author:** ![Steffffi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/steffffi/32/13846_2.png) [@Steffffi](https://forum.shopware.com/u/Steffffi)\
**Post date:** [22. Oktober 2021 um 08:14 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/28 "2021-10-22T08:14:09Z")

</div>

Ja, natürlich, ich vergaß. Wird ja von heute auf morgen alles unsicher, weil PHP so meint.

Werd mich mal an die Arbeit machen, alles konform zu betreiben: Winterreifen, TV Geräte, VU+, Windows 7 Geräte (und Windows 10 auch gleich dazu inkl. 15 Computer), Netzwerkspeicher, Telefone, PHP Versionen, Shopware 5 auf 6, Drucker haue ich auch alles raus, Shop wird sowieso gleich auf 6 upgegradet, die neusten Schuhe kaufe ich mir auch noch und der Ölbrenner folgt nächstes Wochenende zusammen mit den Fortigates.

Damit man nur ja uptodate ist, wie uns die Industrie und der Rest verklickern.

---

<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:** [22. Oktober 2021 um 08:16 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/29 "2021-10-22T08:16:15Z")

</div>

Leute wie Du machen es dem IDO ja so leicht… _Kopf schüttel_

---

<div class="post-metadata">

**Author:** ![Steffffi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/steffffi/32/13846_2.png) [@Steffffi](https://forum.shopware.com/u/Steffffi)\
**Post date:** [22. Oktober 2021 um 08:19 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/30 "2021-10-22T08:19:08Z")

</div>

Hast du den Thread hier gelesen, wie super stabil PHP 8 mit SW 5 läuft?

_kopfschüttel_

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [22. Oktober 2021 um 08:27 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/31 "2021-10-22T08:27:25Z")

</div>

Noch kannst du ja PHP 7.4 nutzen bis die Fehler beseitigt sind.

---

<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:** [22. Oktober 2021 um 08:45 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/32 "2021-10-22T08:45:36Z")

</div>

Ich brauch den Thread nicht zu lesen, ich habe Testshops, in denen ich testen kann. Meine kleinen Helferlein laufen sauber unter SW 5.7.x und PHP 7.4. Um diese auch PHP 8 fit zu machen, habe ich also noch ein paar Monate zeit. Und da ein für mich wesentlicher Bug in SW 5.7.4 behoben wurde, sehe ich für mich auch keinen Grund mehr, noch wesentlich länger bei SW 5.6.10 zu bleiben (ausser Zeitmangel). Läuft ja auch unter PHP 7.4 - wirst ja nicht gezwungen, SW 5.7 mit PHP 8 zu betreiben.

---

<div class="post-metadata">

**Author:** ![Steffffi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/steffffi/32/13846_2.png) [@Steffffi](https://forum.shopware.com/u/Steffffi)\
**Post date:** [22. Oktober 2021 um 08:48 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/33 "2021-10-22T08:48:09Z")

</div>

> [@sonic](#):
>
> Und da ein für mich wesentlicher Bug in SW 5.7.4 behoben wurde

Ich verstehe nicht: SW 5.7.4 hat einen Bug? Kann doch wohl kaum sein, ist ja neu. Aber egal, sei’s wie’s sei, ich rede niemanden drein. Ich habe derzeit für die Updateorgien keine Zeit, ich muss mit meinem Shop Umsatz machen. Und für Staging Systeme wegen einem Update fehlt mir einfach die Zeit, die ich dafür opfern möchte.

---

<div class="post-metadata">

**Author:** ![digitalpuls](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/digitalpuls/32/9411_2.png) [@digitalpuls](https://forum.shopware.com/u/digitalpuls)\
**Post date:** [6. Februar 2022 um 20:15 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/34 "2022-02-06T20:15:38Z")

</div>

Hey, hast du dafür eine Lösung gefunden?  
Hab eben auch auf PHP8 umgestellt, aber zu $sArticle|@shippingcost finde ich keine ☹

---

<div class="post-metadata">

**Author:** ![musikdiscount24](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@musikdiscount24](https://forum.shopware.com/u/musikdiscount24)\
**Post date:** [31. März 2023 um 10:07 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/35 "2023-03-31T10:07:34Z")

</div>

Guten Tag. Leider nicht. Die Berechnung mithilfe von „@shoppingcost“ zerschießt nach wie vor den Export.  
Hast Du eine Lösung dafür?

LG

Edit:

```auto
<b>Fatal error</b>: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /home/folder/staging.mydomain.de/engine/Shopware/Core/sExport.php:1872
Stack trace:
#0 /home/folder/staging.mydomain.de/engine/Shopware/Core/sExport.php(1872): round()
#1 /home/folder/staging.mydomain.de/engine/Shopware/Core/sExport.php(1581): sExport->sGetArticlePremiumShippingcosts()
#2 /home/folder/staging.mydomain.de/var/cache/production_202303281109/templates/export_4/cd/b6/73/cdb6730b151be8012348473e1ac662568cdeae7c.string.php(60): sExport->sGetArticleShippingcost()
#3 /home/folder/staging.mydomain.de/engine/Library/Smarty/sysplugins/smarty_internal_templatebase.php(180): content_6426b312343579_38303178()
#4 /home/folder/staging.mydomain.de/engine/Shopware/Core/sExport.php(1267): Smarty_Internal_TemplateBase->fetch()
#5 /home/folder/staging.mydomain.de/engine/Shopware/Controllers/Backend/Export.php(136): sExport->executeExport()
#6 /home/folder/staging.mydomain.de/engine/Shopware/Controllers/Backend/Export.php(68): Shopware_Controllers_Backend_Export->generateExport()
#7 /home/folder/staging.mydomain.de/engine/Library/Enlight/Controller/Action.php(187): Shopware_Controllers_Backend_Export->indexAction()
#8 /home/folder/staging.mydomain.de/engine/Library/Enlight/Controller/Dispatcher/Default.php(467): Enlight_Controller_Action->dispatch()
#9 /home/folder/staging.mydomain.de/engine/Library/Enlight/Controller/Front.php(226): Enlight_Controller_Dispatcher_Default->dispatch()
#10 /home/folder/staging.mydomain.de/engine/Shopware/Kernel.php(197): Enlight_Controller_Front->dispatch()
#11 /home/folder/staging.mydomain.de/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php(85): Shopware\Kernel->handle()
#12 /home/folder/staging.mydomain.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(479): Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
#13 /home/folder/staging.mydomain.de/engine/Shopware/Components/HttpCache/AppCache.php(270): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
#14 /home/folder/staging.mydomain.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(269): Shopware\Components\HttpCache\AppCache->forward()
#15 /home/folder/staging.mydomain.de/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass()
#16 /home/folder/staging.mydomain.de/shopware.php(122): Shopware\Components\HttpCache\AppCache->handle()
#17 {main}
  thrown in <b>/home/folder/staging.mydomain.de/engine/Shopware/Core/sExport.php</b> on line <b>1872</b><br />

```

round() seit PHP8.0: „Der zu rundende Wert akzeptiert keine internen Objekte mehr, die eine numerische Konvertierung unterstützen.“  
Quelle: [PHP: round - Manual](https://www.php.net/manual/de/function.round.php)

---

<div class="post-metadata">

**Author:** ![musikdiscount24](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@musikdiscount24](https://forum.shopware.com/u/musikdiscount24)\
**Post date:** [31. März 2023 um 11:03 UTC](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900/36 "2023-03-31T11:03:25Z")

</div>

Tut mir leid, ich schon wieder. 😇

Durch folgende Änderung in der Datei „engine/Shopware/Core/sExport.php“ bekomme ich in unseren Feeds nun die richtige Berechnung.

Zeile 1872 von  
`$from = round($basket['calculation_value_' . $dispatchData['id']], 2);`  
geändert zu  
`$from = round((int)$basket['calculation_value_' . $dispatchData['id']], 2);`

Zu darüber hinausgehenden Folgen kann ich leider nichts sagen.  
LG

> **[Shopware Issuetracker](https://issues.shopware.com/issues/SW-27081)**
>
> Shopware Issuetracker

[Vorherige Seite](https://forum.shopware.com/t/shopware-5-7-und-php-8/88900.md?page=1)
