I'm working on a web application that require that i encrypt some of the data. I have looked trough some discussions on the net, but most of them are inconclusive.

Where do I store the key? At this moment it is saved in the Apache configuration file, and passed to mod_php as an environment variable. What i would like was just to store it in memory. Eg. prompted for it when Apache starts, and then somehow passed to mod_php.

Anyone got any ideas?