I have PHP running as a module under Apache2 on Debian.
When a request come to Apache, I do some actions with confidential data that is already in server memory. Such data is already overrided and wiped automatically.
In an other hand, and this is the point, as such confidential data is manipulate under a PHP script, and certainly copied into the associated memory space, my concern is about to be sure that after the HTTP response end (and the associated PHP/Apache2 process terminate?), there is absolutely no references neither values to the confidential data that persists in memory.
May be, an efficient way, is to cleanup/override frequently (as a cronjob or after a PHP script end) the entire inactive memory space. Questions:
1) Is there an unix command or a low-level library to cleanup/override all the inactive memory space ?
2) In case there is no PHP process but only Apache2 process involed, and as Apache2 processes not necessarily terminate, is there any command or library to cleanup "inactive memory" of an active process ?
3) Is there efficent solutions in PHP to cleanup/override memory used before script shutdown ?
Thank you