PHP Classes

Validating the MySQL to MySQLi class

Recommend this page to a friend!

      PHP MySQL to MySQLi  >  PHP MySQL to MySQLi package blog  >  Do tomorrow what does...  >  All threads  >  Validating the MySQL to MySQLi class  >  (Un) Subscribe thread alerts  
Subject:Validating the MySQL to MySQLi class
Summary:Validating on a server that still has MySQL running
Messages:2
Author:Joe Yeatman
Date:2017-03-07 22:15:15
 

  1. Validating the MySQL to MySQLi class   Reply   Report abuse  
Picture of Joe Yeatman Joe Yeatman - 2017-03-07 22:15:15
A comment states that this class replaces the MySQL functions on a server where they can not be found. So, on a server that does still support MySQL, how do I verify that this new code works as expected for me?

I ask because I use a shared server and do not have access to configuring PHP on it, and do not know if/when they may upgrade to PHP 7. I want to protect myself against this eventuality, but prior to them upgrading to 7, the MySQL stuff will still work. Would like to KNOW that I'm going through the surrogate code safely in the mean time.
Thanks.

  2. Re: Validating the MySQL to MySQLi class   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2017-03-08 07:58:33 - In reply to message 1 from Joe Yeatman
The only way to test is to run your unmodified script on a php installation that does not have the mysql extension. The class works by wrapping the mysqli methods with functions that duplicate the mysql extension, so both can not be defined at the same time.

It has been tested, and so far there have not been any issues that have not already been dealt with.

One thing that I can guarantee, if your host does upgrade and this package is not installed in an application still using the mysql extension, it will definitely fail.

Dave