# Wie kann ich die PHP Version der Vagrant Shopware Box ändern?

**URL:** <https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257>\
**Category:** Sonstiges\
**Created:** [6. März 2017 um 09:57 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257 "2017-03-06T09:57:45Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 09:57 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/1 "2017-03-06T09:57:45Z")

</div>

Hallo zusammen,

ich habe die shopware vagrant box zusammen mit phpStorm als Entwicklungsumgebung eingerichtet. Wie im shopware - Handbuch für Entwickler beschrieben.&nbsp;

Wenn ich aber das backend über &nbsp;[http://33.33.33.10/shopware/backend/](http://33.33.33.10/shopware/backend/) &nbsp;aufrufen möchte kommt folgender Fehler:&nbsp;

Auf Ihrem Server läuft PHP version 5.5.9-1ubuntu4.21, Shopware 5 benötigt mindestens PHP 5.6.4

Bei meiner Suche bin ich dann auf diese Seite&nbsp;gestoßen:&nbsp;

> **[shopwareLabs/shopware-vagrant](https://github.com/shopwareLabs/shopware-vagrant)**
>
> A Vagrant setup ready for shopware development. Contribute to shopwareLabs/shopware-vagrant development by creating an account on GitHub.

Liefert folgende Infos:&nbsp;

Make sure vagrant is at least at version 1.8:

```
$ vagrant -v

```

The following PHP Versions are installed by default:

- PHP 5.6
- PHP 7.0
- PHP 7.1

Call one of the following commands to change the PHP Version:

```
$ changephp_5.6
$ changephp_7.0
$ changephp_7.1

```

This will change the PHP Version used by the Apache webserver as well as the Version of the&nbsp;`php`&nbsp;command.

You can also call the PHP versions directly using their full path

```
$ /usr/bin/php5.6 -v
$ /usr/bin/php7.0 -v
$ /usr/bin/php7.1 -v

```

Bei mir ist aber anscheinend die Php-version 5.9.9 installiert. (Nicht 5.6, nicht 7.0 und nicht 7.1)

Der Befehl $ vagrant -v funktioniert und sagt mir das ich die Vagrant-Version 1.9.2 installiert habe.

Die anderen Befehle, zum wechseln der php-Version funktionieren leider nicht.

changephp\_7.1 liefert: command not found /usr/bin/php7.1 -v liefert: no such file or directory&nbsp;

Mit allen anderen php-Versionen hab ich die Befehle&nbsp;auch probiert. Mit gleichem ergebnis.

Ich wäre wirklich sehr dankbar wenn mir da jemand weiterhelfen könnte.

Vielen Dank

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [6. März 2017 um 10:05 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/2 "2017-03-06T10:05:34Z")

</div>

Bei mir funktioniert die Vagrantbox einwandfrei. Kann es sein da er ein Update nicht korrekt durchgeführt hat bei der Provisionierung?&nbsp;

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 10:08 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/3 "2017-03-06T10:08:44Z")

</div>

Hi! Danke!

Weiß ich ehrlich gesagt nicht. Wie könnte&nbsp;ich das feststellen?&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 10:18 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/4 "2017-03-06T10:18:54Z")

</div>

Wenn ich nochmals $ vagrant up eingebe bekomme ich folgende Info:

Bringing machine ‚default‘ up with ‚virtualbox‘ provider…  
==\> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`  
==\> default: flag to force provisioning. Provisioners marked to run always will still run.

Hilft mir das irgendwie weiter?&nbsp;

Hab grad den Befehl vagrant provision eingegeben aber ich kann mit den Infos nichts anfangen 😕

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [6. März 2017 um 12:10 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/5 "2017-03-06T12:10:48Z")

</div>

Was bekommst Du den für Infos mit denen Du nichts anfangen kannst?

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 14:25 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/6 "2017-03-06T14:25:32Z")

</div>

Also wenn ich den Befehl vagrant provision eingebe bekomme ich eine riesige Ausgabe. Leider zu groß um die hier zu schicken. Hab schon probiert die zu stückeln aber auch dann sagt er 34692 Zeichen zu lang.&nbsp;

Wirklich was anfangen kann ich leider mit nichts davon. Aber für mich sieht das alles ziemlich einheitlich aus. Auffällig ist nur das ab und zu skipping:&nbsp;[33.33.33.10] steht

==\> default: skipping: [33.33.33.10] =\> (item=rewrite)  
==\> default: skipping: [33.33.33.10] =\> (item=php5)  
==\> default: skipping: [33.33.33.10] =\> (item=autoindex)  
==\> default: skipping: [33.33.33.10] =\> (item=ssl)

Ist das ein Hinweis auf einen Fehler?&nbsp;

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 14:36 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/7 "2017-03-06T14:36:03Z")

</div>

==\> default: &nbsp;\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
==\> default: \< TASK: common | Copy common files to ~/bin \>  
==\> default: &nbsp;-------------------------------------------  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; \ &nbsp; 🙂  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;(oo)\_\_\_\_\_\_\_  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (\_\_)\ &nbsp; &nbsp; &nbsp; )/\  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ||----w |  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || &nbsp; &nbsp; ||  
==\> default: skipping: [33.33.33.10]  
==\> default: &nbsp;\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
==\> default: \< TASK: apache | Install Apache/PHP \>  
==\> default: &nbsp;-----------------------------------  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; \ &nbsp; 🙂  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;(oo)\_\_\_\_\_\_\_  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (\_\_)\ &nbsp; &nbsp; &nbsp; )/\  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ||----w |  
==\> default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; || &nbsp; &nbsp; ||  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [6. März 2017 um 15:16 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/8 "2017-03-06T15:16:25Z")

</div>

mach einmal bitte:

- vagrant destroy
- vagrant up

Und poste irgendwo das vollständige log z.B.&nbsp;[http://pastebin.com/](http://pastebin.com/)

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 16:06 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/9 "2017-03-06T16:06:27Z")

</div>

Alles klar. Danke!

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 16:26 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/10 "2017-03-06T16:26:45Z")

</div>

Ok hab das jetzt bei&nbsp;[http://pastebin.com/](http://pastebin.com/)&nbsp;gepostet.

Paste Name / Title:&nbsp;pham\_vagrantDestroy\_vagrantUp

Danke!&nbsp;

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [6. März 2017 um 16:27 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/11 "2017-03-06T16:27:14Z")

</div>

> **[pham\_vagrantDestroy\_vagrantUp - Pastebin.com](https://pastebin.com/E3GkC93V)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [6. März 2017 um 20:27 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/12 "2017-03-06T20:27:49Z")

</div>

Du scheinst nicht die aktuellste Version von GitHub zu verwenden oder? Jedenfalls wird laut deinem Log noch die Box:&nbsp;ubuntu/trusty64 verwendet und ein paar andere Sachen sind nicht aktuell.&nbsp;

Wenn ich mich richtig erinnere wird die getaggte Version im Buch beschrieben. Verwende bitte den aktuellen master - damit hat es gerade bei mir unter Linux einwandfrei funktioniert.

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [8. März 2017 um 09:01 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/13 "2017-03-08T09:01:37Z")

</div>

Alles klar, ich schau mir das im Detail nochmal an und würde mich gegebenenfalls&nbsp;zurückmelden. Die Provisionierung wurde von mir nicht durchgeführt weil der Schritt im Handbuch nicht vorkommt. Aber jetzt weiß ich wo der Hund begraben liegt.&nbsp;

Vielen Dank für die schnelle Hilfestellung! Top!

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [8. März 2017 um 11:09 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/14 "2017-03-08T11:09:30Z")

</div>

Sorry aber ich komm damit nicht weiter! Ich wäre Dir sehr dankbar wenn Du vielleicht nochmal drüberschauen könntest …&nbsp;

… der Befehl vagrant provision liefert folgendes:&nbsp;

> **[pham\_vagrant\_provision - Pastebin.com](https://pastebin.com/7GgKYKHX)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [8. März 2017 um 11:13 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/15 "2017-03-08T11:13:42Z")

</div>

Wenn Du die neue Version von GitHub ausgecheckt hast musst Du erst die Vagrant Box “wegwerfen” mit vagrant destroy. Danach wieder ein vagrant up machen sonst kann es beim provisionieren zu Problemen kommen.

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [8. März 2017 um 11:19 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/16 "2017-03-08T11:19:01Z")

</div>

Die verwendete&nbsp;sofware (virtualbox, vagrantup, git) entspricht den&nbsp;versionen die aktuell auf den Seiten der entsprechenden Softwarehäuser zum download angeboten werden.&nbsp;

Für die Shopware-Vagrant-Box habe ich laut Handbuch folgendes eingegeben:  
git clone --branch 0.1 [GitHub - shopwareLabs/shopware-vagrant: A Vagrant setup ready for shopware development](https://github.com/shopwareLabs/shopware-vagrant)

Für die Shopware-Installation folgendes:  
git clone [https://github.com/shopware/shopware.git](https://github.com/shopware/shopware.git)

Liegt hier vielleicht ein Fehler?

Wie verwende ich den aktuellen Master?&nbsp;

Ich weiß nicht ob es einen Unterschied macht aber ich habe das System jetzt nochmal auf einem Mac nachgebaut mit gleichem Ergebnis: Auf Ihrem Server läuft PHP version 5.5.9-1ubuntu4.21, Shopware 5 benötigt mindestens PHP 5.6.4

Für weitere Hilfestellung wäre ich sehr dankbar &nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [8. März 2017 um 12:22 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/17 "2017-03-08T12:22:37Z")

</div>

> [@Thomas schrieb:](https://forum.shopware.com/profile/16897/Thomas "Thomas")
> 
> Wenn ich mich richtig erinnere wird die getaggte Version im Buch beschrieben. Verwende bitte den aktuellen master - damit hat es gerade bei mir unter Linux einwandfrei funktioniert.

Du verwendest immer noch die getaggte Version. Verwende bitte den aktuellen Master Branch der Vagrant Box. Einfach das --branch 0.1 weglassen.

---

<div class="post-metadata">

**Author:** ![pham](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@pham](https://forum.shopware.com/u/pham)\
**Post date:** [8. März 2017 um 15:46 UTC](https://forum.shopware.com/t/wie-kann-ich-die-php-version-der-vagrant-shopware-box-andern/44257/18 "2017-03-08T15:46:21Z")

</div>

Alles klar, das wars! Läuft jetzt! Vielen lieben Dank für die schnellen Antworten! Echt Top! Merci!&nbsp;
