-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Install tool uses same names for .lock files in all installations #1107
Comments
|
As far as I know, we‘re using the Symfony locking component, so very strange this is happening?
|
|
Multiple comments here:
I think we should adjust the final protected function execute(InputInterface $input, OutputInterface $output)
{
- $lock = new LockHandler($this->getName());
+ $projectDir = $this->getContainer()->getParameter('kernel.project_dir');
+ $lockDir = rtrim($projectDir, '/') . '/var/contao-command-locks';
+ $lock = new LockHandler($this->getName(), $lockDir); |
|
Yes, setting sys_temp_dir in PHP.INI to a individual value solves the problem. |
|
I think Contao should use an unique path by default |
|
I think so, too. |
+1 for the idea, however, this will only work if |
|
Why don't we use the cache_dir for the lock files, too? |
|
A cache dir should never contain temporary data. See discussion in symfony/symfony#23354 but for now there seems to be no official decision on the Symfony side. |
|
Maybe we should re-add a temporary directory? We still have |
|
I just checked and the |
|
I agree, yes. We can still move all our tmp data once there is such a concept in SF :) |
|
Fixed in e57da33. |
|
Just as a side note, the cache folder is not necessarily supposed to be writable. I've read up on the topic of that recently and Symfony recommended to do store stuff in |
|
One problem I see or encountered with this is, if you install contao via cli and using a different os user then when accessed via webserver it throws errors because the generated folder in /tmp is not writeable for contao anymore. for example if you upload files. |
I know and I have also discussed this with @Toflar and @ausi. The problem, however, is that there is no
That's not what we have agreed on though. 😄 sys_get_temp_dir().'/'.md5($this->getContainer()->getParameter('kernel.project_dir')) |

Running multiple Contao 4.4.5 websites on the same dedicated server (all-inkl) allows the call of the install tool for one installation only until the root user deletes all .lock files in the global /tmp directory. Even a modification of the PHP session path in .htaccess solves not the problem.
Another impact is, that in Maintenance a „Recreate the symlinks“ brings in all Contao installations the same server error:
The comment from the server admin is: “Es sollten variable Dateibezeichnungen vom Install-Tool verwendet und auch diese Dateien am Ende wieder entfernt werden. Die identischen Namen für die .lock-Dateien verursachen ja erst die Probleme.” I agree. What could be any reason for identical names for the .lock files and why do they remain after finishing the install tool?
On a dedicated server at domainFactory this problem does also occur with multiple 4.4.5 installations by different SSH-users but one global /tmp. Even after changing session.save_path to a local directory in PHP.INI only the first opend install tool of in the whole server works.
The text was updated successfully, but these errors were encountered: