[wp-trac] [WordPress Trac] #37396: Plugin update never finishes (PHP 7, possibly due to configuration)

WordPress Trac noreply at wordpress.org
Mon Jul 18 15:08:13 UTC 2016


#37396: Plugin update never finishes (PHP 7, possibly due to configuration)
--------------------------+-----------------------------
 Reporter:  miyarakira    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  4.5.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Running on PHP 7, I noticed that I'm not able to update plugins - the
 spinner spins and it never completes the update.

 I traced it from `admin-ajax` to `class-wp-upgrader` and finally to
 `class-wp-filesystem-direct.php`.

 Inside the function `dirlist()`, two lines which get the '''owner''' and
 '''group''' of (in this case) the temporary directory were getting
 "stuck".

 With the following changes, I was able to get the plugin update process to
 complete successfully:

 1. Inside `public function owner()`, return the owner ID instead of using
 `posix_getpwuid`.

 2. Inside `public function group()`, return the group ID instead of using
 `posix_getgrgid`.

 So, these two POSIX functions seem to be the cause, although I couldn't
 figure out why. Since this is happening in an AJAX response, I had a hard
 time debugging it. It could be due to a wrong server configuration on my
 part. The issue does not occur on previous versions of PHP, i.e., 5.4.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37396>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list