简体   繁体   English

Laravel显示空白页面(连续加载)

[英]Laravel shows blank page (continuously loading)

After having installed Laravel 5.1 on a local desktop, I installed it on a webserver (debian 8, php 5.6.17), set the directory permissions for storage and bootstrap/cache tp 1777. All worked fine. 在本地桌面上安装Laravel 5.1之后,我将它安装在网络服务器上(debian 8,php 5.6.17),设置存储和bootstrap / cache tp 1777的目录权限。一切正常。 Next I installed it on another webserver, same method, same settings, but now it only shows a coninuously loading page. 接下来我将它安装在另一个网络服务器上,相同的方法,相同的设置,但现在它只显示一个连续的加载页面。 Tried a re-install, with the same result 尝试重新安装,结果相同

Started manual debugging and the code falters in the index.php at $kernel->terminate(.... I also changed caching and session storage to redis, which made no difference. 在$ kernel-> terminate(....我还将缓存和会话存储更改为redis,这没有任何区别,启动了手动调试,代码在index.php中停滞不前。

Have been reading through the 'blank pages' posts, and been googling on it too, without any helpfull result so far. 一直在阅读“空白页”帖子,并一直在谷歌上搜索,到目前为止没有任何有用的结果。

If I let the script die before the '$kernel->terminate(...' line it shows the page else it just shows the page loading ... Unfortunately, pagination, and sorting ao do not work due to the premature ending of the script. 如果我让脚本在'$ kernel->终止之前死掉(...'行显示其他页面它只显示页面加载...不幸的是,分页和排序ao由于过早结束而不起作用剧本。

Anyone encountered this peculiar behaviour before 以前任何人都遇到过这种奇特的行为

Cheers, 干杯,

It happens most probably due to permission issue.Try this 它很可能是由于权限问题而发生的。试试这个

chmod 777 -R storage/

Storage folder existed inside the Laravel folder.If nothing works, try to give full permission to Laravel Project folder and try again. 存储文件夹存在于Laravel文件夹内。如果无效,请尝试向Laravel Project文件夹授予完全权限,然后重试。

Problem caused by NFS filesystem. NFS文件系统导致的问题。 It doesn't allow file locking. 它不允许文件锁定。 Solved the problem by writing sessions to memcached 通过向memcached写入会话解决了这个问题

For me what fixed my issue was removing some laravel comment in my blade files. 对我来说,修复我的问题是在我的刀片文件中删除一些laravel注释。 Especially comments of html code on multiple lines. 尤其是html代码在多行上的注释。 It took afew days to figure it out!! 花了几天时间搞清楚! Very annoying. 很烦人。 {{-- html code here --}} {{ - html code here - }}

see: Blade Comments in Laravel are crashing apache Laravel - Blade comments , blade rendering causing page to crash 请参阅: Laravel中的刀片评论正在崩溃Apache Laravel - 刀片评论,刀片渲染导致页面崩溃

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM