Skip to content

proc_open disabled on shared hosting, move/copy via worker fails with 500, no fallback available #110

@Giermann

Description

@Giermann

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

  1. Install FileRise on shared hosting with proc_open and related functions disabled (common on managed/shared hosts)
  2. Log in as admin
  3. Right-click any folder → Move (or Copy)
  4. Select a target folder and confirm
  5. 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_basedir is 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 when proc_open is 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions