Cannot modify header information
-
I don’t know which version this is happening from, but get the following error at least with the latest version.
PHP Warning: Cannot modify header information – headers already sent in /var/www/***/html/wp-content/plugins/wp-cloudflare-page-cache/src /Utils/Helpers.php on line 21
I found that when access wp-cron.php with curl command in a cron job, it throws this error.
*/10 * * * * * /usr/bin/curl -s “https://***/wp-cron.php” > /dev/null 2>&1
Apparently, a GET request to wp-cron.php gives an error.
When execute it directly by php command or using a POST request, there is no error.
/usr/bin/php /var/www/***/html/wp-cron.php
/usr/bin/curl -s -X POST “https://***/wp-cron.php”
Although this is not a fundamental solution, the error is being avoided by reviewing the wp-cron.php request until it is fixed.
Thank you
The topic ‘Cannot modify header information’ is closed to new replies.