• I recently upgraded my Ubuntu server to v22.04.4 LTS. The upgrade was fairly smooth and there were no errors or mishaps. Post the upgrade I see this error when trying to login to the dashboard (with WP_DEBUG enabled)

    Fatal error: Uncaught Error: Call to undefined function create_function() in /var/www/cbp/wp-content/plugins/LayerSlider/wp/widgets.php:4 Stack trace: #0 /var/www/cbp/wp-content/plugins/LayerSlider/layerslider.php(55): include() #1 /var/www/cbp/wp-settings.php(428): include_once('...') #2 /var/www/cbp/wp-config.php(86): require_once('...') #3 /var/www/cbp/wp-load.php(50): require_once('...') #4 /var/www/cbp/wp-admin/admin.php(34): require_once('...') #5 /var/www/cbp/wp-admin/index.php(10): require_once('...') #6 {main} thrown in /var/www/cbp/wp-content/plugins/LayerSlider/wp/widgets.php on line 4

    Notice: Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/www/cbp/wp-includes/functions.php on line 5831

    Notice: Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /var/www/cbp/wp-includes/functions.php on line 5831
    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    Post this error, I removed the LayerSlider plugin and that gave a huge page of errors. Any idea what could be wrong here? How do I debug this?

    • This topic was modified 2 years, 2 months ago by hpb1980.
Viewing 4 replies - 1 through 4 (of 4 total)
  • create_function() was removed in PHP 8.0

    which appears to be in the plugin LayerSlider

    I suspect that you have an old version and should update the plugin.

    If you can’t, then downgrade to PHP 7.4 will resolve the issue

    Thread Starter hpb1980

    (@hpb1980)

    Thanks, I downgraded and switched from 8.1 to 7.4.30 but I still the same error.

    Are you sure?

    In 7.4 you will get a deprecation notice, not an error.

    Check tools/health check to see if you really are running 7.4

    Thread Starter hpb1980

    (@hpb1980)

    I can’t get into the Dashboard itself to access Tools/Health. However, on further digging on the server I see that my nginx config points to, fastcgi_pass unix:/var/run/php/php-fpm.sock. However, /var/run/php/php-fpm.sock is symlinked to /etc/alternatives/php-fpm.sock which is symlinked to /run/php/php8.1-fpm.sock instead of 7.4.

    I’m guessing this is the issue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress ‘critical’ error after server OS upgrade’ is closed to new replies.