PHP installation
PHP runs the Metadata Editor web application (editor/ folder). The FastAPI service is separate (Python) — see Install and configure the FastAPI service.
This page covers PHP version, extensions, and php.ini settings. For full server setup, use:
| Platform | Guide |
|---|---|
| Linux (Apache or NGINX + PHP-FPM) | Installation (Linux) |
| Windows (IIS) | Installation (Windows) |
The web installer (first browser visit after deploy) checks PHP version, extensions, upload limits, and timezone — use it to confirm your configuration before creating the database.
Requirements
| Setting | Requirement |
|---|---|
| PHP version | 8.2 or later |
| Architecture (Windows IIS) | Non-Thread Safe (NTS) x64 |
| Architecture (Windows Apache) | Thread Safe x64 (if using Apache on Windows) |
| Database driver | mysqli (MySQL 8.x or MariaDB 10.x+) |
Extensions
The installer validates XML/XSL support. Enable the following in php.ini (or via PHP Manager on IIS):
| Extension | Required? | Purpose |
|---|---|---|
xsl | Yes | DDI and XML metadata transforms |
xml, simplexml, xmlreader | Yes | XML parsing |
mysqli | Yes | MySQL / MariaDB |
curl | Yes (production) | HTTP client (NADA publish, FastAPI service, external APIs) |
openssl | Yes (production) | HTTPS and secure connections |
mbstring | Strongly recommended | Multibyte strings |
zip | Strongly recommended | Archive import/export |
gd | Optional | Image handling (marked optional in the installer) |
Linux package names (Debian/Ubuntu examples): php-xml, php-xsl, php-mysql, php-curl, php-mbstring, php-zip, php-gd.
Windows IIS (php.ini or PHP Manager): enable extension=mysqli, extension=xsl, extension=curl, extension=openssl, extension=mbstring, extension=zip, and ensure XML support is available in your PHP build.
Recommended php.ini settings
Large microdata uploads and long-running imports need generous limits:
| Setting | Recommended value | Notes |
|---|---|---|
memory_limit | 512M or higher | Windows guide uses 528M; increase for very large files |
max_execution_time | 300 | Seconds; background jobs may run longer via CLI worker |
post_max_size | 2000M | Must be ≥ upload_max_filesize |
upload_max_filesize | 2000M | Adjust to your largest expected upload |
file_uploads | On | Required for data import |
date.timezone | e.g. UTC or your region | Required — installer fails if unset |
Set date.timezone explicitly. See PHP timezone list.
Linux (PHP-FPM)
On Linux, install PHP and extensions from your distribution, then use PHP-FPM with Apache or NGINX.
Debian / Ubuntu example:
sudo apt update
sudo apt install php8.2-fpm php8.2-mysql php8.2-xml php8.2-xsl php8.2-curl \
php8.2-mbstring php8.2-zip php8.2-gd
sudo systemctl enable --now php8.2-fpmEdit /etc/php/8.2/fpm/php.ini (path may vary) for upload limits and timezone, then restart FPM:
sudo systemctl restart php8.2-fpmPoint the web server document root at the editor folder (e.g. /var/www/metadata-editor/editor). NGINX and Apache examples: Installation (Linux).
Verify:
php -v
php -m | grep -E 'mysqli|xsl|curl|mbstring|zip'Windows — IIS (recommended)
Production Windows installs use IIS with PHP 8.2+ NTS x64. Also install:
- URL Rewrite Module — front-controller routing
- PHP Manager for IIS 10 — optional but simplifies extension and
php.inimanagement
Download PHP: windows.php.net — choose VS16 x64 Non Thread Safe (or current equivalent for PHP 8.2+).
Install PHP with PHP Manager
- Extract the PHP zip to a fixed path, e.g.
C:\PHP\PHP82. - Open IIS Manager → select the server node (not a single site) → open PHP Manager.
- Click Register new PHP version and select
php-cgi.exeorphp.exefrom the extracted folder. - For the Metadata Editor site, ensure the registered version is PHP 8.2+.
- Open Manage all settings and set upload limits,
memory_limit,max_execution_time, anddate.timezone(see table above). - Open Enable or disable an extension and enable the extensions listed in the table above.
Create the IIS site or application with physical path ...\metadata-editor\editor (the folder containing index.php), app pool No Managed Code, Integrated pipeline. Full walkthrough: Installation (Windows).
Windows — Apache (optional)
Apache on Windows is supported for development or legacy setups. Use the Thread Safe (TS) x64 PHP build matched to your Apache architecture.
- Download PHP TS x64 from windows.php.net.
- Install Apache Lounge or another Apache 2.4 build for Windows.
- Extract PHP to e.g.
C:\phpand add tohttpd.conf:
LoadModule php_module "C:/php/php8apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/php"- Configure
php.ini(extensions and limits as above), restart Apache, and confirm withphpinfo().
For production on Windows, prefer IIS — it is the path covered in Installation (Windows).
Verify before install
- Browse to the Metadata Editor URL (document root =
editor/). - On the installer page, expand Required PHP Extensions — all required rows should show enabled.
- Expand Other PHP settings — confirm upload sizes and timezone.
- Fix any red items, then proceed with Install Database.
After PHP is working, continue with Install and configure the FastAPI service and Post-install configuration.