Skip to content

Refer Windows users to GitHub releases instead of PECL for DLLs #1016

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

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ wrap the script in ``<pre>`` tags to properly format its output:
Loading an Incompatible DLL on Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PECL builds Windows binaries for various combinations of PHP version,
thread-safety (TS or NTS), and architecture (x86 or x64). Failure to select the
Windows binaries are available for various combinations of PHP version,
thread safety (TS or NTS), and architecture (x86 or x64). Failure to select the
correct binary will result in an error when attempting to load the extension DLL
at runtime:

Expand All @@ -88,14 +88,17 @@ Ensure that you have downloaded a DLL that corresponds to the following PHP
runtime properties:

- PHP version (``PHP_VERSION``)
- Thread-safety (``PHP_ZTS``)
- Thread safety (``PHP_ZTS``)
- Architecture (``PHP_INT_SIZE``)

In addition to the aforementioned constants, these properties can also be
inferred from :php:`phpinfo() <phpinfo>`. If your system has multiple PHP
runtimes installed, double-check that you are examining the ``phpinfo()`` output
for the correct environment.

The aforementioned ``detect-extension`` script can also be used to determine the
appropriate DLL for your PHP environment.

Server Selection Failures
-------------------------

Expand Down
17 changes: 9 additions & 8 deletions docs/tutorial/install-php-library.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@ file:

extension=mongodb.so

Windows users can download precompiled binaries of the extension from
`PECL <https://pecl.php.net/package/mongodb>`_. After extracting the
``php_mongodb.dll`` file to PHP's extension directory, add the following line to
your ``php.ini`` file:
Windows users can download precompiled binaries of the extension from its
`GitHub releases <https://github.com/mongodb/mongo-php-driver/releases>`__.
After downloading the appropriate archive for your PHP environment, extract the
``php_mongodb.dll`` file to PHP's extension directory and add the following line
to your ``php.ini`` file:

.. code-block:: ini

extension=php_mongodb.dll

Additional considerations for Windows are discussed in the
:php:`Windows installation documentation <manual/en/mongodb.installation.windows.php>`.
See :php:`Installing the MongoDB PHP Driver on Windows <manual/en/mongodb.installation.windows.php>`
for additional information.

Installing the Library
----------------------
Expand Down Expand Up @@ -85,8 +86,8 @@ Manual Installation Without Composer

While not recommended, you may also manually install the library using a source
archive attached to the
`GitHub releases <https://github.com/mongodb/mongo-php-library/releases>`_. When
installing the library without Composer, you must ensure that all library
`GitHub releases <https://github.com/mongodb/mongo-php-library/releases>`__.
When installing the library without Composer, you must ensure that all library
classes *and* functions are loaded for your application:

#. If you are using a `PSR-4 <https://www.php-fig.org/psr/psr-4/>`_ autoloader,
Expand Down