A plugin that adds that ability to insert any PHP code into a sidebar widget.
This plugin has been tested with WordPress 2.1, 2.2, 2.3, and 2.5.1.
First, make sure that the plugin is enabled.
If it is enabled and you can see it on the left hand side of the Design | Widgets page, then it is possible that the content of one of the widgets is causing a problem. With Samsarin PHP Widget version 1.3.2 you can reset the widgets.