用 laravel 框架写了一个工程,已经在本机测试好了,准备部署到一台外网服务器(阿里云的)。
目前这台服务器操作系统是 Ubuntu 12.04,装了 PHP 5.6.18,根据 JellyBool 的帖子 进行了 Nginx 配置,访问后是 Laravel 的出错页面,如下:
哎呦~ 服务器居然累倒了! ●别急,工程师正在紧急处理,马上就好。 ●您可致电010-*****转8169,***通知***开发人员! ●***的进步需要您的反馈,感谢您对***的使用,请您耐心等待!
110
看了一下 larval.log 中的 log,内容如下:
<code> [2016-02-25 10:24:42] production.ERROR: exception 'ReflectionException' with message 'Class AppHttpControllersOfficialWebsiteController does not exist' in /var/www/shark/vendor/illuminate/routing/Route.php:264
Stack trace:
#0 /var/www/shark/vendor/illuminate/routing/Route.php(264): ReflectionMethod->__construct('App\Http\Contro...', 'index')
#1 /var/www/shark/vendor/illuminate/routing/Router.php(838): IlluminateRoutingRoute->signatureParameters('Illuminate\Data...')
#2 /var/www/shark/vendor/illuminate/routing/Router.php(823): IlluminateRoutingRouter->substituteImplicitBindings(Object(IlluminateRoutingRoute))
#3 /var/www/shark/vendor/illuminate/routing/Router.php(806): IlluminateRoutingRouter->substituteBindings(Object(IlluminateRoutingRoute))
#4 /var/www/shark/vendor/illuminate/routing/Router.php(670): IlluminateRoutingRouter->findRoute(Object(IlluminateHttpRequest))
#5 /var/www/shark/vendor/illuminate/routing/Router.php(654): IlluminateRoutingRouter->dispatchToRoute(Object(IlluminateHttpRequest))
#6 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): IlluminateRoutingRouter->dispatch(Object(IlluminateHttpRequest))
#7 [internal function]: IlluminateFoundationHttpKernel->IlluminateFoundationHttp{closure}(Object(IlluminateHttpRequest))
#8 /var/www/shark/vendor/illuminate/routing/Pipeline.php(52): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#9 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#10 [internal function]: IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode->handle(Object(IlluminateHttpRequest), Object(Closure))
#11 /var/www/shark/vendor/illuminate/pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#12 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#13 /var/www/shark/vendor/illuminate/routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#14 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#15 /var/www/shark/vendor/illuminate/pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#16 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): IlluminatePipelinePipeline->then(Object(Closure))
#17 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): IlluminateFoundationHttpKernel->sendRequestThroughRouter(Object(IlluminateHttpRequest))
#18 /var/www/shark/public/index.php(54): IlluminateFoundationHttpKernel->handle(Object(IlluminateHttpRequest))
#19 {main}
</code>执行过 composer dump-autoload,提示一行绿字 Generating autoload files,没有成功失败提示。
另外,php 没有启用 openssl,尝试启用但是遇到一些麻烦,不知道目前是否有必要,暂时没有启用。
用 laravel 框架写了一个工程,已经在本机测试好了,准备部署到一台外网服务器(阿里云的)。
目前这台服务器操作系统是 Ubuntu 12.04,装了 PHP 5.6.18,根据 JellyBool 的帖子 进行了 Nginx 配置,访问后是 Laravel 的出错页面,如下:
看了一下 larval.log 中的 log,内容如下:
<code> [2016-02-25 10:24:42] production.ERROR: exception 'ReflectionException' with message 'Class AppHttpControllersOfficialWebsiteController does not exist' in /var/www/shark/vendor/illuminate/routing/Route.php:264
Stack trace:
#0 /var/www/shark/vendor/illuminate/routing/Route.php(264): ReflectionMethod->__construct('App\Http\Contro...', 'index')
#1 /var/www/shark/vendor/illuminate/routing/Router.php(838): IlluminateRoutingRoute->signatureParameters('Illuminate\Data...')
#2 /var/www/shark/vendor/illuminate/routing/Router.php(823): IlluminateRoutingRouter->substituteImplicitBindings(Object(IlluminateRoutingRoute))
#3 /var/www/shark/vendor/illuminate/routing/Router.php(806): IlluminateRoutingRouter->substituteBindings(Object(IlluminateRoutingRoute))
#4 /var/www/shark/vendor/illuminate/routing/Router.php(670): IlluminateRoutingRouter->findRoute(Object(IlluminateHttpRequest))
#5 /var/www/shark/vendor/illuminate/routing/Router.php(654): IlluminateRoutingRouter->dispatchToRoute(Object(IlluminateHttpRequest))
#6 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): IlluminateRoutingRouter->dispatch(Object(IlluminateHttpRequest))
#7 [internal function]: IlluminateFoundationHttpKernel->IlluminateFoundationHttp{closure}(Object(IlluminateHttpRequest))
#8 /var/www/shark/vendor/illuminate/routing/Pipeline.php(52): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#9 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#10 [internal function]: IlluminateFoundationHttpMiddlewareCheckForMaintenanceMode->handle(Object(IlluminateHttpRequest), Object(Closure))
#11 /var/www/shark/vendor/illuminate/pipeline/Pipeline.php(124): call_user_func_array(Array, Array)
#12 [internal function]: IlluminatePipelinePipeline->IlluminatePipeline{closure}(Object(IlluminateHttpRequest))
#13 /var/www/shark/vendor/illuminate/routing/Pipeline.php(32): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#14 [internal function]: IlluminateRoutingPipeline->IlluminateRouting{closure}(Object(IlluminateHttpRequest))
#15 /var/www/shark/vendor/illuminate/pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(IlluminateHttpRequest))
#16 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): IlluminatePipelinePipeline->then(Object(Closure))
#17 /var/www/shark/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): IlluminateFoundationHttpKernel->sendRequestThroughRouter(Object(IlluminateHttpRequest))
#18 /var/www/shark/public/index.php(54): IlluminateFoundationHttpKernel->handle(Object(IlluminateHttpRequest))
#19 {main}
</code>执行过 composer dump-autoload,提示一行绿字 Generating autoload files,没有成功失败提示。
另外,php 没有启用 openssl,尝试启用但是遇到一些麻烦,不知道目前是否有必要,暂时没有启用。
OfficialWebsiteController does not exist
反射这个控制器,没有找到,看看是不是命名大小写的问题
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号