WordPress Plugin error – Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at / . . .

Today while developing a wordpress plugin, i experienced an error when i activated it. Although the plugin worked as it was expected to, but the error was there and seemed as if my plugin is conflicting with si-captcha for wordpress plugin.

The error was:

Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /****/****/wp-content/plugins/nablytics/*****.php:95) in /****/****/wp-content/plugins/si-captcha-for-wordpress/si-captcha.php on line 841

Well at first i was confused that why is this error there! tried a few things to solve it along with checking out the si-captcha.php file but no use!

wordpress technical article errorAfter some time, i took a look at my plugin file again, and when i came to end, and noticed that there were some empty lines after the end of plugin ( ?> ) which were causing the headers to be generated before the si-captcha code executed the headers.

So the solution is simple, simply goto the plugin which is giving error, (usually the first file to be mentioned is the one with the error) and make sure that there is no empty space before

<?php

and after

?>

and it will work perfect!

8 comments on “WordPress Plugin error – Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at / . . .

  1. My goodness, this was driving me nuts too…especially since it was find on another server. This post saved so much time!

Leave a Reply

Your email address will not be published.