ini_set fails every time with the command line

From: Date: Fri, 22 Jun 2007 23:45:14 +0000
Subject: ini_set fails every time with the command line
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27541@lists.php.net to get a copy of this message
I need to dynamically set key value pairs that will be returned by get_cfg_var(). We're running tests on our code outside the apache server the production site runs in. Some of our configuration comes from the php.ini used in apache. I'm trying to open that file, get all our configuration variables (we have a standard and unique prefix for all of them) and set them within the test execution environment (phpunit, invoked on the command line). I've tried using ini_set('key', 'value') but it always returns FALSE. It doesn't matter how I invoke it.... I've tried ($key, $value), ('key', 'value'), and ("key", "value"). Its also not in the disabled_functions list (as far as I can tell). Is there something in PHP that prevents the ini_set function from being used when php is running on the command line? Can anyone suggest another way to handle this? Thanks! Mark

« previous php.pear.general (#27541) next »