A complete PHP 8.3 package for Synology NAS (DS920+ / Geminilake architecture) with extension management capabilities.
- PHP 8.3.8 with full CLI and FPM support
- Interactive Extension Selection during installation via DSM Package Center wizard
- Post-Install Configuration Panel to enable/disable extensions through DSM interface
- Dependency Management - automatically handles extension dependencies and conflicts
- Optimized for DS920+ (Geminilake) with proper resource limits
- Logging & Audit - full audit trail of extension changes
- Web Station Compatible - integrates seamlessly with DSM's Web Station
- PHP 8.3.8 CLI and FPM binaries
- Default
php.inituned for Synology (128MB memory, opcache enabled) - PHP-FPM pool configuration (dynamic PM, 5 max children)
- Extension management system with JSON-based configuration
- Networking: curl, openssl
- Database: pdo_mysql, mysqli, pdo_sqlite, sqlite3
- Localization: intl
- Graphics: gd
- Compression: zip, zlib
- Data: json, xml, mbstring
- Installation wizard with extension selector
- DSM configuration panel (ExtJS-based)
- REST API for extension management (
/php83/extensions) - Command-line utilities for batch operations
-
Clone this repository
git clone <repo-url> cd php8.3
-
Download PHP sources (already done if following this guide)
cd spk/php83 bash scripts/download-php-source.sh 8.3.8 files/php-src -
Build the SPK structure
cd ../.. bash scripts/build-spk.shThis creates:
dist/php83_8.3.8-0001_geminilake.spk
The built SPK is a structure-only package. To make it functional, you need to:
# Install spksrc
git clone https://github.com/SynoCommunity/spksrc.git
cd spksrc
# Build PHP for Geminilake
make setup
make arch-geminilake-7.2 php83
# Copy binaries to package
cp -r /path/to/spksrc/build/php83/install/* \
/path/to/php8.3/spk/php83/files/bin/
# Rebuild SPK
cd /path/to/php8.3
bash scripts/build-spk.shSee docs/COMPILATION.md for detailed cross-compilation instructions.
# If you have access to pre-built PHP binaries for Geminilake:
tar xzf php-8.3.8-geminilake.tar.gz -C spk/php83/files/
bash scripts/build-spk.sh- Open Package Center on your Synology DSM
- Click Manual Install
- Select the
php83_8.3.8-0001_geminilake.spkfile - Follow the installation wizard:
- Select which PHP extensions to enable
- Review dependencies and conflicts
- Confirm installation
- Go to Main Menu β PHP 8.3
- The configuration panel allows you to:
- Enable/disable extensions
- View extension details and dependencies
- See disk footprint and restart requirements
- Apply changes (with automatic FPM restart)
/var/packages/php83/
βββ target/ # Installed package
β βββ bin/ # PHP binaries (php, php-fpm)
β βββ conf/ # Configuration files
β β βββ php.ini
β β βββ php-fpm.conf
β β βββ pkgctl-php83.sc # Service control
β βββ lib/ # PHP libraries and extensions
β βββ scripts/ # Management scripts
βββ conf/ # Runtime configuration
β βββ extension_selection.json # Active extension profile
βββ var/ # Runtime data
β βββ log/ # Logs
β βββ run/ # PID files, sockets
β βββ sessions/ # PHP sessions
β βββ tmp/ # Temporary files
βββ source/ # PHP source archive (for reference)
βββ php-8.3.8.tar.gz
Applications can connect to PHP-FPM via:
/var/packages/php83/var/run/php-fpm.sock
Configure your web server (nginx/Apache) to use this socket.
- PHP Errors:
/var/packages/php83/var/log/php_errors.log - FPM Errors:
/var/packages/php83/var/log/php-fpm.log - FPM Pool Errors:
/var/packages/php83/var/log/php-fpm-www-error.log - Extension Events:
/var/packages/php83/var/log/extension-events.log
php8.3/
βββ spk/php83/ # Package definition
β βββ INFO # Package metadata
β βββ Makefile # Build configuration
β βββ conf/ # Package configuration
β β βββ privilege # DSM permissions
β β βββ resource.conf # REST API routes
β β βββ pkgctl-php83.sc # Service control definition
β βββ files/ # Package content
β β βββ conf/ # Default configs
β β βββ bin/ # Utilities
β β βββ php-src/ # PHP source tarball
β βββ src/ # Source scripts and UI
β β βββ install-wizard/ # Installation wizard UI
β β βββ config-panel/ # DSM configuration panel
β β βββ scripts/ # Installation & management scripts
β βββ icons/ # Package icons
βββ scripts/ # Build scripts
β βββ build-spk.sh # Main SPK builder
βββ specs/ # Feature specifications
β βββ 001-extension-selection/
βββ tests/ # Test suites
β βββ integration/
β βββ unit/
βββ dist/ # Build output
# Unit tests (extension configuration logic)
bash tests/unit/extension-selection/test-config.sh
# Integration tests (requires DS920+ or VM)
bash tests/integration/extension-selection/install-wizard.sh
bash tests/integration/extension-selection/config-panel.shSee specs/001-extension-selection/quickstart.md for developer workflow.
For security, these functions are disabled in FPM by default:
exec,passthru,shell_exec,systemproc_open,popencurl_exec,curl_multi_execparse_ini_file,show_source
Modify /var/packages/php83/target/conf/php-fpm.conf to adjust.
- FPM runs as
http:httpuser - Configuration API requires
system:administratorsgroup - Session directory has
1733permissions (sticky + restricted)
- Constitution:
.specify/memory/constitution.md- Core principles - Feature Spec:
specs/001-extension-selection/spec.md- Extension management feature - Implementation Plan:
specs/001-extension-selection/plan.md - Developer Guide:
specs/001-extension-selection/quickstart.md - Data Model:
specs/001-extension-selection/data-model.md - API Contracts:
specs/001-extension-selection/contracts/
- Follow the Constitution principles (upstream parity, reproducible builds, DSM integration)
- Create feature branches following the spec workflow
- Test on DS920+ hardware before submitting
- Update documentation and tests
This package follows PHP's license for the included PHP sources. Package scripts and tooling are provided as-is for Synology NAS users.
- Unofficial Package: Not endorsed by Synology or PHP
- Target Hardware: DS920+ (Geminilake) on DSM 7.x
- Use at Your Own Risk: Test in non-production first
- No Warranty: Community-maintained project
- Check DSM version (requires 7.2+)
- Verify architecture (must be Geminilake)
- Review
/var/log/packages/php83.log
- Check
/var/packages/php83/var/log/php_errors.log - Verify extension file exists:
ls /var/packages/php83/target/lib/php/extensions/ - Run
php -mto see loaded modules
- Check FPM log:
cat /var/packages/php83/var/log/php-fpm.log - Verify socket permissions:
ls -la /var/packages/php83/var/run/ - Test config:
/var/packages/php83/target/bin/php-fpm -t
- Verify service is running:
synoservicectl --status pkgctl-php83 - Check DSM user has administrator rights
- Review resource configuration:
cat /var/packages/php83/conf/resource.conf
- Issues: File bugs and feature requests on GitHub
- Synology Forums: Community support for DSM packages
- PHP Documentation: https://www.php.net/docs.php
Built with β€οΈ for the Synology community