Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 

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 (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1422e
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "SUP"
labelskb-how-to-article

...