enable mysql on PHP7

pppplus

Verified User
Joined
Dec 19, 2008
Messages
528
Hi

What is the simple way to activate mysql (not mysqli) in PHP 7 ?
I've some big parts of an old website, always with mysql.

It needs to much time actually, to update to mysqli to all parts (I will do it gradually).

Thanks for your help
Hubert
 
This is not possible. Mysql_* is removed from PHP7.

What you can eventually do is to make custom mapping functions like:

function mysql_connect($host, $user, $pass){
return mysqli_connect($host, $user, $pass);
}

But still - this requires editing the PHP code. You can't run legacy code on PHP7+ directly without modifications.
 
Back
Top