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

    评论

报告相同问题?