# php Problem

**URL:** <https://forum.shopware.com/t/php-problem/35755>\
**Category:** Allgemein\
**Created:** [4. April 2016 um 09:40 UTC](https://forum.shopware.com/t/php-problem/35755 "2016-04-04T09:40:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [4. April 2016 um 09:40 UTC](https://forum.shopware.com/t/php-problem/35755/1 "2016-04-04T09:40:25Z")

</div>

Hallo zusammen,

seit dem Wochenende hab ich ein riesen Problem&nbsp;

Wenn man&nbsp;einen &nbsp;Artikel auf der Seite aufruft kommt folgende Fehlermeldung

" **Fatal error** : Class ‚Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition‘ not found in **/var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/StoreFrontBundle/Service/Core/SimilarProductsService.php** &nbsp;on line&nbsp; **145**  
503 Service Unavailable"

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

Unter Einstellung | Systeminfo | Shopware-Datein fehlen mehrer php Datein (kann ich diese einfach aus einer neu installtion dort einfügen oder sind die Shop individuell?)

(es wurde kein Update oder sonstiges gemacht!)

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/e/e27e3296b965759a759a0d385adf828ac79f959c.jpeg)

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/7/7cdfa5ce483407dd42301ddd7fc2869fc8709ced.jpeg)

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/d/d8f18a45b9d07370e1c770bcd16e14cdb0a7b00f.jpeg)

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/2/24a7d6612d75fc3d9ea2049280c90e9257fb8f5c.jpeg)

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/f/fb6ae7bf60c9763c0ba73fc4f9412e51ddf3f0cd.jpeg)

über die Suche hab ich leider gar nichts zu diesen Problem gefunden…

Schon mal danke für eure hilfe

&nbsp;

Gruß

Maik

&nbsp;

&nbsp;

---

<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:** [4. April 2016 um 09:51 UTC](https://forum.shopware.com/t/php-problem/35755/2 "2016-04-04T09:51:58Z")

</div>

Hallo,

also laut Systeminfo fehlen die Dateien. Am besten lädst du dir das Installationspaket deiner Version einmal herunter und schiebst dann die fehlenden Dateien wieder auf den Server. Siehe auch hier:&nbsp;[http://community.shopware.com/Systeminfo\_detail\_839.html](http://community.shopware.com/Systeminfo_detail_839.html)

Moritz

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [4. April 2016 um 10:33 UTC](https://forum.shopware.com/t/php-problem/35755/3 "2016-04-04T10:33:21Z")

</div>

Hey super dachte ich mir schon.

Hab das jetzt mal gemacht alle Haken sind wieder grün…

ABER

bei jedem Artikel kommt jetzt diese Meldung

&nbsp;

Ups! Ein Fehler ist aufgetreten!

Wir wurden bereits über das Problem informiert und arbeiten an einer Lösung, bitte versuchen Sie es in Kürze erneut.

&nbsp;

&nbsp;

Was hab ich vergessen?

---

<div class="post-metadata">

**Author:** ![Creatixx](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Creatixx](https://forum.shopware.com/u/Creatixx)\
**Post date:** [4. April 2016 um 11:01 UTC](https://forum.shopware.com/t/php-problem/35755/4 "2016-04-04T11:01:09Z")

</div>

Hi,

was steht denn dazu in den Logs von SW? (var/log/)

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [4. April 2016 um 16:32 UTC](https://forum.shopware.com/t/php-problem/35755/5 "2016-04-04T16:32:50Z")

</div>

also die letzte Log Datei beinhaltet dies:

[https://www.dropbox.com/s/tsai5o64gykl2cb/show.htm?dl=0](https://www.dropbox.com/s/tsai5o64gykl2cb/show.htm?dl=0)

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [4. April 2016 um 17:07 UTC](https://forum.shopware.com/t/php-problem/35755/6 "2016-04-04T17:07:40Z")

</div>

Hi,

im Log finden sich nur Fehler mit Bezug auf das Aufwärmen des HTTP-Caches und alter Medien-URLs. Die verursachen das Problem in aller Regel nicht. Du könntest (nur kurzzeitig) folgendes Snippet in deine config.php übernehmen:

```
    'front' => [
        'throwExceptions' => true,
        'showException' => true
    ],

```

Dadurch wird der Fehler direkt auf der Seite ausgegeben (nach leeren des Caches aus dem Backend).

Besten Gruß,

Daniel

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [5. April 2016 um 08:18 UTC](https://forum.shopware.com/t/php-problem/35755/7 "2016-04-05T08:18:53Z")

</div>

Hi Daniel,

wo muss ich den in der config.php platzieren?

folgendes steht bei mir

&nbsp;

&nbsp;&nbsp;&nbsp; ],\<?php return array (  
 &nbsp; ‘db’ =\>  
&nbsp; array (  
&nbsp;&nbsp;&nbsp; ‘username’ =\> ‘shop’,  
&nbsp;&nbsp;&nbsp; ‘password’ =\> ‘\_\_\_\_\_\_\_\_\_\_’,  
&nbsp;&nbsp;&nbsp; ‘host’ =\> ‘00.00.18.9’,  
&nbsp;&nbsp;&nbsp; ‘port’ =\> ‘3306’,  
&nbsp;&nbsp;&nbsp; ‘dbname’ =\> ‘shop’,  
&nbsp; ),  
);

Danke und Grüß

Maik

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [5. April 2016 um 08:21 UTC](https://forum.shopware.com/t/php-problem/35755/8 "2016-04-05T08:21:39Z")

</div>

Tante Edit sag jetzt bekomm ich die Meldung wenn ich auf ein Artikel gehe

&nbsp;

],  
**Fatal error** : Uncaught exception ‘Exception’ with message ‘Condition Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition not supported’ in /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php:223 Stack trace: #0 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(175): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>getConditionHandler(Object(Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition)) #1 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(154): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>addConditions(Object(Shopware\Bundle\SearchBundle\Criteria), Object(Shopware\Bundle\SearchBundleDBAL\QueryBuilder), Object(Shopware\Bundle\StoreFrontBundle\Struct\ProductContext)) #2 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(87): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>cre in&nbsp; **/var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php** &nbsp;on line&nbsp; **223**  
503 Service Unavailable

---

<div class="post-metadata">

**Author:** ![Simon\_Baumer](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@Simon\_Baumer](https://forum.shopware.com/u/Simon_Baumer)\
**Post date:** [5. April 2016 um 08:22 UTC](https://forum.shopware.com/t/php-problem/35755/9 "2016-04-05T08:22:56Z")

</div>

Hey potti,

so müsste deine config.php dann aussehen (die Datenbankdaten selbstverständlich so lassen wie sie bei dir sind):

&nbsp;

```
 array(
        'throwExceptions' => true,
    ),
    'db' => array(
        'username' => 'user',
        'password' => 'pass',
        'dbname' => 'shopware',
        'host' => 'localhost',
        'port' => '3306'
    ),
);

```

Grüße,  
Simon 😉

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [5. April 2016 um 09:16 UTC](https://forum.shopware.com/t/php-problem/35755/10 "2016-04-05T09:16:38Z")

</div>

Danke Simon,

&nbsp;

fehler meldung hab ich oben gepostet.

&nbsp;

Bekomme im backend nun auch nach der änderung der config.php ein Shopware Fehler Reporter

&nbsp;

SyntaxError: Unexpected token ]  
&nbsp;&nbsp;&nbsp; at [http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:5361](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:5361)  
&nbsp;&nbsp;&nbsp; at Object.Ext.globalEval ([http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:5369](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:5369))  
&nbsp;&nbsp;&nbsp; at Ext.Ajax.request.success ([http://www.motshop24.eu/backend/base?file=bootstrap&loggedIn=1459847685:477:5](http://www.motshop24.eu/backend/base?file=bootstrap&loggedIn=1459847685:477:5))  
&nbsp;&nbsp;&nbsp; at Object.Ext.apply.callback ([http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:67496](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:67496))  
&nbsp;&nbsp;&nbsp; at Ext.define.onComplete ([http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:422670](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:422670))  
&nbsp;&nbsp;&nbsp; at Ext.define.onStateChange ([http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:422314](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:422314))  
&nbsp;&nbsp;&nbsp; at XMLHttpRequest. ([http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:17406](http://www.motshop24.eu/engine/Library/ExtJs/ext-all.js?201603220913:21:17406))

&nbsp;

Gruß

Maik

---

<div class="post-metadata">

**Author:** ![potti](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@potti](https://forum.shopware.com/u/potti)\
**Post date:** [6. April 2016 um 21:25 UTC](https://forum.shopware.com/t/php-problem/35755/11 "2016-04-06T21:25:51Z")

</div>

Keiner eine Idee?

---

<div class="post-metadata">

**Author:** ![mowlwurf](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mowlwurf](https://forum.shopware.com/u/mowlwurf)\
**Post date:** [16. Juni 2017 um 06:55 UTC](https://forum.shopware.com/t/php-problem/35755/12 "2017-06-16T06:55:11Z")

</div>

> [@potti schrieb:](https://forum.shopware.com/profile/18827/potti "potti")
> 
> Tante Edit sag jetzt bekomm ich die Meldung wenn ich auf ein Artikel gehe
> 
> &nbsp;
> 
> ],  
> **Fatal error** : Uncaught exception ‚Exception‘ with message ‚Condition Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition not supported‘ in /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php:223 Stack trace: #0 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(175): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>getConditionHandler(Object(Shopware\Bundle\SearchBundle\Condition\SimilarProductCondition)) #1 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(154): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>addConditions(Object(Shopware\Bundle\SearchBundle\Criteria), Object(Shopware\Bundle\SearchBundleDBAL\QueryBuilder), Object(Shopware\Bundle\StoreFrontBundle\Struct\ProductContext)) #2 /var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php(87): Shopware\Bundle\SearchBundleDBAL\QueryBuilderFactory-\>cre in&nbsp; **/var/www/vhosts/motshop24.eu/httpdocs/engine/Shopware/Bundle/SearchBundleDBAL/QueryBuilderFactory.php** &nbsp;on line&nbsp; **223**  
> 503 Service Unavailable

Ist zwar schon eine Weile her, aber der Fehler tritt unter anderem auf&nbsp;wenn man den ConditionHandler nicht registriert hat. Das war zumindest bei mir das Problem, hatte den register Event vergessen. Dazu einfach folgendes in deiner Bootstrap oder deinem Subscriber hinzufügen (Namen entsprechend anpassen).

```
$this->subscribeEvent(
    'Shopware_SearchBundleDBAL_Collect_Condition_Handlers',
    'registerConditionHandler'
);

public function registerConditionHandler()
{
    return new \DeinPlugin\Condition\ConditionHandler();
}

```

&nbsp;
