Skip to content

docs(admin): update pdo_mysql config section - #16032

Open
MichaIng wants to merge 2 commits into
masterfrom
fix/pdo_mysql
Open

MichaIng wants to merge 2 commits into
masterfrom
fix/pdo_mysql

Conversation

@MichaIng

@MichaIng MichaIng commented Nov 10, 2026 •

Copy link
Copy Markdown
Member
  • The legacy mysql module has been removed with PHP 7.0.
  • pdo_mysql is used, which extension=pdo_mysql.so even reflected, but the used config keys were for the mysql module, hence ineffective.
  • pdo_mysql has only two keys, from which only pdo_mysql.default_socket is relevant: https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.configuration
  • The builtin pdo_mysql.default_socket is usually correct, and should only be adjusted if it does not work OOTB. That way, changed distro defaults won't beak the setup. E.g. Debian Forky will switch from /run/mysqld/mysqld.sock to /run/mariadbd/mysqld.sock, hence setting this explicilty will cause a distro upgrade to break things.
  • ini sections in PHP config files generally serve visual structuring only, but are otherwise ignored. The more common ; for comments in PHP configs is used, otherwise the example is kept minimal, focusing on the added pdo_mysql.default_socket.
  • The config file path has been made more generic. Debian has its own config structure, with phpenmod/phpdismod, which not all distros share. But a per-module config file somewhere below /etc/php is common. This has been aligned for the PostgreSQL module, too.
  • The backwards-compatibility note has been moved below the config example, so that the pdo_mysql.default_socket sentence and related config example stay together.
  • Could be split off into an own PR, but since I found the ini syntax highlighting to be wrong, since generic code blocks were used, I replaced them with explicit .. code-block:: <lang> blocks.

☑️ Resolves

🖼️ Screenshots

Before

before

After

after

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

* The legacy `mysql` module has been removed with PHP 7.0.
* `pdo_mysql` is used, which `extension=pdo_mysql.so` even reflected, but the used config keys were for the `mysql` module, hence ineffective.
* `pdo_mysql` has only two keys, from which only `pdo_mysql.default_socket` is relevant: https://www.php.net/manual/en/ref.pdo-mysql.php#pdo-mysql.configuration
* The builtin `pdo_mysql.default_socket` is usually correct, and should only be adjusted if it does not work OOTB. That way, changed distro defaults won't beak the setup. E.g. Debian Forky will switch from `/run/mysqld/mysqld.sock` to `/run/mariadbd/mysqld.sock`, hence setting this explicilty will cause a distro upgrade to break things.
* ini sections in PHP config files generally serve visual structuring only, but are otherwise ignored. The more common `;` for comments in PHP configs is used, otherwise the example is kept minimal, focusing on the added `pdo_mysql.default_socket`. The config file path has been made more generic. Debian has its own config structure, with `phpenmod`/`phpdismod`, which not all distros share. But a per-module config file somewhere below /etc/php is common.
* The backwards-compatibility note has been moved below the config example, so that the `pdo_mysql.default_socket`  sentence and related config example stay together.

Signed-off-by: MichaIng <micha@dietpi.com>
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📖 Documentation Preview

🔍 Open preview →

📄 1 changed documentation page

Last updated: Tue, 10 Nov 2026 15:23:14 GMT

@MichaIng
MichaIng force-pushed the fix/pdo_mysql branch 2 times, most recently from aaa80fa to 5ca5864 Compare November 10, 2026 14:59
The database configuration page did not make use of explicit code clocks with respective syntax highlighting. This is hereby done across the page, replacing generic `::` blocks.

Signed-off-by: MichaIng <micha@dietpi.com>
@MichaIng

Copy link
Copy Markdown
Member Author

I tried to replace the single line code and command blocks with .. code-block:: and .. code::, too. But this somehow does not work, even when using the exact same syntax and language tag (or none) that works on other pages. Not sure what is missing, but single-line PHP code and shell commands have hence been left alone.

@MichaIng

Copy link
Copy Markdown
Member Author

Some more screenshots showing added syntax highlighting:

1 2 3 4

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant