Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Lock, no such file or directory #61

Open
Cypaubr opened this issue Sep 26, 2016 · 5 comments
Open

Lock, no such file or directory #61

Cypaubr opened this issue Sep 26, 2016 · 5 comments

Comments

@Cypaubr
Copy link

Cypaubr commented Sep 26, 2016

When executing the lock command, Symfony throws a ContextErrorException :
Warning: fopen(/var/www/1day-symfony/app/var/cache/lock): failed to open stream: No such file or directory

How can I fix this?

@sdieunidou
Copy link

Hi, what is your Symfony version ?

@Cypaubr
Copy link
Author

Cypaubr commented Sep 27, 2016

The last release, Symfony3. I fixed this issue but now when I execute the command to lock the site, nothing changes.

@gizmo-rt
Copy link

Hi,
Current configuration:

class: '\Lexik\Bundle\MaintenanceBundle\Drivers\FileDriver'
options: {file_path: %kernel.root_dir%/cache/lock}

Working configuration:

class: '\Lexik\Bundle\MaintenanceBundle\Drivers\FileDriver'
options: {file_path: /var/www/1day-symfony/var/cache/lock}

@aivus
Copy link
Contributor

aivus commented Dec 7, 2017

Hi @Cypaubr @gizmo-rt
Do you remember which exactly symfony3 version did you use?

This issues could be caused by https://symfony.com/blog/new-in-symfony-3-3-a-simpler-way-to-get-the-project-root-directory

But %kernel.root_dir%/cache/lock for symfony3 points to the directory with AppKernel.php file. So, it's weird to see AppKernel.php in /app/var/

@Cypaubr
Copy link
Author

Cypaubr commented Dec 7, 2017

@aivus I don't remember, but not the 3.3 for sure it was older.

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

No branches or pull requests

4 participants