框架报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问题汇总

    框架报500 1.chmod 777 -R storage 将日志目录权限设置下. 2.修改fastcgi,将代码目录包含进去. fastcgi_param PHP_ADMIN_VALUE " ...

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

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

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

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

  4. lumen laravel response对象返回数据

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

  5. laravel方法汇总详解

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

  6. webpack配置构建环境问题汇总

    环境:node 6.9.5  npm 3.10.10 问题一:Module build failed: TypeError: Path must be a string. Received undef ...

  7. Java 环境问题汇总

    准备java环境时,需要设置JAVA_HOME 和 Path , CLASSPATH 环境变量,它们可以是用户变量,也可以是系统变量. 注意: 系统变量的路径排在用户变量之前. 其中,Windows操 ...

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

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

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

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

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

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

随机推荐

  1. ViewPager引导页实现网络图片加载

    ViewPager引导页实现网络图片加载 最近在准备移动应用开发的比赛,看到一道题目,让我们加载网络图片当引导页,我太久没做了,就搜了一下,大多数是让你有多少张图片就新建多少个布局文件,这样文件多不说 ...

  2. WebKit中WTFMove实现

    WTFMove定义位置: WTF/Source/wtf/StdLibExtras.h,其定义如下: #define WTFMove(value) std::move<WTF::CheckMove ...

  3. 万事通,专精部分领域的多功能 Transformer 智能体

    介绍 我们很高兴分享"万事通"(Jack of All Trades,简称 JAT) 项目,该项目旨在朝着通用智能体的方向发展.该项目最初是作为对 Gato (Reed 等,202 ...

  4. EAV模型(实体-属性-值)的设计和低代码的处理方案(1)

    一般我们在开发的时候,习惯上使用常规的关系型数据库来设计数据库表,对于一些业务表的字段比较固定的场景,是一种非常不错的选择,而且查询的时候,由于是基于固定的表字段进行查询,性能基本上是最优的.不过有一 ...

  5. Springboot+Mybatis+Clickhouse+jsp 搭建单体应用项目(二)(添加日志打印和源码地址)

    一.添加yaml设置 1 logging: 2 level: 3 com.mrliu.undertow.mapper : debug 二.添加pom的Hutool工具,完善日志打印处理 1 <d ...

  6. java学习之旅(day.04)

    运算符 算术运算符:+ ,- ,* ,/,%(取余或模运算), ++(自增),-- (自减) 赋值运算符:= 关系运算符:>, <,>=, <=, ==, !=(不等于),in ...

  7. Spring IoC注解式开发无敌详细(细节丰富)

    1. Spring IoC注解式开发无敌详细(细节丰富) @ 目录 1. Spring IoC注解式开发无敌详细(细节丰富) 每博一文案 2. 注解回顾 3. Spring 声明Bean的注解 3.1 ...

  8. jsonp原理详解——终于弄明白了JSONP

    什么是JSONP? 其实网上关于JSONP的讲解有很多,但却千篇一律,而且云里雾里,对于很多刚接触的人来讲理解起来有些困难,着用自己的方式来阐释一下这个问题,看看是否有帮助. 1.一个众所周知的问题, ...

  9. TS码流解析(二)PSI PAT PMT

    TS码流有PSI和PES两种负载,这一节主要来了解PSI是如何解析的. 1.PSI PSI(Program Specific Information)节目专用信息,用来描述TS码流的节目组成等信息.P ...

  10. 分享一个关于Avl树的迭代器算法

    1 研究过程 前段时间在研究avl树的迭代实现,在节点不使用parent指针的情况下,如何使用堆栈来实现双向地迭代.我参考了网络上的大部分迭代器实现,要么是使用了parent指针(就像c++的map容 ...