search

Home  >  Q&A  >  body text

There is a problem with laravel5.4 under the ubuntu16.04 system. How to change the default php version in apache2 back to 5.6?

As the title says, I want to use laravel to develop a system. After some testing, I found that there is a problem with the default php7.0 of ubuntu16.04, so I want to switch back to 5.6. It keeps happening, how to solve it?
If there is an expert who knows how to make laravel5.4 run perfectly without changing the PHP version, please feel free to enlighten me.
Thanks in advance!

This error is reported: (after checking through composer event command)
PHP Fatal error: Uncaught Error: Call to undefined function ComposerConsolejson_decode() in /usr/share/php/Composer/Console/Application.php:145

淡淡烟草味淡淡烟草味2753 days ago504

reply all(4)I'll reply

  • 天蓬老师

    天蓬老师2017-05-16 13:02:18

    I said that I have no problem at all in 7.0 and 7.1 environments

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 13:02:18

    Is there any problem? Is there any error report? ! No problem found in laravel5.4 in php7.0

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 13:02:18

    It should be that there is no json module in php

    apt-get install php7.0-json

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-16 13:02:18

    Switching the php version is very simple. You only need to kill the running php process first, and then start your php5 process. It should be noted that to start php5, you need to use the installation directory method to start, find the bin directory under the php5 installation directory, and then execute php

    reply
    0
  • Cancelreply