I wrote quite a simple module for a large drupal powered social networking site. the module basically sets cookies to identify the user and then tracks their activity on the site to monitor which users are most active, what pages they are viewing, who posts the most comments etc.

When the module is enabled I get a WSOD whenever I try to view My Profile and whenever an action is undertaken in the admin section (ie, changing a setting and hitting submit). The change does occur, which I find out by just hitting back.

Sometimes when the module is turned on I'd get "headers already sent" errors even though all the module does it write to the db. there isn't a single echo or print statement in the .module file. I have no idea what would cause this, but obviously there are some errors in my module.

I removed the closing ?> tag from my module. I know "extra whitespace" can cause these "headers already sent" messages, but im not sure what's considered whitespace and what isn't. My memory settings are set to 50M (local value) and 32M (master value), according to phpinfo(); This is all running on a dedicated development server here at our company.

Can anyone suggest a place to start looking for bugs in my module? It's only about 150 lines of code ...

Thx,
Stef

Comments

skendrew’s picture

found the issue: BOM character inserted by IDE at the top of the .module file