-
-
Notifications
You must be signed in to change notification settings - Fork 43
proc_open disabled on shared hosting, move/copy via worker fails with 500, no fallback available #110
Description
Describe the bug
Moving or copying folders fails on shared hosting environments where proc_open(), shell_exec(), popen(), passthru() and system() are disabled via disable_functions in php.ini. The UI shows "Waiting for worker..." indefinitely, then returns "Failed to start transfer job (error 500)". No fallback for synchronous execution exists.
To Reproduce
- Install FileRise on shared hosting with
proc_openand related functions disabled (common on managed/shared hosts) - Log in as admin
- Right-click any folder → Move (or Copy)
- Select a target folder and confirm
- UI shows "Waiting for worker..." for a long time, then: "Failed to start transfer job (error 500)"
Expected behavior
Move and copy operations should either fall back to synchronous in-process execution when proc_open() is unavailable, or provide a configuration constant (e.g. FR_WORKER_MODE=sync) to opt into synchronous execution — so that the operation completes successfully without requiring a background worker process.
Additional context
- FileRise version: 3.11.0
- Install type: Manual (no Docker, no SSH)
- PHP version: 8.x (shared hosting)
- Disabled functions (relevant):
proc_open,shell_exec,popen,passthru,system - Available:
exec()is available open_basediris set to restrict access outside the webspace- Moving or copying both files and folders triggers the worker and fails — no move or copy operation works at all.
- A config-level opt-in like
define('FR_WORKER_MODE', 'sync')or an automatic fallback whenproc_openis not callable would solve this for shared hosting users
Shared hosting is a common deployment scenario for small teams and the lack of a fallback makes folder operations completely unusable in this environment.
Root cause identified: spawnZipWorker() and TransferJobManager::spawnWorker() use shell_exec() to spawn the background process (even though exec() is available and used for PHP binary detection). Since shell_exec is disabled via disable_functions on shared hosting, the worker spawn always fails. A fallback to exec() for the spawn call, or a synchronous execution path when no shell function can start a background process, would fix this.