duanliao6789 2017-02-07 10:41
浏览 73

将Laravel移动到另一个服务器错误

I am trying to move a laravel project to a new server. Before moving on to the new server I am testing it on localhost. I am getting the error like this: file_put_contents(/megashopping_dk_files/storage/framework/views/d2f79fe2bf4361439b4c43509087ad6167dfffd9.php): failed to open stream: No such file or directory

The original path in config.php was 0 => '/var/zpanel/hostdata/zadmin/public_html/megashopping_dk_files/resources/views', which I have changed to 0 => '/megashopping_dk_files/resources/views',

I have already deleted all the files in the folders cache sessions and views in storage/framework

Again I have got two root folders with file structure like this:

1st root Folder - megashopping_dk
backend
compaign
css
fonts
img
js
library
....
2nd Root Folder - megashopping_dk_files
app
bootstrap
config
database
public
resources
storage
....

From the above what I understand is that the contents of the First Root Folder should go in the root and the contents of the second Root Folder should go alongwith the folder in contains.

Please advise me the right path?

  • 写回答

2条回答 默认 最新

  • dongzouqie4220 2017-02-07 10:51
    关注

    TRY chmod -R guo+w storage

    Few explanations

    chmod -R guo+w storage : Whenever we add new service provider the cache folder for that service provider will be created in inside storage/framework . we need to make them writable from our application

    php artisan optimize : to reuse all frequently used classes php will make an cached class in cache/service.php. So we if add new service we need to run it. We need to use it whenever we add new dependency without using composer.

    php artisan cache:clear : clear all the above cache and remap everything

    For more information read https://sentinelstand.com/article/laravel-5-optimization-commands

    评论

报告相同问题?

悬赏问题

  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿