Get off the trail and back into the woods. Pack out all your trash. Trash will draw bears to your camp. Cook and eat away from your campsite on a gas stove. It is very unlikely that bears or porcupines will bother you if you keep a clean camp.
Sanitation is a serious issue.
Do not wash your hair or dishes in the streams. Use public restrooms if you are camping near town. Treat or boil all drinking water, or get it in town. Fires are fine down on the beaches, but they scar the fragile alpine environment. Don't build fires above the treeline.