1

So I'm trying to setup my first Craft installation on Digital Ocean. I'm bound to use Craft version 2.0.2535 since I'll be duplicating a site using this (so I cannot use Craft 3).

I've spun up a new Droplet on DigitalOcean. I've set up Apache, PHP and Mysql and verified it all works. After copying the the Craft files and resolved all the issues regarding rights to folders, I was finally ready to run the installer, I get this:

Notice: Undefined property: Craft\WebApp::$urlManager in /var/www/craft/app/controllers/BaseController.php on line 37

Fatal error: Uncaught Error: Call to a member function getRouteParams() on null in /var/www/craft/app/controllers/BaseController.php:37 Stack trace: #0 /var/www/craft/app/framework/web/CController.php(308): Craft\BaseController->getActionParams() #1 /var/www/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction)) #2 /var/www/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), NULL) #3 /var/www/craft/app/framework/web/CWebApplication.php(282): CController->run('renderError') #4 /var/www/craft/app/framework/base/CErrorHandler.php(331): CWebApplication->runController('templates/rende...') #5 /var/www/craft/app/framework/base/CErrorHandler.php(289): CErrorHandler->render('error', Array) #6 /var/www/craft/app/etc/errors/ErrorHandler.php(149): CErrorHandler->handleError(Object(CErrorEvent)) #7 /var/www/craft/app/framework/base/CErrorHandler.php(131): Craft\ErrorHandler->handleError(Object(CErrorEvent)) #8 /var/www/craft/app/framework/base/CAp in /var/www/craft/app/controllers/BaseController.php on line 37

I honestly have no idea on what can be wrong. Any pointers would be very welcome...

  • That's a super old version – could it be a PHP version issue? Craft didn't have PHP 7.0 compatibility until 2.4.2697. – Mats Mikkel Rummelhoff Jan 30 '18 at 20:16
  • That sounds very plausible! I'll try that out. Let's hope not too much else breaks when I increase versions ;-) – Jensa Jan 30 '18 at 20:25
  • I tested it – can confirm its a PHP version issue. I can run 2.0.2535 locally without issues on PHP 5.4.45; get the same error as you when I run it using PHP 7. – Mats Mikkel Rummelhoff Jan 30 '18 at 20:27
2

You're probably running PHP v. 7.0 or higher on your DigitalOcean box; Craft CMS didn't have PHP 7.0 compatibility until Craft 2.4.2697, which is why it chokes.

Downgrading your PHP version to 5.6 or 5.4 should resolve your issue.

You should also beware of your MySQL version – Craft 2 has issues on MySQL 5.7; ideally you should make sure your droplet uses 5.6.

And also – I'd look into upgrading the install to the latest and greatest Craft 2.x, if not Craft 3. A lot of good stuff has happened since 2014 ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.