[wp-trac] [WordPress Trac] #11831: Warning when wp-cron fails

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 9 18:38:12 UTC 2010


#11831: Warning when wp-cron fails
------------------------------+---------------------------------------------
 Reporter:  scribu            |        Owner:  westi   
     Type:  defect (bug)      |       Status:  reopened
 Priority:  normal            |    Milestone:          
Component:  Warnings/Notices  |      Version:  3.0     
 Severity:  normal            |   Resolution:          
 Keywords:                    |  
------------------------------+---------------------------------------------
Changes (by eliotsykes):

 * cc: eliotsykes (added)
  * version:  2.9.1 => 3.0


Comment:

 I get this too in Wordpress 3.0-RC1 when running on localhost.

 I can replicate it the error message consistently if I delete the cron
 options after every request by running this SQL:

 delete from wp_options where option_name like '%cron%';

 My assumption is that doing this causes the cron function to be run on
 every request. It looks like these options suppress cron from running
 again for some time.

 For me it was happening on line 1045 of class-http.php

 {{{
 if ( !WP_DEBUG )
   $handle = @fopen($url, 'r', false, $context);
 else
   $handle = fopen($url, 'r', false, $context); // Line 1045
 }}}

 I did some research and found that 2 common reasons fopen fails are:
 1. user-agent being the standard PHP one being blocked by web server. I
 tried a different user-agent, this did not fix the bug
 2. allow_url_fopen being set to false. It is true on my system so this is
 not the cause for me.

 So I'm not sure where to go from here. Perhaps the test() function for
 WP_Http_Streams needs some extra tests?

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


More information about the wp-trac mailing list