[wp-trac] [WordPress Trac] #30258: Upload_path can cause a loop after migrating

WordPress Trac noreply at wordpress.org
Fri Oct 30 05:10:51 UTC 2015


#30258: Upload_path can cause a loop after migrating
----------------------------+------------------------------
 Reporter:  sowmedia        |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  3.7
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by yr8u5):

 Dear  all of Wordpress Develop Members.
 Thank you for your continued support for us at all times.

 I also made sure this issue in WP4.3.1.
 In addition, @sowmedia's fix can avoid a issue.


 [Making reproducible environment]
 - PHP ver5.5 on Linux-based server.

 - For example, set open_basedir in php.ini.
 {{{
 ------------------------------
 open_basedir = "/home/example-user/example.com/www"
 ------------------------------
 * If you specify the current directory that have installed
 WordPress,[[BR]]
   it will be easier.
 }}}

 - Log in to the dashboard,[[BR]]
   and access the "/wp-admin/options.php".[[BR]][[BR]]
   By "upload_path" item,[[BR]]
   It will specify the outside of open_basedir area.
 {{{
 ------------------------------
 /Home/example-user/images
 ------------------------------
 }}}

 - This issue is create infinite loop.[[BR]]
   set to "max_execution_time" in php.ini[[BR]]
   It is recommended that you keep to the order of a few seconds,[[BR]]
   And "display_errors" in php.ini is safer to disable.
 [[BR]]
 [[BR]]
 [confirm reproducible]
 - Dashboard in the "media> Add New",[[BR]]
   upload the image data.[[BR]][[BR]]
   The following error is output in large amounts in the error log.[[BR]]
 {{{
   ------------------------------
   PHP Warning: is_dir(): open_basedir restriction in effect.
   ------------------------------
   * If the error of upload_tmp_dir,
     Please change the upload_tmp_dir path to inside of the open_basedir
 area.
     ------------------------------
     upload_tmp_dir = "/home/example-user/example.com/www/images_tmp"
     ------------------------------
 }}}
 [[BR]]
 [[BR]]
 [fix to this issue]
 Modifying to functions.php as proposed from @sowmedia
 break to infinite loop and avoid to this issue.
 [[BR]]
 [[BR]]
 Best regards,

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30258#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list