框架报500

1.chmod 777 -R storage 将日志目录权限设置下。

2.修改fastcgi,将代码目录包含进去。

fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/:/home/www/";

3.nginx.conf

location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}

No application encryption key has been specified.

1、.env.example 改名使用命令 copy 修改为 .env

2、使用命令 php artisan key:generate 获取密码

[IlluminateContractsHttpKernel] is not instantiable

报错

(1/1) BindingResolutionExceptionTarget [Illuminate\Contracts\Http\Kernel] is not instantiable.
in Container.php line 945
at Container->notInstantiable('Illuminate\\Contracts\\Http\\Kernel')in Container.php line 785
at Container->build('Illuminate\\Contracts\\Http\\Kernel')in Container.php line 658
at Container->resolve('Illuminate\\Contracts\\Http\\Kernel', array())in Container.php line 609
at Container->make('Illuminate\\Contracts\\Http\\Kernel', array())in Application.php line 260
at Application->make('Illuminate\\Contracts\\Http\\Kernel')in index.php line 52

检查public/index.php

laravel的:

<?php

/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/ define('LARAVEL_START', microtime(true)); /*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/ require __DIR__.'/../vendor/autoload.php'; /*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/ $app = require_once __DIR__.'/../bootstrap/app.php'; /*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/ $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
); $response->send(); $kernel->terminate($request, $response);

是这一句放到lumen里面就错了

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

把lumen的index.php拷过来就行了

lumen、laravel问题汇总的更多相关文章

  1. 关于Lumen / Laravel .env 文件中的环境变量是如何生效的

    .env 文件包含默认环境变量,我们还可自定义其他任何有效的变量,并可通过  调用 env() 或 $_SERVER 或 $_ENV  来获取该变量.那么env()是如何加载到这些变量的呢?在Lume ...

  2. PHP Lumen Laravel 解决validate方法自定义message无效的问题

    /** * 由于 \Laravel\Lumen\Routing\ProvidesConvenienceMethods::validate 在验证不通过时, * 抛出 \Illuminate\Valid ...

  3. lumen laravel response对象返回数据

    Route::get('home', function () { $content = "内容"; $status = 301; $value = 'text/html'; // ...

  4. laravel方法汇总详解

    1.whereRaw() 用原生的SQL语句来查询,whereRaw('select * from user') 就和 User::all()方法是一样的效果 2.whereBetween() 查询时 ...

  5. Lumen框架—升级改造之路-仓储层

    仓储层与逻辑层搭建  Lumen官方文档:https://lumen.laravel.com/docs/5.5 我的项目地址:https://github.com/BusinessL/big-lume ...

  6. Lumen框架—升级改造之路-开篇

    一.前言    首先,我先阐述下,为什么要做这件事.lumen是一款比较轻型的PHP框架,但是,作为项目开发来说,它还是缺少很多东西,比如Response返回值规范的自定义,异常抛出格式的自定义,以及 ...

  7. Lumen实现用户注册登录认证

    Lumen实现用户注册登录认证 前言 Lumen是一个基于Laravel的微框架,号称是以速度为生.截用Lumen官网的一段,号称是比silex和slim还要快. 本文将用Lumen来实现一个完整的用 ...

  8. 关于Laravel框架中Guard的底层实现

    1. 什么是Guard 在Laravel/Lumen框架中,用户的登录/注册的认证基本都已经封装好了,开箱即用.而登录/注册认证的核心就是: 用户的注册信息存入数据库(登记) 从数据库中读取数据和用户 ...

  9. lumen Rest API 起步

    lumen Rest API 起步 修改项目文件 .env DB_DATABASE=<数据库名> DB_USERNAME=<数据库用户名> DB_PASSWORD=<数据 ...

随机推荐

  1. 鸿蒙内核源码分析(编译脚本篇) | 如何防编译环境中的牛皮癣 | 百篇博客分析OpenHarmony源码 | v58.01

    百篇博客系列篇.本篇为: v58.xx 鸿蒙内核源码分析(环境脚本篇) | 编译鸿蒙原来如此简单 | 51.c.h.o 本篇用两个脚本完成鸿蒙(L1)的编译环境安装/源码下载/编译过程,让编译,调试鸿 ...

  2. CF1446F-Line Distance【计算几何,树状数组,二分】

    正题 题目链接:https://www.luogu.com.cn/problem/CF1446F 题目大意 给出\(n\)个点,求所有点对构成的直线中与原点距离第\(k\)小的距离 \(2\leq n ...

  3. Dapr + .NET Core实战(八)服务监测

    服务监测 分布式服务性能指标,链路追踪,运行状况,日志记录都很重要,我们日常开发中为了实现这些功能需要集成很多功能,替换监控组件时成本也很高. Dapr 可观测性模块将服务监测与应用程序分离.它自动捕 ...

  4. ES5新增方法--查找方法--forEach(),filter(),some()区别

    1.forEach方法 迭代(遍历)数组 var arr = [1, 2, 3]; var sum = 0; arr.forEach(function (value, index, array) { ...

  5. 超简洁,玩转springboot 之springboot自定义start工程

    springboot 的start 建一个父工程 不需要其他目录结构,需要注意的是把type的类型改为POM 这样就没有工程的目录结构 因为父工程不需要 给父工程的pom添加依赖 <depend ...

  6. (目录)Fortran学习笔记:开坑!!!

    前言:因为某些原因,需要使用Fortran编写程序,记录下Fortran语法学习过程中的部分笔记.在此开坑记录,立下Flag,"希望年末能够更新完" Fortran 学习笔记 陈橙 ...

  7. 10.7 URI

    URI:   Uniform Resource Identifier  统一资源标识符 URL:  Uniform Resource Locator    统一资源定位符 URN: Uniform R ...

  8. DCI架构是如何解决DDD战术建模缺点的?

    摘要:将DCI架构总结成一句话就是:领域对象(Object)在不同的场景(Context)中扮演(Cast)不同的角色(Role),角色之间通过交互(Interactive)来完成具体的业务逻辑. 本 ...

  9. 演员 Or 开发者的自我修养

    演员 Or 开发者的自我修养 时至今日,我都还是很怀念小时候与一群玩伴编写剧本.拍摄,那时候的我还有一个远大的"白日梦"--成为一名导演.很可惜,终究是"白日梦" ...

  10. Java初步学习——2021.09.24每日总结,第三周周五

    (1)今天做了什么: (2)明天准备做什么? (3)遇到的问题,如何解决? 今天学了将数组传递给方法和方法返回数组,其中传递的是数组的引用. 明天把例子做了,尽量把查找也学习了. 遇到了两个问题: 1 ...