Thread:Project:Support desk/How to edit a wiki page under a section using wiki bot

Hi team, I am using Livingbot http://en.wikipedia.org/wiki/User:LivingBot/Wikibot#How_to_make_your_own_bot My prime aim is to get a page check its content and do edit action or create a subpage and add it to this page using wikibot. I hope this bot can satisfy this, but the edit always replaces the contents. Getting the category and creating a page give the following error ^^^ Error with put_page called from edit_page.

Warning: Cannot modify header information - headers already sent by (output started at /serverlocation/Livingbot.php:188) in /serverlocation/includes/WebResponse.php on line 38

Also i had some errors regarding log-in. I have installed php version 5.3.3> Is there a bot some one can help me in doing this. I am new to both mediawiki and php. this is the config.php file i used to run the bot