Search code examples
phpupgradephp-7expressionengine

Quickest way to get Expression Engine v 2.5.5 working with PHP7


A client’s host has recently updated their server to run PHP 7, which has broken their EE 2.5.5. site (“Call to undefined function mysql_connect()”).

I tried upgrading EE to version 2.11.9 but get errors:

Frontend: can’t find safecracker_lib

Control Panel: PATH_MOD not defined in mod_structure.php, fixing this leads down a rabbit hole starting with an error related to not being able to instantiate the pagination class somewhere.

I just need to get the site running until I build a new site, what is the quickest way I can get the site running with PHP 7?


Solution

  • In your config folder there is a file named database.php change the line:

    $db['expressionengine']['dbdriver'] = 'mysql';
    

    to

    $db['expressionengine']['dbdriver'] = 'mysqli';