[wp-trac] Re: [WordPress Trac] #9118: cron loopback fix

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 13 09:19:38 GMT 2009


#9118: cron loopback fix
---------------------------+------------------------------------------------
 Reporter:  cookeal        |        Owner:  anonymous
     Type:  enhancement    |       Status:  closed   
 Priority:  normal         |    Milestone:  2.7.2    
Component:  General        |      Version:  2.7      
 Severity:  normal         |   Resolution:  duplicate
 Keywords:  cron loopback  |  
---------------------------+------------------------------------------------

Comment(by cookeal):

 Sure, will try:

 In cron.php this:

 {{{
         wp_remote_post($cron_url, array('timeout' => 0.01, 'blocking' =>
 false));
 }
 }}}
  has been replaced with:

 {{{
         //wp_remote_post($cron_url, array('timeout' => 0.01, 'blocking' =>
 false));
         $i = 0;
         $pre_exec = "";
         if (file_exists("wp-cron.php"))
                 $pre_exec = "";
         else if (file_exists("../wp-cron.php"))
                 $pre_exec = "cd ..; ";
         else {
                 error_log("Couldn't find wp-cron.php");
         return;
         }
         system("$pre_exec /usr/bin/php5-cli wp-cron.php >/dev/null 2>&1
 </dev/null &", $i);
         // Added by one-click installable to work around block on HTTP
 callbacks on
     // servers that firewall block calls to themselves.
 }
 }}}

 And in wp-cron.php this:


 {{{
 if ( $_GET['check'] != wp_hash('187425') )
         exit;
 }}}

 has changed to this:


 {{{
 //if ( $_GET['check'] != wp_hash('187425') )
 //      exit;
 }}}

 As I said above this seems to have resolved all my issues, but I dont
 pretend to understand why!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9118#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list