如何将php7降级为php5 fedora

时间:2019-01-19 18:50:08

标签: php laravel

php artisan服务无法正常工作

am正在开发使用php 5开发的项目,并且fedora使用7.2

以及fedora上php5的所有存储库都返回404

php artisan clear-compiled
PHP Fatal error:  Uncaught ReflectionException: Class log does not exist in /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php:741
Stack trace:
#0 /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php(741): ReflectionClass->__construct('log')
#1 /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php(842): Illuminate\Foundation\Application->make('log')
#4 /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /home/ahmed/Document in /home/ahmed/Documents/svn/osmall/trunk/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 741

我尝试过: 1-.evn搜索错误 2-我尝试过作曲家清除现金和其他东西 3-我搜索了可能导致问题的时间戳 4-我尝试过... 5-精疲力尽..help

1 个答案:

答案 0 :(得分:0)

如果您确实需要旧的php版本,并且仍想使用最新的os版本(您应该使用!)

您可以尝试使用docker:

docker-compose.yml:

version: "3.5"

services:
   php: 
       image: php:5.6-apache
       ports:
          - 80:80
       volumes:
          - ./:/var/www/html

->这将限制您的一个应用程序使用该旧php版本