Skip to content

Enables Traditional mysql_ functions in PHP7, on systems where MySQLi is available.

License

Notifications You must be signed in to change notification settings

rlerner/bridgeMySQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

bridgeMySQL

A workaround for the removal of legacy mysql_* functions in PHP7+.

Requirements

This script routes legacy mysql_* functions to MySQLi functions, therefore the MySQLi extension is required.

On Windows, inside of PHP.INI:

;Remove semicolon on the following line:
;extension=php_mysqli.php

On Debian:

apt-get install php-mysql

Word of Advise

This code has been used on many production systems without issue, however a database abstraction layer such as this is a critical piece of functionality. Please verify that the functions you require appear supported with this script and test accordingly. Obviously, this is to be used at your own risk.

Installation

You can simply:

require_once "bridgeMySQL.php";

Or even prepend the file inside of PHP.INI:

auto_prepend=/path/to/bridgeMySQL.php

Ew

Yes, it uses globals. This is a hack made to get you through the process of modernizing your code.

About

Enables Traditional mysql_ functions in PHP7, on systems where MySQLi is available.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages