Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am trying to upgraded a simple site of mine from v3 to v4, I also swapped out the leafo/lessphp library for the oyejorge/less.php as per the installation instructions, and changed it to use this library on the settings page.
When I hit the frontend, I now get this error:
Fatal error: Can't inherit abstract function LessEngineInterface::compile() (previously declared abstract in LessEngine) in \sites\all\modules\contrib\less\engines\abstract.LessEngine.inc on line 6
Any thoughts or anything I am missing?
Thanks.
Comments
Comment #1
threegComment #2
corey.aufang CreditAttribution: corey.aufang commentedWhat version of PHP are you using?
Comment #3
threegIt's version 5.3.5.
Comment #4
corey.aufang CreditAttribution: corey.aufang commentedOk, so this appears to be a bug in earlier versions of PHP 5.3.
It appears fixed in PHP 5.3.9: http://3v4l.org/NP9Be
Officially, you need to update your version of PHP to at least the latest version of 5.3.
I'm going to consider making a change to the module to work with this.
Please, I strongly suggest that you upgrade your version of PHP.
Comment #5
threegOk thanks. I'll try that.
Comment #6
jaydee1818 CreditAttribution: jaydee1818 commentedI'm also having the same issue, and yes there seems to be a thread about the bug here:
https://bugs.php.net/bug.php?id=66818
After speaking to our server admin, it seems that the PHP that comes with the latest version CentOS (which we are using) is only currently at 5.3.3 and there is a reluctance by them to upgrade outside of the CentOS distro. In the perfect world, I'd like to upgrade to the latest version of PHP but not so easy.
Comment #8
corey.aufang CreditAttribution: corey.aufang commentedCentOS 7 comes with PHP 5.4.16.
That said, you should see a new dev for 7.x-4.x that should have this patched.
Comment #9
corey.aufang CreditAttribution: corey.aufang commentedComment #10
jaydee1818 CreditAttribution: jaydee1818 commentedYep, but we're on 5.3 not 5.4, cheers
Comment #11
jaydee1818 CreditAttribution: jaydee1818 commentedMight be worth altering the subheading on the module home page that reads:
7.x-4.0 Features (PHP 5.3+ required)
to
7.x-4.0 Features (PHP 5.3.9+ required)
Comment #12
tahauygun CreditAttribution: tahauygun commentedhttp://cgit.drupalcode.org/less/commit/?id=8554f11-----> if you dont want to update your current php. I had the same problem and it worked for me.