PHP Classes

Included mysql2i.class.php not working

Recommend this page to a friend!

      PHP MySQL to MySQLi  >  PHP MySQL to MySQLi package blog  >  Do tomorrow what does...  >  All threads  >  Included mysql2i.class.php not working  >  (Un) Subscribe thread alerts  
Subject:Included mysql2i.class.php not working
Summary:Does not convert code to mysqli - still deprecated error message
Messages:3
Author:Tony Ross
Date:2017-03-26 21:25:25
 

  1. Included mysql2i.class.php not working   Reply   Report abuse  
Picture of Tony Ross Tony Ross - 2017-03-26 21:25:25
I am using PHP 5.6.30. Placed include_once('mysql2i.class.php'); at the top of the file, also tried require_once('mysql2i.class.php'); at the top of the file and put required_once('mysql2i.func.php'); at the bottom of mysql2i.class.php.

I still get error messages:

Pacific/Honolulu] PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead... in the log although no error displays on screen when running the code.

The code still doesn't work. The first use is to authenticate a user from a database but it just re displays the login screen with blank fields.

I test the path by using /mysql2i.class.php and got a file not found error. What else can I try?

Tony

  2. Re: Included mysql2i.class.php not working   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2017-03-27 03:58:54 - In reply to message 1 from Tony Ross
The mysql extension did not go away until PHP 7.x

This package does not do anything except sit and wait for the mysql extension to go away, when it does, it takes over by replacing the statements with functions that use mysqli to perform the database operations.

It sounds like you need to debug your script by making sure you are connecting and selecting the correct database, and then testing the result after the form is submitted.

Dave

  3. Re: Included mysql2i.class.php not working   Reply   Report abuse  
Picture of Tony Ross Tony Ross - 2017-03-29 19:19:38 - In reply to message 2 from Dave Smith
Thanks for looking at this. From your description, it appears there must be some other difference in the new server environment causing the issues. It is not an error in one script, there are about 30 old websites that have been working with PHP 5.4 that now have errors on a new server.

Regards,
Tony