• [12-Oct-2021 03:42:16 UTC] PHP Parse error: syntax error, unexpected ‘print’ (T_PRINT), expecting identifier (T_STRING) in /wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php on line 9

    My crc checking plugin found 3 new error logs this morning in admin, admin/user and admin network. They all contained the line above. Normally I don’t log into this site more than once a month or so. It’s a static. Tried to log into the site and couldn’t because the login page crashed.

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    FTP’d into the account, removed cf7. Went into cpanel and realized the site was still on php 5.6. Upgraded to 7.4, uploaded cf7 and it appears to work.

    Is upgrading to 7.4 important? Sure. Crashing the admin login when you don’t? Not so much.

    I’m just guessing there was some automatic update of the plugin this morning.

Viewing 15 replies - 1 through 15 (of 36 total)
  • Thread Starter datainterlock

    (@datainterlock)

    And confirmed. This was the result of an automatic update.

    – Contact Form 7 (from version 5.4.2 to 5.5.1)

    I have had this exact same problem. I tried to update the plugin then all went wrong.

    Still cant log into my site backend. Showing the above critical error.
    I have disabled plugins through cpanel file manager and also myphp.

    But still the same problem, how do I fix this?

    I’ve removed the cf7 plugin folder via FTP but still get the below when trying to access wordpress dashboard……

    Parse error: syntax error, unexpected ‘print’ (T_PRINT), expecting identifier (T_STRING) in /var/sites/w/public_html/wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php on line 9
    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    • This reply was modified 3 years, 1 month ago by vedderpress.
    • This reply was modified 3 years, 1 month ago by vedderpress.

    Like a lot of other people… getting same error!

    Version 5.5.1 | By Takayuki Miyoshi | View details

    This plugin failed to load properly and is paused during recovery mode.

    An error of type E_PARSE was caused in line 9 of the file /home2/oexpr810/public_html/dippro/wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php. Error message: syntax error, unexpected ‘print’ (T_PRINT), expecting identifier (T_STRING)

    The same error. Waiting for a fix.
    Probably, print is a reserved word in PHP (https://stackoverflow.com/questions/11266555/syntax-error-unexpected-t-print-expecting-t-string/11266571)

    Renaming function name on line 9 to public function _print() and on line 223 to $column->_print(); seemingly fixes the issue.

    Solved by upgrading PHP to 7.4

    I would hope the official fix will work with earlier versions of PHP
    @dreich, that works!

    I have had the same problem since yesterday. I am going to try renaming function on line 9.

    @dreich it works! Thank You

    • This reply was modified 3 years, 1 month ago by domikaj.

    Hopefully, developers will rename the function for the next plugin update.

    +1 Same error.

    @dreich thanks for the quick fix renaming that function!

    Thanks for the solution and explanation, @dreich!

    “Probably, print is a reserved word in PHP”

    In file welcome-panel.php:

    • Line 9: Rename function to public function _print()
    • Line 223: Rename to $column->_print();
    • This reply was modified 3 years, 1 month ago by admorrow.

    @admorrow this may be a stupid question but when I look into the plugins/contact-form-7/includes/ folder using FTP I don’t see the welcome-panel.php file. How did you access it?

    @suvadesign welcome-panel.php is within the /wp-content/plugins/contact-form-7/admin/includes folder

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘PHP Parse error: syntax error, unexpected ‘print’ (T_PRINT)’ is closed to new replies.