• Resolved Malae

    (@malae)


    Hello,
    
    I am running this plugin on a hosted server (LiteSpeed, PHP 8.0.28) site with no issues. However, on my LAMP server (PHP 8.0.28), I get the following fatal error:
    
    PHP Fatal error: Uncaught Error: Undefined constant "T_COMMENT" in /wp-content/plugins/theme-check/checkbase.php:281
    Stack trace:
    
    0 /wp-content/plugins/theme-check/checkbase.php(61): tc_strip_comments()
    
    1 /wp-content/plugins/theme-check/main.php(27): run_themechecks_against_theme()
    
    2 /wp-content/plugins/theme-check/theme-check.php(66): check_main()
    
    3 /wp-includes/class-wp-hook.php(308): ThemeCheckMain->themecheck_do_page()
    
    4 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    
    5 /wp-includes/plugin.php(517): WP_Hook->do_action()
    
    6 /wp-admin/admin.php(259): do_action()
    
    7 /wp-admin/themes.php(10): require_once('…')
    
    8 {main}
    
    thrown in /wp-content/plugins/theme-check/checkbase.php on line 281
    Any pointers about the cause of this would be appreciated.
Viewing 1 replies (of 1 total)
  • Thread Starter Malae

    (@malae)

    After seaching the use of the constant “T_COMMENT”, I found that it was a parser token that requires the PHP Tokenizer extension to run, but not installed on my LAMP server. After building the php80-tokenizer package, which took a considerable time, installing it and restarting the server the fatal error was gone. Linux is amazing.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Fatal error: Uncaught Error: Undefined constant’ is closed to new replies.