RE: [PHP-DEV] [RFC] php-cli: option to ignore php.ini
| From: | Mike Robinson | Date: | Tue, 12 Nov 2002 21:15:36 +0000 |
| Subject: | RE: [PHP-DEV] [RFC] php-cli: option to ignore php.ini | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-90893@lists.php.net to get a copy of this message | ||
Good idea. This is useful. Thanks. :)
Regards
Mike Robinson
> -----Original Message-----
> From: Marcus Börger [mailto:marcus.boerger@t-online.de]
> Sent: Tuesday, November 12, 2002 4:05 PM
> To: Wez Furlong
> Cc: php-dev@lists.php.net
> Subject: Re: [PHP-DEV] [RFC] php-cli: option to ignore php.ini
>
>
> Implemented:
>
> [marcus@zaphod php4-HEAD]$ php -r
> 'var_dump(get_cfg_var("cfg_file_path"));var_dump(php_ini_scann
ed_files());'
> string(20) "/home/marcus/php.ini"
> bool(false)
>
> [marcus@zaphod php4-HEAD]$ php -n -r
> 'var_dump(get_cfg_var("cfg_file_path"));var_dump(php_ini_scann
ed_files());'
> bool(false)
> bool(false)
>
> [marcus@zaphod php4-HEAD]$ php -c x -n -r
> 'var_dump(get_cfg_var("cfg_file_path"));var_dump(php_ini_scann
ed_files());'
> You cannot use both -n and -c switch. Use -h for help.
>
> marcus
>
> At 13:31 11.11.2002, Wez Furlong wrote:
> >What are your opinions for having some option to prevent the
> >loading/parsing of php.ini for the CLI version of PHP?
> >
> > -n "No Ini File" - skips parsing php.ini on startup
> >
> >At the moment, I'm using "-c DOESNOTEXIST" to achieve the
> same result,
> >but this is a bit hacky.
> >
>