UPGRADING FROM VERSION 3.08 -------------------------------------------------------------------------------- NOTE: This applies to custom code and plugin authors only. If you have a plugin that doesn't work with 3.09+ just download the latest version. If you are a programmer or a plugin author, continue reading. PROGRAMMER REFERENCE -------------------------------------------------------------------------------- As of v3.09 we dropped support for the original PHP mysql library function (mysql_*) as it is no longer included or supported by PHP 7. We now use the MySQL improved library (mysqli). Note that all the mysql utility functions (eg: mysql_get, mysql_select) found in the following CMS library files have been updated to work with mysqli and will continue to function as expected. - lib/database_functions.php - lib/mysql_functions.php If you have existing code that calls the original PHP mysql_* functions then you can use one of the following solutions. Note: You can find a list of the original PHP mysql_* functions here: http://php.net/manual/en/book.mysql.php SHORT-TERM SOLUTION -------------------------------------------------------------------------------- PHP v5.6 includes the original mysql functions and is supported until the end of 2018. Reference: http://php.net/supported-versions.php If you can continue using PHP v5.6 then you can enable the following CMS option: Admin > General > Advanced Settings > Legacy MySQL Support What this does is create an additional connection to the original mysql library so that any legacy code that calls it will continue to work. Note that because we are connecting to the new mysqli library as well this will double the number of active MySQL connections being used by the server at any given time. For many sites this will be an acceptable short-term solution. LONG-TERM SOLUTION -------------------------------------------------------------------------------- If you want to run PHP v7.0+ or update your code for the future you will need to upgrade any legacy mysql code to use the mysqli library instead. Original MySQL functions look like this: mysql_server_info(); MySQLi Improved function calls look like this (we use the object-oriented style); $mysqli->server_info; The $mysqli variable stores the MySQLi connection object. You can access the MySQLi connection object that CMS uses like this: $mysqli = mysqli(); Or call it directly like this: mysqli()->server_info; For each mysql_ function, find it in the Original MySQL API here: http://php.net/manual/en/book.mysql.php And then follow the link to the replacement function and copy the code replacing $mysqli-> with mysqli()-> Here's some example search and replaces: Search for: Replace with: -------------------------------------------------------------------------------- mysql_query( mysqli()->query( mysql_error( mysqli()->error mysql_ping( mysqli()->ping( mysql_select_db( mysqli()->select_db( mysql_server_info( mysqli()->server_info mysql_set_charset mysqli()->set_charset( mysql_insert_id mysqli()->insert_id; mysql_close( mysqli()->close(); mysql_affected_rows mysqli()->affected_rows mysql_fetch_assoc($result) $result->fetch_assoc() mysql_fetch_row($result) $result->fetch_row() For any other mysql function find the original and replacement code in the PHP manual online here: http://php.net/manual/en/book.mysql.php Reference: PHP Original MySQL API: http://php.net/manual/en/book.mysql.php PHP MySQL Improved Extension: http://php.net/manual/en/book.mysqli.php ---------------------------------------------------------------------------------- end of file