I must be doing something wrong. I have in put the link <?php
include_once('includes/mysqli/mysql2i.class.php'); ?> at the head of my index.php file, but it changes nothing. Sorry if this is a dumb post
C Pollock - 2016-12-14 03:21:43 - In reply to message 2 from Dave Smith
Thanks for the prompt reply. Changed the include_once to require_once at the start of my index.php file, but made no difference. Page still loads with all the usual error messages regarding deprecated extensions. I introduced a deliberate path error and got a blank page with the expected 'unable to find file' error, so it seems the mysql2i.class.php is loading. At this stage I am simply trying to get my database to load properly - I have a 10-year old site built with the old InterAKT MXShop software, and my hosting company has just switched to PHP 5.6, so the code no longer works. This is my primary problem code:
Dave Smith - 2016-12-14 08:52:08 - In reply to message 3 from C Pollock
If it is PHP 5.6, this class will have no effect, it will just sit there waiting for the MySQL extension to go away in PHP 7.
You are getting the deprecated error message because your error_reporting is set wrong for production. If you have a common initialization script, the error_reporting should be set there in the first line. If you don't, make this your first line in your index.php file.
Patrick Schulz - 2016-12-21 13:53:34 - In reply to message 1 from C Pollock
You must not include / require the shim at the end of your script / index.php but at the beginning, before you call any of the mysql_* functions.
If you include it just at the very last moment, your code will always fail with an "Call to undefined function ..." error, because they have not yet been defined before.
Instead of include you can also use require, just to see if your include_path settings are correct.