Skip to content

Add common PHP extensions and keep PHP sessions in /tmp - #197

Merged
splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:php-setup
Nov 26, 2026
Merged

splitbrain merged 1 commit into
splitbrain:mainfrom
splitbrain-bot:php-setup

Conversation

@splitbrain-bot

Copy link
Copy Markdown

PHP could not start a session in a box. The session files went to /var/lib/php/sessions, which is on the read-only root filesystem. PHP showed "Read-only file system" and lost the session data at each request.

Changes:

  • A new 99-boxes.ini in the PHP conf.d directory sets session.save_path = /tmp and session.gc_probability = 1. Ubuntu sets the probability to 0 and removes old sessions with a cron job, which a box does not run.
  • The full image installs php-bz2, php-gmp, php-mysql, php-pgsql, php-ldap and php-soap.
  • The full-test stage checks the session path and these extensions.

The image was not built locally, because Docker is not available. The CI build runs the new checks.

PHP could not start a session in a box. The session files went to /var/lib/php/sessions, which is on the read-only
root filesystem. The sessions now go to the /tmp tmpfs. Ubuntu removes old sessions with a cron job, and a box runs
no cron, so PHP now removes them itself.

The full image also lacked common PHP extensions. It now installs bz2, gmp, mysql, pgsql, ldap and soap. The image
test checks the session path and these extensions.
@splitbrain
splitbrain merged commit 22addf1 into splitbrain:main Nov 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants