Issue
The docs about PHP MySQL driver configuration are so outdated they are wrong
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html#configuring-a-mysql-or-mariadb-database
https://github.com/nextcloud/documentation/blob/master/admin_manual/configuration_database/linux_database_configuration.rst#L101-L120
The PHP configuration in /etc/php7/conf.d/mysql.ini could look like this:
```ini
# configuration for PHP MySQL module
extension=pdo_mysql.so
[mysql]
mysql.allow_local_infile=On
mysql.allow_persistent=On
mysql.cache_size=2000
mysql.max_persistent=-1
mysql.max_links=-1
mysql.default_port=
mysql.default_socket=/var/lib/mysql/mysql.sock # Debian squeeze: /var/run/mysqld/mysqld.sock
mysql.default_host=
mysql.default_user=
mysql.default_password=
mysql.connect_timeout=60
mysql.trace_mode=Off
```
The example shows runtime configuration for MySQL (Original) which is removed since PHP 7.0
This extension is deprecated as of PHP 5.5.0, and has been removed as of PHP 7.0.0. Instead, either the mysqli or PDO_MySQL extension should be used. See also the MySQL API Overview for further help while choosing a MySQL API.
Given that the required PHP runtime for Nextcloud is PHP 7.2+ the docs should not reflect any possible configuration applicable to PHP version lower than 7.
Proposed solution
1
At first the docs could just refer to applicable PHP.net entries, namely
; configuration for php mysql module
; priority=10
extension=mysqlnd.so
; https://www.php.net/manual/en/mysqlnd.config.php
; mysqlnd.collect_statistics=1
; mysqlnd.collect_memory_statistics=0
; mysqlnd.debug=
; mysqlnd.log_mask=0
; mysqlnd.mempool_default_size=16000
; mysqlnd.net_read_timeout=86400
; mysqlnd.net_cmd_buffer_size=4096
; mysqlnd.net_read_buffer_size=32768
; mysqlnd.sha256_server_public_key=
; mysqlnd.trace_alloc=
; mysqlnd.fetch_data_copy=0
; configuration for php mysql module
; priority=20
extension=pdo_mysql.so
; https://www.php.net/manual/en/ref.pdo-mysql.php
; pdo_mysql.default_socket=/run/mysqld/mysqld.sock
; pdo_mysql.debug=
Given that NC uses PDO MySQLi runtime configuration is not applicable.
2
Afterwards the docs can suggest mysqlnd and pdo_mysql values, if any.
Related
#571
Issue
The docs about PHP MySQL driver configuration are so outdated they are wrong
https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html#configuring-a-mysql-or-mariadb-database
https://github.com/nextcloud/documentation/blob/master/admin_manual/configuration_database/linux_database_configuration.rst#L101-L120
The example shows runtime configuration for MySQL (Original) which is removed since PHP 7.0
Given that the required PHP runtime for Nextcloud is PHP 7.2+ the docs should not reflect any possible configuration applicable to PHP version lower than 7.
Proposed solution
1
At first the docs could just refer to applicable PHP.net entries, namely
Given that NC uses PDO MySQLi runtime configuration is not applicable.
2
Afterwards the docs can suggest
mysqlndandpdo_mysqlvalues, if any.Related
#571