[wp-trac] [WordPress Trac] #47416: Site health - Rest API error - cURL error 28

WordPress Trac noreply at wordpress.org
Fri May 31 09:39:31 UTC 2019


#47416: Site health - Rest API error - cURL error 28
----------------------------+-----------------------
 Reporter:  nirvak          |       Owner:  (none)
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  5.2
 Severity:  major           |  Resolution:
 Keywords:  site-health     |     Focuses:
----------------------------+-----------------------

Comment (by capbussat):

 I have the same issue with my Plugin 'Mis Cursos'
 [https://wordpress.org/plugins/mis-cursos/] gives error in Health Site
 page.
 {{{
 cURL error 28: Operation timed out after
 }}}


 I may change slightly my code to avoid session lock conflict with REST API
 . I have tested locally and so far message dissapears from Health Site
 page, but then I see PHP notices in error log like PHP Warning:
 session_start(): Cannot start session when headers already sent in.

 {{{#!php
 <?php
 // session
 function mis_cursos_register_session(){
      if( !session_id() )
        session_start();
 }

 // session
 function mis_cursos_destroy_session() {
      // generally better than UNSET each session variable
      session_destroy ();
 }

 if ( !is_admin() ){  // DONE avoid session locks with REST_API !
     add_action('init','mis_cursos_register_session');
     add_action('wp_logout', 'mis_cursos_destroy_session');
     add_action('wp_login', 'mis_cursos_destroy_session');
 }

 }}}

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


More information about the wp-trac mailing list