Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


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


Filter by label

There are no items with the selected labels at this time.



  • No labels