Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates compiled file on root directory when set compiled path doesn't exists #14271

Closed
skys215 opened this issue Jul 11, 2016 · 2 comments
Closed

Comments

@skys215
Copy link

skys215 commented Jul 11, 2016

I cloned a lumen-based project and changed my storage path.
When I visit the homepage, it comes out with the error:

ErrorException in Filesystem.php line 81:
file_put_contents(/f536123a25b04be16752e137caae936b): failed to open stream: Permission denied

It's quite weird that cache file is going to store at root directory. I didn't set that kind of thing.
After debugging, I found out that the problem comes from config/view.php#L31.
According to the PHP Document of realpath function, it will return false when the directory doesn't exists, which will be convert to empty string "" when generating the compiled path at View/Compilers/Compiler.php#44.
I think the compiled path should be created when the application starts or it's better to dump more friendly message rather then compiling on the root directory.

@GrahamCampbell
Copy link
Member

Thanks for the report.

@GrahamCampbell
Copy link
Member

See #14277.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants