Downloads · 30 days
0
rzhugging/php-mongodb-mssql-extensions
php-mongodb-mssql-extensions is a machine learning model from rzhugging. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
A self-contained, air-gap-ready bundle of prebuilt PHP extension binaries for MongoDB and Microsoft SQL Server (sqlsrv + pdosqlsrv), plus every runtime dependency normally downloaded from the internet at install time.…
Downloads · 30 days
0
Access
Public
Updated Aug 30, 2026
Repo size
163 MB
Likes
0
Public
Click a slice to open those files.
.dll70.5 MB · 43%
From the Hugging Face model README
A self-contained, air-gap-ready bundle of prebuilt PHP extension binaries for MongoDB and
Microsoft SQL Server (sqlsrv + pdo_sqlsrv), plus every runtime dependency normally
downloaded from the internet at install time. Designed to be copied into an isolated network with
no internet access.
Covers PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 on Windows (x64 + x86) and Linux (x86_64).
Clarifications on the original request
- There is no "PHP 7.46" — PHP 7.x ended at 7.4.33. This bundle targets PHP ≥ 7.4.
- On Windows PHP extensions are
.dll(php_mongodb.dll,php_sqlsrv.dll,php_pdo_sqlsrv.dll);.sofiles are Linux-only. Both are provided, correctly per-OS.
| Component | Windows | Linux |
|---|---|---|
| mongodb extension | ✅ 7.4–8.4, x64+x86, TS+NTS | ✅ 7.4–8.4 (RHEL 9 + Debian 12) |
| sqlsrv extension | ✅ 7.4–8.4, x64+x86, TS+NTS | ✅ 7.4–8.4 (RHEL 9) |
| pdo_sqlsrv extension | ✅ 7.4–8.4, x64+x86, TS+NTS | ✅ 7.4–8.4 (RHEL 9) |
| MS ODBC Driver (MSSQL runtime dep) | ✅ v17 + v18, x64+x86 (MSI) | ✅ v17 + v18 (Debian .deb + RHEL .rpm) |
| Visual C++ Redistributable (DLL runtime dep) | ✅ x64 + x86 | n/a |
109 files, ~156 MB. Every binary is listed with a SHA-256 in SHA256SUMS.
windows/php<VER>/<ts|nts>/<x64|x86>/php_mongodb.dll
/php_sqlsrv.dll
/php_pdo_sqlsrv.dll
linux/rhel9/php<VER>/x64/mongodb.so # RHEL/Rocky/Alma/CentOS 9 (complete: all 3 exts)
/sqlsrv.so
/pdo_sqlsrv.so
linux/debian12/php<VER>/x64/mongodb.so # Debian 12 / Ubuntu (mongodb only)
runtime/windows/ msodbcsql18_x64.msi msodbcsql18_x86.msi
msodbcsql17_x64.msi msodbcsql17_x86.msi
VC_redist.x64.exe VC_redist.x86.exe
runtime/linux/debian12/ msodbcsql18_*.deb msodbcsql17_*.deb
runtime/linux/rhel9/ msodbcsql18-*.rpm msodbcsql17-*.rpm
SHA256SUMS
LINUX-MSSQL-BUILD.md # fallback: build sqlsrv/pdo_sqlsrv on other distros
ts = Thread-Safe (Apache mod_php); nts = Non-Thread-Safe (php-fpm / FastCGI / CLI — the usual pick).
Check yours: php -i | grep "Thread Safety" (Linux) or php -i | findstr "Thread" (Windows).
runtime/windows/VC_redist.x64.exe (and/or the x86 one for 32-bit PHP).msiexec /i runtime\windows\msodbcsql18_x64.msi IACCEPTMSODBCSQLLICENSETERMS=YES (v18 recommended; v17 also included).php -i → PHP Version, Thread Safety, Architecture) and copy the DLL(s)
from windows/php<VER>/<ts|nts>/<arch>/ into your PHP ext\ directory.php.ini:
extension=php_mongodb.dll
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
php -m.sudo ACCEPT_EULA=Y rpm -i runtime/linux/rhel9/msodbcsql18-*.rpm
# requires unixODBC from your base OS media/repo: sudo dnf install unixODBC
.so for your PHP version to the extension dir (php-config --extension-dir, e.g.
/usr/lib64/php/modules/):
sudo cp linux/rhel9/php8.3/x64/{mongodb.so,sqlsrv.so,pdo_sqlsrv.so} $(php-config --extension-dir)/
.ini files in your PHP conf.d:
extension=mongodb.so
extension=sqlsrv.so
extension=pdo_sqlsrv.so
php -m | grep -Ei 'mongodb|sqlsrv' to verify.linux/debian12/php<VER>/x64/mongodb.so — copy it to your
extension dir (php -i | grep extension_dir) and add extension=mongodb.so.runtime/linux/debian12/msodbcsql18_*.deb
(sudo ACCEPT_EULA=Y dpkg -i ...; needs unixodbc from base repo). Prebuilt sqlsrv.so /
pdo_sqlsrv.so for Debian are not in this bundle (Microsoft ships them as source only) — either
reuse the RHEL 9 .so if your glibc is compatible, or compile them with
LINUX-MSSQL-BUILD.md on a connected build box and copy the result in..so are glibc builds — they will not run on musl distros
(Alpine). On Alpine use apk add php<ver>-mongodb / build against musl.php8.2 .so/.dll only loads in PHP 8.2..so are ABI-compatible for the same PHP minor on
most modern glibc systems, but for production prefer the set matching your actual distro.| PHP | Win mongodb | Win sqlsrv/pdo | Linux mongodb (rhel9 / deb12) | Linux sqlsrv/pdo (rhel9) |
|---|---|---|---|---|
| 7.4 | 1.20.1 | 5.10.0 | 1.20.1 / 1.20.1 | 5.10.1 |
| 8.0 | 1.20.1 | 5.10.0 | 1.20.1 / 1.20.1 | 5.11.1 |
| 8.1 | 2.4.1 | 5.12.0 | 2.4.1 / 2.1.4 | 5.12.0 |
| 8.2 | 2.4.1 | 5.12.0 | 2.4.1 / 2.1.4 | 5.12.0 |
| 8.3 | 2.4.1 | 5.13.3 | 2.4.1 / 2.1.4 | 5.13.3 |
| 8.4 | 2.4.1 | 5.13.3 | 2.4.1 / 2.1.4 | 5.13.3 |
ODBC driver: v18.6.2.1 + v17 (17.10.6.1 Win / 17.11.1.1 Linux). VC++ Redist: VS2015–2022 (17.x).
Verify integrity with sha256sum -c SHA256SUMS (Linux) or CertUtil -hashfile <file> SHA256 (Windows).
sqlsrv, pdo_sqlsrv) — MIT