Support » Fixing WordPress » Error Message with new version of PHP

  • At the prompting of my web host I upgraded PHP from 5.3 to 7.2. Now I get this error message when I try to access

    Parse error: syntax error, unexpected ‘new’ (T_NEW) in /webroot/r/e/resea005/lynunderwood/www/wp-content/plugins/exec-php/exec-php.php on line 22

    What do I do?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p


    Your exec-php plugin seems to be the error.

    Access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/plugins/ and delete or rename exec-php plugin.

    Thread Starter wperic


    That got me in, but now it looks like I need something to replace exec-php plugin to get my php code to work on the site.

    It looks like ezphp is the only option?


    Moderator t-p


    Plugin search:

    Or, ask at that plugin’s dedicated forum via its page in the Plugin Repository so the plugin’s developers and support community can help you with this.

    Could you copy line 22 of that file (/wp-content/plugins/exec-php/exec-php.php) here so I can have a look.

    Thread Starter wperic


    Lines aren’t numbered. I assume the key line is the last one, but here’s the whole plugin code. Thanks.

    Plugin Name: Exec-PHP
    Plugin URI:
    Description: Executes <?php ?> code in your posts, pages and text widgets.
    Author: S&ouml;ren Weber
    Author URI:
    Version: 4.9
    // ----------------------------------------------------------------------------
    // main
    // ----------------------------------------------------------------------------
    global $g_execphp_manager;
    if (!isset($g_execphp_manager))
    	// strange assignment because of explaination how references work;
    	// this will generate warnings with error_reporting(E_STRICT) using PHP5;
    	$GLOBALS['g_execphp_manager'] =& new ExecPhp_Manager();

    I had a similar issue with another plugin and this article explains the reason and has a fix:

    Try removing & from $GLOBALS['g_execphp_manager'] =& new ExecPhp_Manager();

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error Message with new version of PHP’ is closed to new replies.