Download the PHP package hexblot/mssql-compat without Composer

On this page you can find all versions of the php package hexblot/mssql-compat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mssql-compat

MSSQL-Compat

MSSQL Compat is a small and simple drop-in library that allows your pre-7 PHP project, that uses MSSQL via mssql_* functions ( eg mssql_connect() et al ), to work transparently with PDO DBLib by providing the missing functions as wrappers around the equivalent PDO syntax - and all that with a single line!

The story

I recently started migrating internal web applications to new servers that use PHP7.

Thus I stumbled on a couple of old applications that use MSSQL with PHP, which I dearly hoped to avoid rewriting and debugging now that PHP7 has deprecated the mssql_* family of functions.

The result is this single-file solution: just include it before your first mssql_* call, and it will transparently wrap them to the equivalent PDO calls.

What it is not

Requirements

MSSQL-Compat requires the bare basics for PHP7 to be able to talk to MSSQL - namely:

Hint: All of the above are easily usable via repos such as IUS or Remi

How to use

Option A: Manually

Just download and add an include to this library on the top of the old application index.php file.

Option B: Via Composer

If your app doesn't already have one, add a require towards the autoload.php file generated by composer in your index.php:

Under the hood: Which functions are covered

This is the list of the functions that are currently covered. They were sufficient for my needs, but, understandably, you may need more for your projects. Let me know in the issues - patches are of course very welcomed!


All versions of mssql-compat with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
ext-pdo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hexblot/mssql-compat contains the following files

Loading the files please wait ....