Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS SQLSRV drivers have "ignore_errors" #1298

Open
jamesmontalvo3 opened this issue Nov 15, 2021 · 0 comments
Open

MS SQLSRV drivers have "ignore_errors" #1298

jamesmontalvo3 opened this issue Nov 15, 2021 · 0 comments

Comments

@jamesmontalvo3
Copy link
Contributor

jamesmontalvo3 commented Nov 15, 2021

This only impacts installs with install_ms_sql_driver: true, which is done to enable the Microsoft SQL Server drivers for PHP. MS SQL is not used for MediaWiki itself. This driver is used on some installations to interact with third-party databases.

5b8a3e4 changed from doing

- name: Install sqlsrv and pdo_sqlsrv PECL packages
  pear:
    name: "{{ item }}"
    state: present
  with_items:
    - pecl/sqlsrv
    - pecl/pdo_sqlsrv

to using the pecl install <package> command directly. This was because the Ansible PEAR module was throwing errors even when the correct version of the package was already installed. Furthermore, when it got this error it appeared to think that the package wasn't installed, and it seems that it attempted to build it from source again. Building from source worked, but was unnecessary, and the command failed either due to a conflict with rebuilding the package or due to the original error.

Changing to pecl install <package> showed that the pecl command had a non-zero return code (an error) when the package was already installed. This is probably the cause of the initial error in the Ansible module (it runs install, gets an error, then attempts to build from source).

This behavior must have changed recently, since this command has worked for years.

PECL is annoying. Who uses it anymore. An alternative may be to use the Remi repo (where we could also get PHP versions) and install with sudo yum install php-sqlsrv php-pdo_sqlsrv.

The big issue with the new change is that it uses ignore_errors to get around the problem. This is not ideal.

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

No branches or pull requests

1 participant