Step-by-step guide
After an upgrade to PHP7 it is possible that (parts of) your website or application no longer work. In the case of WordPress this will usually be due to very outdated / no longer maintained plugins. You can then update or remove / replace these plugins. For custom applications, more work is sometimes required.
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect () in ...
Reason: All ext / mysql functions were removed
This can be temporarily solved via the following code in every PHP file that needs it (or by including it in an existing include file):
// include mysql compatibility class for PHP7
if(version_compare('5.6.0', PHP_VERSION) < 0)
{
include_once('inc/mysql.php');
}
And the use of the mysql file below that should be placed in the folder inc /: https://github.com/dshafik/php7-mysql-shim/tree/master/lib
PHP Parse error: syntax error, unexpected 'new' (T_NEW)
Reason: New objects can not be assigned by reference
Solution: remove & on the line mentioned in the error
Related articles
Filter by label
There are no items with the selected labels at this time.
0 Comments