PHP modify suhosin settings on runtime

102 Views Asked by At

Is it possible to modify Suhosin settings on runtime execution? I'm asking because PHPUnit uses some features that are disabled by Suhosin (like vfs protocol and eval for mocking) and I'd like to modify those settings in my test bootstrap...

1

There are 1 best solutions below

0
Ben On BEST ANSWER

Only suhosin.session.cryptkey can be set by ini_set() during runtime. Most other options can be set in .htaccess on a per directory basis. This must be enabled explicitly using suhosin.perdir,

Example: Allow suhosin.post.* to be changed by .htaccess:

suhosin.perdir=p

See also: http://suhosin.org/stories/configuration.html#suhosin-perdir