0

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?

2
  • 1
    The latest version is 5.4. Why are you trying to install 10 year old version? Just upgrade to the latest one. Commented Dec 10, 2020 at 19:38
  • I just need to get the site working for a couple of weeks, updating the plugins is way out of scope Commented Dec 10, 2020 at 20:18

2 Answers 2

2

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

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

to

$db['expressionengine']['dbdriver'] = 'mysqli';
Sign up to request clarification or add additional context in comments.

Comments

0

mysql_connect() has been deprecated since PHP 5 and removed in PHP 7 so you cannot use this function or any of the old mysql functions.

You need to upgrade your codebase, or downgrade your PHP version (highly discouraged).

In regards to your missing pagination class, you may not have implemented core classes that were required when upgrading.

Try running on your command line:

php system/ee/eecms upgrade

You can also read the documentation on how to upgrade the codebase for Expression Engine here.

4 Comments

thank you, but ee2 doesn't have an 'ee' folder it's 'expressionengine' so I doubt that script is going to work, I've read the upgrade instructions, followed them and received the error mentioned.
I hope you aren't upgrading your old codebase to an old codebase; reading the documentation for "ee" tells me it's in version 5...
It may seem like a mammoth task for in the long run it's better to update the codebase to the lately version and keep on-top of all updates for security patches and bug fixes.
I am just trying to upgrade to 2.11.9 as upgrading the plugins is way beyond current scope

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.