Title: Exec-PHP using PHP Version 7.1 fails
Last modified: May 12, 2017

---

# Exec-PHP using PHP Version 7.1 fails

 *  [ttavelli](https://wordpress.org/support/users/ttavelli/)
 * (@ttavelli)
 * [9 years ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/)
 * Hi, I am moving my site to a new server that is running WordPress 4.73 and PHP
   7.1. When loading the Exec-PHP plugin I receive a fatal error. Is this plugin
   not compatible with PHP 7.1? If so, are there plans to fix it so that it is compatible
   with the latest PHP version?
 * Exec-PHP has worked flawlessly through numerous upgrades for the last 10 years
   but is now failing.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Andreas 2013](https://wordpress.org/support/users/andreas-2013/)
 * (@andreas-2013)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/#post-9335684)
 * I have the same problem 🙁
 *  [Mihai Bocsaru](https://wordpress.org/support/users/proitservice/)
 * (@proitservice)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/#post-9358024)
 * Hello Guys,
 * Fixing it is as easy as replacing this line (line 987):
 * `&& $blog_user =& new WP_User($blog_user->ID)`
 * with:
 * `&& $blog_user = new WP_User($blog_user->ID)`
 * I could also pack it and make it available for download, if you are not willing
   to edit that file on your own.
 * Enjoy,
    Mihai
 *  Thread Starter [ttavelli](https://wordpress.org/support/users/ttavelli/)
 * (@ttavelli)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/#post-9361771)
 * I can make that change. What file and location?
 *  [Mihai Bocsaru](https://wordpress.org/support/users/proitservice/)
 * (@proitservice)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/#post-9361864)
 * Hi,
 * The file is:
    wp-exec-php.php
 * from this location:
    /wp-content/plugins/wp-exec-php/
 * so:
    /wp-content/plugins/wp-exec-php/wp-exec-php.php
 * at line 987 it must say:
    `&& $blog_user =& new WP_User($blog_user->ID)`
 * change that into:
    `&& $blog_user = new WP_User($blog_user->ID)`
 * You could edit that file from inside the WP admin or you could download it via
   FTP, edit it with a tool like notepad, notepad+, ultraedit etc., save and upload
   it back.
 * Reloading your website or WP admin shouldn’t report this error any longer.
 * Kind Regards,
    Mihai Bocsaru

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Exec-PHP using PHP Version 7.1 fails’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/exec-php.svg)
 * [Exec-PHP](https://wordpress.org/plugins/exec-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/exec-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/exec-php/)
 * [Active Topics](https://wordpress.org/support/plugin/exec-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/exec-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/exec-php/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Mihai Bocsaru](https://wordpress.org/support/users/proitservice/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/exec-php-using-php-version-7-1-fails/#post-9361864)
 * Status: not resolved