• Updated WordPress to version 5.1 and PHP Warning appeared:

    session_start(): Cannot send session cookie - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963
    session_start(): Cannot send session cache limiter - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963
    Cannot modify header information - headers already sent in /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1353

    We managed to solve the problem by adding a condition to the function start_session in the file
    /wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1963

    The solution looks like this:

    
    	private function start_session(){
                 if ( !defined( 'DOING_CRON' ) ){
                     session_id() or session_start();
                 }
    	}
    
    • This topic was modified 5 years, 8 months ago by shkuropat.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter shkuropat

    (@shkuropat)

    NEW Probles:

    PHP Warning:  Cannot modify header information - headers already sent in /srv/runnerclick-git/www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1353
    PHP Warning:  Cannot modify header information - headers already sent in /srv/runnerclick-git/www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1354
    PHP Warning:  Cannot modify header information - headers already sent in /srv/runnerclick-git/www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1355
    PHP Warning:  Cannot modify header information - headers already sent in /srv/runnerclick-git/www/wp-content/plugins/ip2location-country-blocker/ip2location-country-blocker.php on line 1356
    
    Plugin Author ip2location

    (@ip2location)

    We are not able to reproduce this issue from our side. Can you disable all other plugins and try again?

    It seems like there is another output before our plugin causing the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Warning after upgrading to WordPress 5.1’ is closed to new replies.