mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
Add -d switch
This commit is contained in:
parent
3a52ee44f5
commit
a27ed294df
2 changed files with 33 additions and 11 deletions
|
@ -2,6 +2,8 @@ PHP 4.0 CHANGE LOG ChangeLog
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
|
|
||||||
?? ?? 1999, Version 4.0 Beta 3
|
?? ?? 1999, Version 4.0 Beta 3
|
||||||
|
- Added -d switch to the CGI binary that allows overriding php.ini values
|
||||||
|
from the command line (Zeev)
|
||||||
- Fixed a crash that would occur if wddx_deserialize did not receive
|
- Fixed a crash that would occur if wddx_deserialize did not receive
|
||||||
a valid packet (Andrey)
|
a valid packet (Andrey)
|
||||||
- Fixed a bugglet when redefining a class at run-time (Andi, Zend library)
|
- Fixed a bugglet when redefining a class at run-time (Andi, Zend library)
|
||||||
|
@ -11,7 +13,7 @@ PHP 4.0 CHANGE LOG ChangeLog
|
||||||
- Fixed bug in ISAPI header sending function (Charles)
|
- Fixed bug in ISAPI header sending function (Charles)
|
||||||
- Fixed memory leak when using undefined values (Andi & Zeev, Zend library)
|
- Fixed memory leak when using undefined values (Andi & Zeev, Zend library)
|
||||||
- Added output_buffering directive to php.ini, to enable output buffering
|
- Added output_buffering directive to php.ini, to enable output buffering
|
||||||
for all PHP scripts (default is off).
|
for all PHP scripts - default is off (Zeev).
|
||||||
- Fixed some more class inheritance issues (Zeev, Zend library)
|
- Fixed some more class inheritance issues (Zeev, Zend library)
|
||||||
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
|
- Fixed Apache build wrt to shared modules on FreeBSD/Linux (Sascha)
|
||||||
- Added session.extern_referer_chk which checks whether session ids were
|
- Added session.extern_referer_chk which checks whether session ids were
|
||||||
|
|
22
cgi_main.c
22
cgi_main.c
|
@ -170,6 +170,7 @@ static void php_cgi_usage(char *argv0)
|
||||||
#if SUPPORT_INTERACTIVE
|
#if SUPPORT_INTERACTIVE
|
||||||
" -a Run interactively\n"
|
" -a Run interactively\n"
|
||||||
#endif
|
#endif
|
||||||
|
" -d foo[=bar] Define INI entry foo with value 'bar'\n"
|
||||||
" -e Generate extended information for debugger/profiler\n"
|
" -e Generate extended information for debugger/profiler\n"
|
||||||
" -i PHP information\n"
|
" -i PHP information\n"
|
||||||
" -h This help\n", prog);
|
" -h This help\n", prog);
|
||||||
|
@ -193,6 +194,22 @@ static void init_request_info(SLS_D)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void define_command_line_ini_entry(char *arg)
|
||||||
|
{
|
||||||
|
char *name, *value;
|
||||||
|
|
||||||
|
name = arg;
|
||||||
|
value = strchr(arg, '=');
|
||||||
|
if (value) {
|
||||||
|
*value = 0;
|
||||||
|
value++;
|
||||||
|
} else {
|
||||||
|
value = "1";
|
||||||
|
}
|
||||||
|
php_alter_ini_entry(name, strlen(name), value, strlen(value), PHP_INI_SYSTEM);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int cgi = 0, c, i, len;
|
int cgi = 0, c, i, len;
|
||||||
|
@ -288,7 +305,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
|
||||||
|
|
||||||
if (!cgi) { /* never execute the arguments if you are a CGI */
|
if (!cgi) { /* never execute the arguments if you are a CGI */
|
||||||
request_info.php_argv0 = NULL;
|
request_info.php_argv0 = NULL;
|
||||||
while ((c = getopt(argc, argv, "c:qvisnaeh?vf:")) != -1) {
|
while ((c = getopt(argc, argv, "cd:qvisnaeh?vf:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'f':
|
case 'f':
|
||||||
if (!cgi_started){
|
if (!cgi_started){
|
||||||
|
@ -361,6 +378,9 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
|
||||||
php_cgi_usage(argv[0]);
|
php_cgi_usage(argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
|
case 'd':
|
||||||
|
define_command_line_ini_entry(optarg);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue