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

sysinfo on shared hosting #1415

Open
hupe13 opened this issue Mar 5, 2025 · 3 comments
Open

sysinfo on shared hosting #1415

hupe13 opened this issue Mar 5, 2025 · 3 comments
Labels
needs triage To be triaged

Comments

@hupe13
Copy link

hupe13 commented Mar 5, 2025

Okay, yesterday I opened this issue, but there was an update. But after the update (7.5.2) the error occus again, but now these are only php errors:

"app":"PHP","method":"GET","url":"/nextcloud/index.php/apps/memories/api/system-status","message":"proc_open(): posix_spawn() failed: Permission denied at /nextcloud/apps/memories/lib/Util.php#489",

My website is on a shared hosting and such an user don't have access to this information.

@hupe13 hupe13 added the needs triage To be triaged label Mar 5, 2025
@hupe13 hupe13 closed this as completed Mar 5, 2025
@hupe13 hupe13 reopened this Mar 6, 2025
@pulsejet
Copy link
Owner

pulsejet commented Mar 6, 2025

Memories cannot work without proc_open

@hupe13
Copy link
Author

hupe13 commented Mar 7, 2025

proc_open works, but on a shared hosting is not any ps command:

[07-Mar-2025 07:03:51 UTC] Array
(
    [0] => which
    [1] => ps
)

[07-Mar-2025 07:03:51 UTC] Array
(
    [0] => ps
    [1] => -eao
    [2] => pid,comm
)

@hupe13
Copy link
Author

hupe13 commented Mar 7, 2025

I commented this out, now no errors appear:

$procs = Util::execSafe(array_merge($ps, ['-eao', 'pid,comm']), 1000) ?: '';
$procs = explode("\n", $procs);
$matches = array_filter($procs, static fn ($l) => str_contains($l, $name));
$pids = array_map(static fn ($l) => (int) explode(' ', trim($l))[0], $matches);
if (empty($pids)) {
return;
}
foreach ($pids as $pid) {
posix_kill($pid, 9); // SIGKILL
}

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

No branches or pull requests

2 participants