Skip to content

Commit 9cc9d32

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Add built-in web server to invocation list Terminology: change embedded web server to built-in web server to align with cli usage Align -B and -E parameter names with cli usage (begin_code and end_code) Fix Bug #65219 DBSETLDBNAME should be called before login to set DBNAME in login record
2 parents 168a5bb + f4b9b20 commit 9cc9d32

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

ext/pdo_dblib/dblib_driver.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
350350

351351
DBSETLAPP(H->login, vars[1].optval);
352352

353+
#ifdef DBSETLDBNAME
354+
if (vars[3].optval) {
355+
DBSETLDBNAME(H->login, vars[3].optval);
356+
}
357+
#endif
358+
353359
H->link = dbopen(H->login, vars[2].optval);
354360

355361
if (!H->link) {
@@ -365,12 +371,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
365371
/* allow double quoted indentifiers */
366372
DBSETOPT(H->link, DBQUOTEDIDENT, "1");
367373

368-
#ifdef DBSETLDBNAME
369-
if (vars[3].optval) {
370-
DBSETLDBNAME(H->login, vars[3].optval);
371-
}
372-
#endif
373-
374374
ret = 1;
375375
dbh->max_escaped_char_length = 2;
376376
dbh->alloc_own_columns = 1;

sapi/cli/php.1.in

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ php-cgi \- PHP Common Gateway Interface 'CGI' command
2020
.LP
2121
.B php
2222
[options] [\-B
23-
.IR code ]
23+
.IR begin_code ]
2424
.B \-R
2525
.IR code
2626
[\-E
27-
.IR code ]
27+
.IR end_code ]
2828
[[\-\-]
2929
.IR args.\|.\|. ]
3030
.LP
3131
.B php
3232
[options] [\-B
33-
.IR code ]
33+
.IR begin_code ]
3434
.B \-F
3535
.IR file
3636
[\-E
37-
.IR code ]
37+
.IR end_code ]
3838
[[\-\-]
3939
.IR args.\|.\|. ]
4040
.LP
@@ -86,7 +86,7 @@ and therefore reading from
8686
.B STDIN
8787
explicitly changes the next input line or skips input lines.
8888
.LP
89-
PHP also contains an embedded web server for application development purpose. By using the \-S option where
89+
PHP also contains an built-in web server for application development purpose. By using the \-S option where
9090
.B addr:port
9191
point to a local address and port PHP will listen to HTTP requests on that address and port and serve files from the current working directory or the
9292
.B docroot
@@ -237,9 +237,9 @@ without using script tags
237237
.B \-\-process\-begin \fIcode\fP
238238
.TP
239239
.PD 1
240-
.B \-B \fIcode\fP
240+
.B \-B \fIbegin_code\fP
241241
Run PHP
242-
.IR code
242+
.IR begin_code
243243
before processing input lines
244244
.TP
245245
.PD 0
@@ -264,9 +264,9 @@ for every input line
264264
.B \-\-process\-end \fIcode\fP
265265
.TP
266266
.PD 1
267-
.B \-E \fIcode\fP
267+
.B \-E \fIend_code\fP
268268
Run PHP
269-
.IR code
269+
.IR end_code
270270
after processing all input lines
271271
.TP
272272
.PD 0
@@ -281,14 +281,14 @@ Output HTML syntax highlighted source
281281
.TP
282282
.PD 1
283283
.B \-S \fIaddr:port\fP
284-
Start embedded Webserver on the given local address and port
284+
Start built-in web server on the given local address and port
285285
.TP
286286
.PD 0
287287
.B \-\-docroot \fIdocroot\fP
288288
.TP
289289
.PD 1
290290
.B \-t \fIdocroot\fP
291-
Specify the document root to be used by the embedded web server
291+
Specify the document root to be used by the built-in web server
292292
.TP
293293
.PD 0
294294
.B \-\-version

sapi/cli/php_cli.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ static void php_cli_usage(char *argv0)
503503
" %s [options] -r <code> [--] [args...]\n"
504504
" %s [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]\n"
505505
" %s [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]\n"
506+
" %s [options] -S <addr>:<port> [-t docroot]\n"
506507
" %s [options] -- [args...]\n"
507508
" %s [options] -a\n"
508509
"\n"
@@ -544,7 +545,7 @@ static void php_cli_usage(char *argv0)
544545
" --rz <name> Show information about Zend extension <name>.\n"
545546
" --ri <name> Show configuration for extension <name>.\n"
546547
"\n"
547-
, prog, prog, prog, prog, prog, prog);
548+
, prog, prog, prog, prog, prog, prog, prog);
548549
}
549550
/* }}} */
550551

0 commit comments

Comments
 (0)