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

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法