Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#36770 closed defect (bug) (worksforme)

Enabling FORCE_SSL_ADMIN and FULL SITE breaks wp-cron.php

Reported by: idarek's profile idarek Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.1
Component: Cron API Keywords:
Focuses: Cc:

Description

Hello,
As in #12609 ages ago, in 4.5.1 I have enabled SSL for whole my website by default including SSL for admin. Noticed that none of the jobs that shall be run through CRON not running, like UpdraftPlus backup, Google Feed for Product refresh etc.

Change History (9)

#1 @idarek
9 years ago

As an update, I have install WP Crontrol now to see whats going on.
In cron evets I got information:

There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was: 
SSL connect error

I have added exception to my Cloudflare configuration to bypass cache for /wp-*
and will see later today if it is working.

Alternatively I can add Cron to my hosting account, but dont think that what shall be set by default.

#2 @idarek
9 years ago

Also, as I don't think change in CloudFlare will change anything I have added this to my functions.php

add_filter( 'https_local_ssl_verify', '__return_false' );

and also got this already in wp-config.php

/* Backend ssl with redirect loop fix */
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
       $_SERVER['HTTPS']='on';

Will report later on, are Cron is working.

#3 @idarek
9 years ago

Still: SSL connect error
Thought this was solved and Cron doen't require to verify SSL cert :(

#4 @swissspidy
8 years ago

  • Keywords reporter-feedback added

Hey there,

I'm sorry you haven't received a response in a while. There were major changes to the HTTP API in 4.6 and some fixes related to SSL were fixed today, see [38727].

Can you confirm that this is still an issue with both WordPress 4.6 and trunk?

#5 @idarek
8 years ago

@swisspidy
Thank you for info, but may I say it in "less professional way"... could you advise what shall I do to try this?

#6 @swissspidy
8 years ago

@idarek In other words, does this still happen after updating to WordPress 4.7?

Alternatively I can add Cron to my hosting account, but dont think that what shall be set by default.

If you can do that, that's actually the best option.

#7 @idarek
8 years ago

Hi @swisspidy,
I have moved to Stict SSL on Cloudflare and on server side as well - so certificate in on both sides.

Activated CRON to trigger wp-cron.php every 10 minutes, and since then all is working fine.

After doays backup (evening) I can have a look and disable CRON, and see if 4.7 Wordpress is handling with cron correctly and will let you know.

#8 @idarek
8 years ago

@swissspidy Hi Again,
Checked, and is working without need of having cron set on server site, but right now it is hard to say, if thats because of new version, as as I see on other servers that I have where I haven't got 4.7 yet, it is working as well.

I think, my problem were resolved when I move from Flexible SSL to Full (strict) SSL. In that case I don't have issues with local ssl certificate verification, as certificate is installed also on server site. With Flexible, it may still be the case, but that need to be checked by somebody else.

Possibly, I will be running new website in beginning of the year, so will be able to check that on Flexible configuration before I will move to Strict.

#9 @swissspidy
8 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

@idarek Good to hear. I'm closing this for now. Feel free to reopen or ask in the support forums if the problem reappears.

Note: See TracTickets for help on using tickets.