mirror of
https://github.com/projectsend/projectsend.git
synced 2026-09-23 12:03:20 +00:00
Merge pull request #1666 from projectsend/fix/1663-open-basedir-container-probe
Stop container detection from taking the dashboard down on shared hosting
This commit is contained in:
@@ -13,6 +13,18 @@ Anything under **Upgrade notes** is something you have to do, not something we d
|
||||
This section collects changes as they land; the release process turns it into a numbered entry when
|
||||
a version is cut.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The dashboard no longer fails on shared hosting.** To decide which update instructions to print,
|
||||
ProjectSend asks whether it is running inside a container by looking for a file in the root of the
|
||||
filesystem. On shared hosting PHP is usually confined to your own directory, and looking outside it
|
||||
is treated as an error rather than as a "no" — so the one page that asks the question, the
|
||||
dashboard, returned a 500 while every other page worked. It now takes the restriction as the answer
|
||||
it always was: a server that keeps PHP inside a single directory is not our container image, and
|
||||
gets the manual update instructions, which is correct for shared hosting anyway. Nothing to change
|
||||
on your side, and no setting you would have been able to change if there were.
|
||||
([#1663](https://github.com/projectsend/projectsend/issues/1663))
|
||||
|
||||
## 2.1.0 — 18 August 2026
|
||||
|
||||
Updating, mostly. ProjectSend now tells you when there is a new version, ends an update somewhere
|
||||
|
||||
@@ -43,6 +43,15 @@ class Installation
|
||||
protected function inContainer(): bool
|
||||
{
|
||||
// Docker writes the first; Podman writes the second.
|
||||
return file_exists('/.dockerenv') || file_exists('/run/.containerenv');
|
||||
//
|
||||
// Suppressed, and it has to stay that way. Shared hosting sets
|
||||
// open_basedir to the webspace, and probing a path outside it is a
|
||||
// warning rather than a false — which the framework's error handler
|
||||
// turns into an exception, so the one call that asks which install
|
||||
// this is took the whole dashboard down with it (#1663). Under `@`
|
||||
// the warning is filtered and the probe answers false, which is the
|
||||
// right answer anyway: a host that restricts PHP to a vhost
|
||||
// directory is not the container image.
|
||||
return @file_exists('/.dockerenv') || @file_exists('/run/.containerenv');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user