[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/tests/ php_cli_server_004.phpt php_cli_server_005.phpt php_cli_server_006.phpt php_cli_server_007.phpt php_cli_server_008.phpt php_cli_server_009.phpt php_cl
nikicSat, 18 Feb 2012 11:59:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323324 Log: Fix cli server tests broken by r323078 Needs to be merged to 5.4 after r323078 is merged. Changed paths: U php/php-src/trunk/sapi/cli/tests/php_cli_server_004.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_005.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_006.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_007.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_008.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_009.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_010.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_012.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_013.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_014.phpt U php/php-src/trunk/sapi/cli/tests/php_cli_server_015.phpt Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_004.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_004.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_004.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -38,7 +38,7 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_005.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_005.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_005.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -50,7 +50,7 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_006.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_006.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_006.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -34,7 +34,7 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_007.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_007.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_007.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -34,7 +34,7 @@ --EXPECTF-- HTTP/1.1 401 Unauthorized Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s WWW-Authenticate: Digest realm=foo,qop=auth,nonce=X,opaque=acbd18db4cc2f85cedef654fccc4a4d8 Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_008.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_008.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_008.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -54,14 +54,14 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html string(8) HTTP/1.1 HTTP/1.0 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_009.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_009.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_009.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -78,14 +78,14 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html string(8) /foo/bar HTTP/1.0 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_010.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_010.phpt2012-02-18 11:27:34 UTC (rev 323323) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_010.phpt2012-02-18 11:59:13 UTC (rev 323324) @@ -55,7 +55,7 @@ --EXPECTF-- HTTP/1.1 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html @@ -65,7 +65,7 @@ string(7) foo=bar HTTP/1.0 200 OK Host: %s -Connection: closed +Connection: close X-Powered-By: PHP/%s Content-type: text/html Modified: php/php-src/trunk/sapi/cli/tests/php_cli_server_012.phpt
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli_server.c
cataphract Sun, 05 Feb 2012 11:45:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=323078 Log: - Connection: close, not closed. Changed paths: U php/php-src/trunk/sapi/cli/php_cli_server.c Modified: php/php-src/trunk/sapi/cli/php_cli_server.c === --- php/php-src/trunk/sapi/cli/php_cli_server.c 2012-02-05 10:35:56 UTC (rev 323077) +++ php/php-src/trunk/sapi/cli/php_cli_server.c 2012-02-05 11:45:01 UTC (rev 323078) @@ -351,7 +351,7 @@ smart_str_appendl_ex(buffer, \r\n, 2, persistent); } } - smart_str_appendl_ex(buffer, Connection: closed\r\n, sizeof(Connection: closed\r\n) - 1, persistent); + smart_str_appendl_ex(buffer, Connection: close\r\n, sizeof(Connection: close\r\n) - 1, persistent); } /* }}} */ static const char *get_mime_type(const char *ext, size_t ext_len) /* {{{ */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_http_parser.h
laruence Fri, 19 Aug 2011 07:24:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=315158 Log: Fixed #55457(cli built-in web server does not work with IE), introduced by r315128 Bug: https://bugs.php.net/55457 (Open) cli built-in web server does not work with IE Changed paths: U php/php-src/trunk/sapi/cli/php_http_parser.h Modified: php/php-src/trunk/sapi/cli/php_http_parser.h === --- php/php-src/trunk/sapi/cli/php_http_parser.h2011-08-19 06:22:32 UTC (rev 315157) +++ php/php-src/trunk/sapi/cli/php_http_parser.h2011-08-19 07:24:35 UTC (rev 315158) @@ -112,7 +112,7 @@ unsigned char index; uint32_t nread; - size_t content_length; + long content_length; /** READ-ONLY **/ unsigned short http_major; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ fpm/fpm_children.c fpm/fpm_conf.c fpm/fpm_conf.h php-fpm.conf.in
fat Sun, 17 Jul 2011 14:31:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313327 Log: backport r313323 and r313326 from PHP_5_4 Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_children.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_children.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_children.c 2011-07-17 14:28:31 UTC (rev 313326) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_children.c 2011-07-17 14:31:32 UTC (rev 313327) @@ -363,6 +363,7 @@ pid_t pid; struct fpm_child_s *child; int max; + static int warned = 0; if (wp-config-pm == PM_STYLE_DYNAMIC) { if (!in_event_loop) { /* starting */ @@ -374,7 +375,16 @@ max = wp-config-pm_max_children; } - while (fpm_pctl_can_spawn_children() wp-running_children max) { + /* +* fork children while: +* - fpm_pctl_can_spawn_children : FPM is running in a NORMAL state (aka not restart, stop or reload) +* - wp-running_children max : there is less than the max process for the current pool +* - (fpm_global_config.process_max 1 || fpm_globals.running_children fpm_global_config.process_max): +* if fpm_global_config.process_max is set, FPM has not fork this number of processes (globaly) +*/ + while (fpm_pctl_can_spawn_children() wp-running_children max (fpm_global_config.process_max 1 || fpm_globals.running_children fpm_global_config.process_max)) { + + warned = 0; child = fpm_resources_prepare(wp); if (!child) { @@ -407,6 +417,11 @@ } + if (!warned fpm_global_config.process_max 0 fpm_globals.running_children = fpm_global_config.process_max) { + warned = 1; + zlog(ZLOG_WARNING, The maximum number of processes has been reached. Please review your configuration and consider raising 'process.max'); + } + return 1; /* we are done */ } /* }}} */ Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-07-17 14:28:31 UTC (rev 313326) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-07-17 14:31:32 UTC (rev 313327) @@ -66,8 +66,9 @@ struct fpm_global_config_s fpm_global_config = { .daemonize = 1, #ifdef HAVE_SYSLOG_H - .syslog_facility = -1 + .syslog_facility = -1, #endif + .process_max = 0, }; static struct fpm_worker_pool_s *current_wp = NULL; static int ini_recursion = 0; @@ -79,6 +80,7 @@ { emergency_restart_threshold, fpm_conf_set_integer, GO(emergency_restart_threshold) }, { emergency_restart_interval, fpm_conf_set_time, GO(emergency_restart_interval) }, { process_control_timeout, fpm_conf_set_time, GO(process_control_timeout) }, + { process.max, fpm_conf_set_integer, GO(process_max) }, { daemonize, fpm_conf_set_boolean, GO(daemonize) }, { pid, fpm_conf_set_string, GO(pid_file) }, { error_log, fpm_conf_set_string, GO(error_log) }, @@ -962,6 +964,11 @@ fpm_globals.log_level = fpm_global_config.log_level; + if (fpm_global_config.process_max 0) { + zlog(ZLOG_ERROR, process_max can't be negative); + return -1; + } + if (!fpm_global_config.error_log) { fpm_global_config.error_log = strdup(log/php-fpm.log); } @@ -1342,6 +1349,7 @@ zlog(ZLOG_NOTICE, \tsyslog.facility = %d, fpm_global_config.syslog_facility); /* FIXME: convert to string */ #endif zlog(ZLOG_NOTICE, \tprocess_control_timeout = %ds, fpm_global_config.process_control_timeout); + zlog(ZLOG_NOTICE, \tprocess.max = %d, fpm_global_config.process_max); zlog(ZLOG_NOTICE, \temergency_restart_interval = %ds, fpm_global_config.emergency_restart_interval); zlog(ZLOG_NOTICE, \temergency_restart_threshold = %d, fpm_global_config.emergency_restart_threshold); zlog(ZLOG_NOTICE, \trlimit_files = %d, fpm_global_config.rlimit_files); Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2011-07-17 14:28:31 UTC (rev 313326) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2011-07-17 14:31:32 UTC (rev 313327) @@ -32,6 +32,7 @@ #endif int rlimit_files; int rlimit_core; + int process_max; }; extern
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ fpm/fpm_conf.c fpm/fpm_conf.h fpm/fpm_main.c fpm/fpm_php.c fpm/fpm_php.h fpm/fpm_worker_pool.h php-fpm.conf.in
fat Sun, 17 Jul 2011 14:42:58 + Revision: http://svn.php.net/viewvc?view=revisionrevision=313328 Log: backport r313186 from PHP_5_4 Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c U php/php-src/trunk/sapi/fpm/fpm/fpm_php.c U php/php-src/trunk/sapi/fpm/fpm/fpm_php.h U php/php-src/trunk/sapi/fpm/fpm/fpm_worker_pool.h U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-07-17 14:31:32 UTC (rev 313327) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2011-07-17 14:42:58 UTC (rev 313328) @@ -123,6 +123,7 @@ { ping.response, fpm_conf_set_string, WPO(ping_response) }, { access.log,fpm_conf_set_string, WPO(access_log) }, { access.format, fpm_conf_set_string, WPO(access_format) }, + { security.limit_extensions, fpm_conf_set_string, WPO(security_limit_extensions) }, { 0, 0, 0 } }; @@ -601,6 +602,7 @@ free(wpc-prefix); free(wpc-access_log); free(wpc-access_format); + free(wpc-security_limit_extensions); return 0; } @@ -847,6 +849,56 @@ } } + if (!wp-config-security_limit_extensions) { + wp-config-security_limit_extensions = strdup(.php); + } + + if (*wp-config-security_limit_extensions) { + int nb_ext; + char *ext; + char *security_limit_extensions; + char *limit_extensions; + + + /* strdup because strtok(3) alters the string it parses */ + security_limit_extensions = strdup(wp-config-security_limit_extensions); + limit_extensions = security_limit_extensions; + nb_ext = 0; + + /* find the number of extensions */ + while ((ext = strtok(limit_extensions, \t))) { + limit_extensions = NULL; + nb_ext++; + } + free(security_limit_extensions); + + /* if something found */ + if (nb_ext 0) { + + /* malloc the extension array */ + wp-limit_extensions = malloc(sizeof(char *) * (nb_ext + 1)); + if (!wp-limit_extensions) { + zlog(ZLOG_ERROR, [pool %s] unable to malloc extensions array, wp-config-name); + return -1; + } + + /* strdup because strtok(3) alters the string it parses */ + security_limit_extensions = strdup(wp-config-security_limit_extensions); + limit_extensions = security_limit_extensions; + nb_ext = 0; + + /* parse the string and save the extension in the array */ + while ((ext = strtok(security_limit_extensions, \t))) { + security_limit_extensions = NULL; + wp-limit_extensions[nb_ext++] = strdup(ext); + } + + /* end the array with NULL in order to parse it */ + wp-limit_extensions[nb_ext] = NULL; + free(security_limit_extensions); + } + } + if (wp-config-chroot *wp-config-chroot) { fpm_evaluate_full_path(wp-config-chroot, wp, NULL, 1); @@ -1388,6 +1440,7 @@ zlog(ZLOG_NOTICE, \tslowlog = %s, STR2STR(wp-config-slowlog)); zlog(ZLOG_NOTICE, \trlimit_files = %d, wp-config-rlimit_files); zlog(ZLOG_NOTICE, \trlimit_core = %d, wp-config-rlimit_core); + zlog(ZLOG_NOTICE, \tsecurity.limit_extensions = %s, wp-config-security_limit_extensions); for (kv = wp-config-env; kv; kv = kv-next) { zlog(ZLOG_NOTICE, \tenv[%s] = %s, kv-key, kv-value); Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2011-07-17 14:31:32 UTC (rev 313327) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2011-07-17 14:42:58 UTC (rev 313328) @@ -67,6 +67,7 @@ char *listen_group;
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c
felipe Sun, 05 Jun 2011 17:02:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=311835 Log: - Fixed crash in fastcgi (related to zend signals changes) Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2011-06-05 15:32:46 UTC (rev 311834) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2011-06-05 17:02:46 UTC (rev 311835) @@ -1744,7 +1744,7 @@ int max_requests = 500; int requests = 0; - int fastcgi = fcgi_is_fastcgi(); + int fastcgi; char *bindpath = NULL; int fcgi_fd = 0; fcgi_request *request = NULL; @@ -1786,6 +1786,7 @@ #endif sapi_startup(cgi_sapi_module); + fastcgi = fcgi_is_fastcgi(); cgi_sapi_module.php_ini_path_override = NULL; #ifdef PHP_WIN32 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/tests/ 011.phpt
pierrick Thu, 05 May 2011 18:30:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310794 Log: # Fix phpt Changed paths: U php/php-src/trunk/sapi/cli/tests/011.phpt Modified: php/php-src/trunk/sapi/cli/tests/011.phpt === --- php/php-src/trunk/sapi/cli/tests/011.phpt 2011-05-05 17:05:00 UTC (rev 310793) +++ php/php-src/trunk/sapi/cli/tests/011.phpt 2011-05-05 18:30:14 UTC (rev 310794) @@ -51,7 +51,7 @@ string(40) Could not open input file: some.unknown -string(186) +string(%d) Parse error: %s expecting %s{%s in %s on line %d Errors parsing %s011.test.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/cli/tests/ 011.phpt
On 05/05/2011 10:30 PM, Pierrick Charron wrote: -string(186) +string(%d) Oh, thanks! =) -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/cli/tests/ 011.phpt
You're welcome :) On 5 May 2011 14:35, Antony Dovgal t...@daylessday.org wrote: On 05/05/2011 10:30 PM, Pierrick Charron wrote: -string(186) +string(%d) Oh, thanks! =) -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/tests/ 007.phpt 008.phpt 009.phpt 011.phpt 012.phpt 014.phpt
tony2001 Wed, 04 May 2011 08:24:16 + Revision: http://svn.php.net/viewvc?view=revisionrevision=310754 Log: fix CLI tests failing because of new OB API Changed paths: U php/php-src/trunk/sapi/cli/tests/007.phpt U php/php-src/trunk/sapi/cli/tests/008.phpt U php/php-src/trunk/sapi/cli/tests/009.phpt U php/php-src/trunk/sapi/cli/tests/011.phpt U php/php-src/trunk/sapi/cli/tests/012.phpt U php/php-src/trunk/sapi/cli/tests/014.phpt Modified: php/php-src/trunk/sapi/cli/tests/007.phpt === --- php/php-src/trunk/sapi/cli/tests/007.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/007.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -45,8 +45,8 @@ ?php class test { public $var = test; private $pri; function foo() { } } ? -Could not open input file: wrong -NULL +string(33) Could not open input file: wrong + string(43) ?php class test { function foo() {} } ? Done Modified: php/php-src/trunk/sapi/cli/tests/008.phpt === --- php/php-src/trunk/sapi/cli/tests/008.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/008.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -38,6 +38,6 @@ Fatal error: Cannot access private property test::$pri in %s on line %d -Could not open input file: wrong -NULL +string(33) Could not open input file: wrong + Done Modified: php/php-src/trunk/sapi/cli/tests/009.phpt === --- php/php-src/trunk/sapi/cli/tests/009.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/009.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -13,8 +13,8 @@ echo Done\n; ? --EXPECTF-- -Either execute direct code, process stdin or use a file. -NULL -Either execute direct code, process stdin or use a file. -NULL +string(57) Either execute direct code, process stdin or use a file. + +string(57) Either execute direct code, process stdin or use a file. + Done Modified: php/php-src/trunk/sapi/cli/tests/011.phpt === --- php/php-src/trunk/sapi/cli/tests/011.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/011.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -49,9 +49,9 @@ --EXPECTF-- string(%d) No syntax errors detected in %s011.test.php -Could not open input file: some.unknown -NULL -string(%d) +string(40) Could not open input file: some.unknown + +string(186) Parse error: %s expecting %s{%s in %s on line %d Errors parsing %s011.test.php Modified: php/php-src/trunk/sapi/cli/tests/012.phpt === --- php/php-src/trunk/sapi/cli/tests/012.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/012.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -19,20 +19,20 @@ echo Done\n; ? --EXPECTF-- -You can use -R or -F only once. -NULL -You can use -R or -F only once. -NULL -You can use -R or -F only once. -NULL -You can use -R or -F only once. -NULL -You can use -f only once. -NULL -You can use -B only once. -NULL -You can use -E only once. -NULL -You can use -r only once. -NULL +string(32) You can use -R or -F only once. + +string(32) You can use -R or -F only once. + +string(32) You can use -R or -F only once. + +string(32) You can use -R or -F only once. + +string(26) You can use -f only once. + +string(26) You can use -B only once. + +string(26) You can use -E only once. + +string(26) You can use -r only once. + Done Modified: php/php-src/trunk/sapi/cli/tests/014.phpt === --- php/php-src/trunk/sapi/cli/tests/014.phpt 2011-05-04 07:53:22 UTC (rev 310753) +++ php/php-src/trunk/sapi/cli/tests/014.phpt 2011-05-04 08:24:16 UTC (rev 310754) @@ -39,6 +39,6 @@ br /span style=color: #BBlt;?phpbr /$testnbsp;/spanspan style=color: #007700=nbsp;/spanspan style=color: #DDvar/spanspan style=color: #007700;nbsp;/spanspan style=color: #FF8000//varbr //*nbsp;testnbsp;classnbsp;*/br //spanspan style=color: #007700classnbsp;/spanspan style=color: #BBtestnbsp;/spanspan style=color: #007700{br /nbsp;nbsp;nbsp;nbsp;privatenbsp;/spanspan style=color: #BB$varnbsp;/spanspan style=color: #007700=nbsp;array();br /br /nbsp;nbsp;nbsp;nbsp;publicnbsp;staticnbsp;functionnbsp;/spanspan style=color: #BBfoo/spanspan style=color: #007700(/spanspan style=color: #BBTestnbsp;$arg/spanspan style=color: #007700)nbsp;{br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;echonbsp;/spanspan style=color: #DDhello/spanspan style=color: #007700;br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spa! nspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BB$this/spanspan style=color:
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
jimjag Wed, 09 Mar 2011 18:53:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=309054 Log: Close [PHP-BUG] Req #54152... Apache 2.3.12 (and later) will now work correctly with PHP's fcgi impl with this patch. Bug: http://bugs.php.net/54152 (Assigned) Make FPM compatible with Apache HTTP Server 2.3 mod_proxy_fcgi Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2011-03-09 18:27:30 UTC (rev 309053) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2011-03-09 18:53:22 UTC (rev 309054) @@ -1083,6 +1083,7 @@ char *env_path_translated = sapi_cgibin_getenv(PATH_TRANSLATED, sizeof(PATH_TRANSLATED)-1 TSRMLS_CC); char *script_path_translated = env_script_filename; char *ini; + int apache_was_here = 0; /* some broken servers do not have script_filename or argv0 * an example, IIS configured in some ways. then they do more @@ -1128,6 +1129,30 @@ env_path_info = _sapi_cgibin_putenv(PATH_INFO, env_path_info TSRMLS_CC); } +#define APACHE_PROXY_FCGI_PREFIX proxy:fcgi:// + /* Fix proxy URLs in SCRIPT_FILENAME generated by Apache mod_proxy_fcgi: +* proxy:fcgi://localhost:9000/some-dir/info.php/test +* should be changed to: +* /some-dir/info.php/test +* See: http://bugs.php.net/bug.php?id=54152 +* https://issues.apache.org/bugzilla/show_bug.cgi?id=50851 +*/ + if (env_script_filename + strncasecmp(env_script_filename, APACHE_PROXY_FCGI_PREFIX, sizeof(APACHE_PROXY_FCGI_PREFIX) - 1) == 0) { + /* advance to first character of hostname */ + char *p = env_script_filename + (sizeof(APACHE_PROXY_FCGI_PREFIX) - 1); + while (*p != '\0' *p != '/') { + p++;/* move past hostname and port */ + } + if (*p != '\0') { + /* Copy path portion in place to avoid memory leak. Note +* that this also affects what script_path_translated points +* to. */ + memmove(env_script_filename, p, strlen(p) + 1); + apache_was_here = 1; + } + } + if (CGIG(fix_pathinfo)) { struct stat st; char *real_path = NULL; @@ -1199,11 +1224,21 @@ * we have to play the game of hide and seek to figure * out what SCRIPT_NAME should be */ - int slen = len - strlen(pt); + int ptlen = strlen(pt); + int slen = len - ptlen; int pilen = env_path_info ? strlen(env_path_info) : 0; - char *path_info = env_path_info ? env_path_info + pilen - slen : NULL; + int tflag = 0; + char *path_info; + if (apache_was_here) { + /* recall that PATH_INFO won't exist */ + path_info = script_path_translated + ptlen; + tflag = (slen != 0 (!orig_path_info || strcmp(orig_path_info, path_info) != 0)); + } else { + path_info = env_path_info ? env_path_info + pilen - slen : NULL; + tflag = (orig_path_info != path_info); + } - if (orig_path_info != path_info) { + if (tflag) { if (orig_path_info) { char old; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli.c
johannes Tue, 22 Feb 2011 12:51:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308564 Log: Declare vars first. Fix Windows build. Changed paths: U php/php-src/trunk/sapi/cli/php_cli.c Modified: php/php-src/trunk/sapi/cli/php_cli.c === --- php/php-src/trunk/sapi/cli/php_cli.c2011-02-22 11:02:45 UTC (rev 308563) +++ php/php-src/trunk/sapi/cli/php_cli.c2011-02-22 12:51:43 UTC (rev 308564) @@ -253,6 +253,8 @@ { #ifdef PHP_WRITE_STDOUT long ret; +#else + size_t ret; #endif if (cli_shell_callbacks.cli_shell_write) { @@ -274,8 +276,6 @@ return ret; #else - size_t ret; - ret = fwrite(str, 1, MIN(str_length, 16384), stdout); return ret; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli_readline.c php_cli_readline.h
pajoye Tue, 22 Feb 2011 12:59:50 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308565 Log: - missing files Changed paths: A php/php-src/trunk/sapi/cli/php_cli_readline.c A php/php-src/trunk/sapi/cli/php_cli_readline.h Added: php/php-src/trunk/sapi/cli/php_cli_readline.c === --- php/php-src/trunk/sapi/cli/php_cli_readline.c (rev 0) +++ php/php-src/trunk/sapi/cli/php_cli_readline.c 2011-02-22 12:59:50 UTC (rev 308565) @@ -0,0 +1,448 @@ +/* + +--+ + | PHP Version 5| + +--+ + | Copyright (c) 1997-2011 The PHP Group| + +--+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is| + | available through the world-wide-web at the following url: | + | http://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | lice...@php.net so we can mail you a copy immediately. | + +--+ + | Author: Marcus Boerger he...@php.net | + | Johannes Schlueter johan...@php.net| + +--+ +*/ + +/* $Id: php_cli_readline.c 306939 2011-01-01 02:19:59Z felipe $ */ + +#include php.h + +#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) !defined(COMPILE_DL_READLINE) + +#ifndef HAVE_RL_COMPLETION_MATCHES +#define rl_completion_matches completion_matches +#endif + +#include php_globals.h +#include php_variables.h +#include zend_hash.h +#include zend_modules.h + +#include SAPI.h + +#if HAVE_SETLOCALE +#include locale.h +#endif +#include zend.h +#include zend_extensions.h +#include php_ini.h +#include php_globals.h +#include php_main.h +#include fopen_wrappers.h +#include ext/standard/php_standard.h + +#ifdef __riscos__ +#include unixlib/local.h +#endif + +#if HAVE_LIBEDIT +#include editline/readline.h +#else +#include readline/readline.h +#include readline/history.h +#endif + +#include zend_compile.h +#include zend_execute.h +#include zend_highlight.h +#include zend_indent.h + +typedef enum { + body, + sstring, + dstring, + sstring_esc, + dstring_esc, + comment_line, + comment_block, + heredoc_start, + heredoc, + outside, +} php_code_type; + +int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */ +{ + int valid_end = 1, last_valid_end; + int brackets_count = 0; + int brace_count = 0; + int i; + php_code_type code_type = body; + char *heredoc_tag; + int heredoc_len; + + for (i = 0; i len; ++i) { + switch(code_type) { + default: +switch(code[i]) { + case '{': + brackets_count++; + valid_end = 0; + break; + case '}': + if (brackets_count 0) { + brackets_count--; + } + valid_end = brackets_count ? 0 : 1; + break; + case '(': + brace_count++; + valid_end = 0; + break; + case ')': + if (brace_count 0) { + brace_count--; + } + valid_end = 0; + break; + case ';': + valid_end = brace_count == 0 brackets_count == 0; + break; + case ' ': + case '\r': + case '\n': + case '\t': + break; + case '\'': + code_type = sstring; + break; + case '': + code_type = dstring; + break; + case '#': + code_type = comment_line; + break; + case '/': + if (code[i+1] == '/') { + i++; + code_type = comment_line; + break; + } + if (code[i+1] == '*') { + last_valid_end = valid_end; + valid_end = 0; + code_type = comment_block; + i++; + break; + } + valid_end = 0; + break; + case '%': + if (!CG(asp_tags)) { + valid_end = 0; + break; + } + /* no break */ + case '?': + if (code[i+1] == '') { + i++; + code_type = outside; + break; + } + valid_end = 0; + break; + case '': + valid_end = 0; + if (i + 2 len code[i+1] == '' code[i+2] == '') { + i += 2; + code_type = heredoc_start; + heredoc_len = 0; + } + break; + default: + valid_end = 0; + break; +} +break; + case sstring: +if (code[i] == '\\') { + code_type = sstring_esc; +} else { + if (code[i] == '\'') { + code_type = body; + } +} +break; + case
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php_cli_readline.c php_cli_readline.h
pajoye Tue, 22 Feb 2011 13:09:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=308566 Log: -not needed, buildconf helps... Changed paths: D php/php-src/trunk/sapi/cli/php_cli_readline.c D php/php-src/trunk/sapi/cli/php_cli_readline.h Deleted: php/php-src/trunk/sapi/cli/php_cli_readline.c === --- php/php-src/trunk/sapi/cli/php_cli_readline.c 2011-02-22 12:59:50 UTC (rev 308565) +++ php/php-src/trunk/sapi/cli/php_cli_readline.c 2011-02-22 13:09:15 UTC (rev 308566) @@ -1,448 +0,0 @@ -/* - +--+ - | PHP Version 5| - +--+ - | Copyright (c) 1997-2011 The PHP Group| - +--+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | lice...@php.net so we can mail you a copy immediately. | - +--+ - | Author: Marcus Boerger he...@php.net | - | Johannes Schlueter johan...@php.net| - +--+ -*/ - -/* $Id: php_cli_readline.c 306939 2011-01-01 02:19:59Z felipe $ */ - -#include php.h - -#if (HAVE_LIBREADLINE || HAVE_LIBEDIT) !defined(COMPILE_DL_READLINE) - -#ifndef HAVE_RL_COMPLETION_MATCHES -#define rl_completion_matches completion_matches -#endif - -#include php_globals.h -#include php_variables.h -#include zend_hash.h -#include zend_modules.h - -#include SAPI.h - -#if HAVE_SETLOCALE -#include locale.h -#endif -#include zend.h -#include zend_extensions.h -#include php_ini.h -#include php_globals.h -#include php_main.h -#include fopen_wrappers.h -#include ext/standard/php_standard.h - -#ifdef __riscos__ -#include unixlib/local.h -#endif - -#if HAVE_LIBEDIT -#include editline/readline.h -#else -#include readline/readline.h -#include readline/history.h -#endif - -#include zend_compile.h -#include zend_execute.h -#include zend_highlight.h -#include zend_indent.h - -typedef enum { - body, - sstring, - dstring, - sstring_esc, - dstring_esc, - comment_line, - comment_block, - heredoc_start, - heredoc, - outside, -} php_code_type; - -int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */ -{ - int valid_end = 1, last_valid_end; - int brackets_count = 0; - int brace_count = 0; - int i; - php_code_type code_type = body; - char *heredoc_tag; - int heredoc_len; - - for (i = 0; i len; ++i) { - switch(code_type) { - default: -switch(code[i]) { - case '{': - brackets_count++; - valid_end = 0; - break; - case '}': - if (brackets_count 0) { - brackets_count--; - } - valid_end = brackets_count ? 0 : 1; - break; - case '(': - brace_count++; - valid_end = 0; - break; - case ')': - if (brace_count 0) { - brace_count--; - } - valid_end = 0; - break; - case ';': - valid_end = brace_count == 0 brackets_count == 0; - break; - case ' ': - case '\r': - case '\n': - case '\t': - break; - case '\'': - code_type = sstring; - break; - case '': - code_type = dstring; - break; - case '#': - code_type = comment_line; - break; - case '/': - if (code[i+1] == '/') { - i++; - code_type = comment_line; - break; - } - if (code[i+1] == '*') { - last_valid_end = valid_end; - valid_end = 0; - code_type = comment_block; - i++; - break; - } - valid_end = 0; - break; - case '%': - if (!CG(asp_tags)) { - valid_end = 0; - break; - } - /* no break */ - case '?': - if (code[i+1] == '') { - i++; - code_type = outside; - break; - } - valid_end = 0; - break; - case '': - valid_end = 0; - if (i + 2 len code[i+1] == '' code[i+2] == '') { - i += 2; - code_type = heredoc_start; - heredoc_len = 0; - } - break; - default: - valid_end = 0; - break; -} -break; - case sstring: -if (code[i] == '\\') { - code_type = sstring_esc; -} else { - if (code[i] == '\'') { - code_type = body; - } -}
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ Makefile.frag
felipe Sun, 23 Jan 2011 22:40:35 + Revision: http://svn.php.net/viewvc?view=revisionrevision=307687 Log: - Fix missing mkdir for bindir (patch by David Tajchreber) Changed paths: U php/php-src/trunk/sapi/cli/Makefile.frag Modified: php/php-src/trunk/sapi/cli/Makefile.frag === --- php/php-src/trunk/sapi/cli/Makefile.frag2011-01-23 22:33:13 UTC (rev 307686) +++ php/php-src/trunk/sapi/cli/Makefile.frag2011-01-23 22:40:35 UTC (rev 307687) @@ -5,6 +5,7 @@ install-cli: $(SAPI_CLI_PATH) @echo Installing PHP CLI binary:$(INSTALL_ROOT)$(bindir)/ + @$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) @$(INSTALL) -m 0755 $(SAPI_CLI_PATH) $(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT) @echo Installing PHP CLI man page: $(INSTALL_ROOT)$(mandir)/man1/ @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_config.h
fat Thu, 11 Nov 2010 12:55:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305273 Log: - add missing timer* macros (for solaris) - ws Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_config.h Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_config.h === --- php/php-src/trunk/sapi/fpm/fpm/fpm_config.h 2010-11-11 12:49:11 UTC (rev 305272) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_config.h 2010-11-11 12:55:05 UTC (rev 305273) @@ -1,50 +1,83 @@ +/* $Id: fpm_config.h,v 1.16 2008/05/25 00:30:43 anight Exp $ */ +/* (c) 2007,2008 Andrei Nigmatulin */ - /* $Id: fpm_config.h,v 1.16 2008/05/25 00:30:43 anight Exp $ */ - /* (c) 2007,2008 Andrei Nigmatulin */ +#include php_config.h -#include php_config.h #ifdef FPM_AUTOCONFIG_H -#include fpm_autoconfig.h +# include fpm_autoconfig.h #endif /* Solaris does not have it */ #ifndef INADDR_NONE -#define INADDR_NONE (-1) +# define INADDR_NONE (-1) #endif /* If we're not using GNU C, elide __attribute__ */ #ifndef __GNUC__ -# define __attribute__(x) /*NOTHING*/ +# define __attribute__(x) /*NOTHING*/ #endif +/* Missing timer* macros (for solaris) */ +#ifndef timerisset +# define timerisset(tvp) ((tvp)-tv_sec || (tvp)-tv_usec) +#endif -/* Solaris does not have it */ +#ifndef timerclear +# define timerclear(tvp) ((tvp)-tv_sec = (tvp)-tv_usec = 0) +#endif + #ifndef timersub -#definetimersub(tvp, uvp, vvp) \ - do {\ - (vvp)-tv_sec = (tvp)-tv_sec - (uvp)-tv_sec; \ - (vvp)-tv_usec = (tvp)-tv_usec - (uvp)-tv_usec; \ - if ((vvp)-tv_usec 0) { \ - (vvp)-tv_sec--;\ - (vvp)-tv_usec += 100; \ - } \ +# define timersub(tvp, uvp, vvp) \ + do { \ + (vvp)-tv_sec = (tvp)-tv_sec - (uvp)-tv_sec;\ + (vvp)-tv_usec = (tvp)-tv_usec - (uvp)-tv_usec; \ + if ((vvp)-tv_usec 0) { \ + (vvp)-tv_sec--; \ + (vvp)-tv_usec += 100;\ + } \ } while (0) #endif +#ifndef timeradd +# define timeradd(a, b, result) \ + do { \ + (result)-tv_sec = (a)-tv_sec + (b)-tv_sec;\ + (result)-tv_usec = (a)-tv_usec + (b)-tv_usec; \ + if ((result)-tv_usec = 100)\ + {\ + ++(result)-tv_sec; \ + (result)-tv_usec -= 100;\ + }\ + } while (0) +#endif + +#ifndef timercmp +/* does not work for = and = */ +# define timercmp(a, b, CMP) \ + (((a)-tv_sec == (b)-tv_sec) ?\ + ((a)-tv_usec CMP (b)-tv_usec) : \ +((a)-tv_sec CMP (b)-tv_sec)) +#endif +/* endof timer* macros */ + #ifndef MIN -#define MIN(a,b) (((a)(b))?(a):(b)) +# define MIN(a,b) (((a)(b))?(a):(b)) #endif +#ifndef MAX +# define MAX(a,b) (((a)(b))?(a):(b)) +#endif + #if defined(HAVE_PTRACE) || defined(PROC_MEM_FILE) || defined(HAVE_MACH_VM_READ) -#define HAVE_FPM_TRACE 1 +# define HAVE_FPM_TRACE 1 #else -#define HAVE_FPM_TRACE 0 +# define HAVE_FPM_TRACE 0 #endif #if defined(HAVE_LQ_TCP_INFO) || defined(HAVE_LQ_SO_LISTENQ) -#define HAVE_FPM_LQ 1 +# define HAVE_FPM_LQ 1 #else -#define HAVE_FPM_LQ 0 +# define HAVE_FPM_LQ 0 #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_children.c fpm_process_ctl.c fpm_process_ctl.h
fat Sun, 07 Nov 2010 19:45:51 + Revision: http://svn.php.net/viewvc?view=revisionrevision=305174 Log: - change signal from SIGTERM to SIGQUIT for killing a child process by the dynamic process manager Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_children.c U php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c U php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.h Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_children.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_children.c 2010-11-07 19:41:28 UTC (rev 305173) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_children.c 2010-11-07 19:45:51 UTC (rev 305174) @@ -212,7 +212,7 @@ /* if it's been killed because of dynamic process management * don't restart it automaticaly */ - if (child child-idle_kill WTERMSIG(status) == SIGTERM) { + if (child child-idle_kill WTERMSIG(status) == SIGQUIT) { restart_child = 0; } Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c2010-11-07 19:41:28 UTC (rev 305173) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c2010-11-07 19:45:51 UTC (rev 305174) @@ -143,6 +143,9 @@ case FPM_PCTL_CONT : s = SIGCONT; break; + case FPM_PCTL_QUIT : + s = SIGQUIT; + break; default : break; } @@ -358,7 +361,7 @@ if (idle wp-config-pm_max_spare_servers last_idle_child) { last_idle_child-idle_kill = 1; - fpm_pctl_kill(last_idle_child-pid, FPM_PCTL_TERM); + fpm_pctl_kill(last_idle_child-pid, FPM_PCTL_QUIT); wp-idle_spawn_rate = 1; continue; } Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.h === --- php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.h2010-11-07 19:41:28 UTC (rev 305173) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.h2010-11-07 19:45:51 UTC (rev 305174) @@ -38,7 +38,8 @@ enum { FPM_PCTL_TERM, FPM_PCTL_STOP, - FPM_PCTL_CONT + FPM_PCTL_CONT, + FPM_PCTL_QUIT }; #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
dmitry Mon, 20 Sep 2010 10:45:22 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303614 Log: Reverted wrong patch Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-20 10:33:23 UTC (rev 303613) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-20 10:45:22 UTC (rev 303614) @@ -1108,7 +1108,7 @@ DisconnectNamedPipe(pipe); } else { if (!force) { - char buf; + fcgi_header buf; shutdown(req-fd, 1); /* read the last FCGI_STDIN header (it may be omitted) */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
Hi Kalle, Your patch was definitely wrong and I reverted it. This code reads a terminating FastCGI header which can be omitted. With your change PHP reads just a single byte instead of whole header, as result FastCGI manager receives SIGPIPE and may assume that it can't deliver request. I don't know what you tried to fix because on Unix recv() has void* argument. Thanks. Dmitry. Kalle Sommer Nielsen wrote: kalleSun, 19 Sep 2010 19:18:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303577 Log: Fix incompatible types, we need to use a char here for recv() Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:08:56 UTC (rev 303576) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:18:30 UTC (rev 303577) @@ -1108,7 +1108,7 @@ DisconnectNamedPipe(pipe); } else { if (!force) { - fcgi_header buf; + char buf; shutdown(req-fd, 1); /* read the last FCGI_STDIN header (it may be omitted) */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
kalleSun, 19 Sep 2010 19:18:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303577 Log: Fix incompatible types, we need to use a char here for recv() Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:08:56 UTC (rev 303576) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-19 19:18:30 UTC (rev 303577) @@ -1108,7 +1108,7 @@ DisconnectNamedPipe(pipe); } else { if (!force) { - fcgi_header buf; + char buf; shutdown(req-fd, 1); /* read the last FCGI_STDIN header (it may be omitted) */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c
pajoye Wed, 15 Sep 2010 22:25:44 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303410 Log: - unused, double declared Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-15 22:17:18 UTC (rev 303409) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-15 22:25:44 UTC (rev 303410) @@ -105,6 +105,7 @@ */ static int children = 0; + /** * Set to non-zero if we are the parent process */ @@ -669,7 +670,6 @@ if (CGIG(fix_pathinfo)) { char *script_name = SG(request_info).request_uri; char *path_info; - unsigned int path_info_len; int free_php_self; ALLOCA_FLAG(use_heap) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
dmitry Mon, 06 Sep 2010 11:11:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=303072 Log: Fixed bug #46723 (FastCGI persistent connection is incredibly slow due to TCP ack delay). Bug: http://bugs.php.net/46723 (Assigned) FastCGI is incredibly slow due to TCP ack delay Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-06 11:08:43 UTC (rev 303071) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-06 11:11:40 UTC (rev 303072) @@ -67,6 +67,7 @@ # include sys/socket.h # include sys/un.h # include netinet/in.h +# include netinet/tcp.h # include arpa/inet.h # include netdb.h # include signal.h @@ -337,12 +338,13 @@ struct _fcgi_request { intlisten_socket; -#ifdef _WIN32 inttcp; -#endif intfd; intid; intkeep; +#ifdef TCP_NODELAY + intnodelay; +#endif intclosed; intin_len; @@ -746,6 +748,10 @@ req-tcp = !GetNamedPipeInfo((HANDLE)_get_osfhandle(req-listen_socket), NULL, NULL, NULL, NULL); #endif +#ifdef TCP_NODELAY + req-nodelay = 0; +#endif + fcgi_hash_init(req-env); return req; @@ -908,6 +914,18 @@ } req-keep = (((fcgi_begin_request*)buf)-flags FCGI_KEEP_CONN); +#ifdef TCP_NODELAY + if (req-keep req-tcp !req-nodelay) { +# ifdef _WIN32 + BOOL on = 1; +# else + int on = 1; +# endif + + setsockopt(req-fd, IPPROTO_TCP, TCP_NODELAY, (char*)on, sizeof(on)); + req-nodelay = 1; + } +#endif switch fcgi_begin_request*)buf)-roleB1 8) + ((fcgi_begin_request*)buf)-roleB0) { case FCGI_RESPONDER: fcgi_hash_set(req-env, FCGI_HASH_FUNC(FCGI_ROLE, sizeof(FCGI_ROLE)-1), FCGI_ROLE, sizeof(FCGI_ROLE)-1, RESPONDER, sizeof(RESPONDER)-1); @@ -1108,6 +1126,9 @@ } close(req-fd); #endif +#ifdef TCP_NODELAY + req-nodelay = 0; +#endif req-fd = -1; } } @@ -1158,25 +1179,34 @@ FCGI_LOCK(req-listen_socket); req-fd = accept(listen_socket, (struct sockaddr *)sa, len); FCGI_UNLOCK(req-listen_socket); - if (req-fd = 0 - allowed_clients - ((struct sockaddr *)sa)-sa_family == AF_INET) { - int n = 0; - int allowed = 0; + if (req-fd = 0) { + if (((struct sockaddr *)sa)-sa_family == AF_INET) { +#ifndef _WIN32 + req-tcp = 1; +#endif + if (allowed_clients) { + int n = 0; + int allowed = 0; - while (allowed_clients[n] != INADDR_NONE) { - if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { - allowed = 1; - break; + while (allowed_clients[n] != INADDR_NONE) { + if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { + allowed = 1; + break; + } + n++; + } + if (!allowed) { + fprintf(stderr, Connection from disallowed IP address '%s' is dropped.\n, inet_ntoa(sa.sa_inet.sin_addr)); + closesocket(req-fd); + req-fd = -1; +
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
dmitry Wed, 01 Sep 2010 14:42:43 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302977 Log: invalid length Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-01 13:14:40 UTC (rev 302976) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-01 14:42:43 UTC (rev 302977) @@ -1438,7 +1438,7 @@ if (val == NULL) { fcgi_hash_del(req-env, var, var_len); } else { - return fcgi_hash_set(req-env, var, var_len+1, val, strlen(val)); + return fcgi_hash_set(req-env, var, var_len, val, strlen(val)); } } return NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c fastcgi.c fastcgi.h
dmitry Wed, 01 Sep 2010 15:34:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302979 Log: Reduced overhead of FastCGI using near-perfect hash function and predcalculated hash values. Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/fastcgi.c U php/php-src/trunk/sapi/cgi/fastcgi.h Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-01 14:47:36 UTC (rev 302978) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-09-01 15:34:48 UTC (rev 302979) @@ -267,41 +267,30 @@ #define STDOUT_FILENO 1 #endif -static inline size_t sapi_cgibin_single_write(const char *str, uint str_length TSRMLS_DC) +static inline size_t sapi_cgi_single_write(const char *str, uint str_length TSRMLS_DC) { #ifdef PHP_WRITE_STDOUT long ret; -#else - size_t ret; -#endif - if (fcgi_is_fastcgi()) { - fcgi_request *request = (fcgi_request*) SG(server_context); - long ret = fcgi_write(request, FCGI_STDOUT, str, str_length); - if (ret = 0) { - return 0; - } - return ret; - } - -#ifdef PHP_WRITE_STDOUT ret = write(STDOUT_FILENO, str, str_length); if (ret = 0) return 0; return ret; #else + size_t ret; + ret = fwrite(str, 1, MIN(str_length, 16384), stdout); return ret; #endif } -static int sapi_cgibin_ub_write(const char *str, uint str_length TSRMLS_DC) +static int sapi_cgi_ub_write(const char *str, uint str_length TSRMLS_DC) { const char *ptr = str; uint remaining = str_length; size_t ret; while (remaining 0) { - ret = sapi_cgibin_single_write(ptr, remaining TSRMLS_CC); + ret = sapi_cgi_single_write(ptr, remaining TSRMLS_CC); if (!ret) { php_handle_aborted_connection(); return str_length - remaining; @@ -313,21 +302,43 @@ return str_length; } +static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC) +{ + const char *ptr = str; + uint remaining = str_length; + fcgi_request *request = (fcgi_request*) SG(server_context); -static void sapi_cgibin_flush(void *server_context) + while (remaining 0) { + long ret = fcgi_write(request, FCGI_STDOUT, ptr, remaining); + + if (ret = 0) { + php_handle_aborted_connection(); + return str_length - remaining; + } + ptr += ret; + remaining -= ret; + } + + return str_length; +} + +static void sapi_cgi_flush(void *server_context) { - if (fcgi_is_fastcgi()) { - fcgi_request *request = (fcgi_request*) server_context; - if ( + if (fflush(stdout) == EOF) { + php_handle_aborted_connection(); + } +} + +static void sapi_fcgi_flush(void *server_context) +{ + fcgi_request *request = (fcgi_request*) server_context; + + if ( #ifndef PHP_WIN32 !parent #endif request !fcgi_flush(request, 0)) { - php_handle_aborted_connection(); - } - return; - } - if (fflush(stdout) == EOF) { + php_handle_aborted_connection(); } } @@ -493,12 +504,24 @@ count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes)); while (read_bytes count_bytes) { - if (fcgi_is_fastcgi()) { - fcgi_request *request = (fcgi_request*) SG(server_context); - tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes); - } else { - tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes); + tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes); + if (tmp_read_bytes = 0) { + break; } + read_bytes += tmp_read_bytes; + } + return read_bytes; +} + +static int sapi_fcgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) +{ + uint read_bytes = 0; + int tmp_read_bytes; + fcgi_request *request = (fcgi_request*) SG(server_context); + + count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes)); + while (read_bytes count_bytes) { + tmp_read_bytes = fcgi_read(request, buffer + read_bytes, count_bytes - read_bytes); if (tmp_read_bytes = 0) { break; } @@ -507,43 +530,33 @@ return read_bytes; } -static char *sapi_cgibin_getenv(char *name, size_t name_len TSRMLS_DC) +static char *sapi_cgi_getenv(char *name, size_t name_len TSRMLS_DC) { + return getenv(name); +} + +static char *sapi_fcgi_getenv(char *name, size_t name_len TSRMLS_DC) +{ /* when php is started by mod_fastcgi, no regular environment * is provided to PHP. It is always sent to PHP at the start * of a request. So we have to do our own lookup to get env * vars. This could probably be faster somehow. */ - if (fcgi_is_fastcgi()) { - fcgi_request *request = (fcgi_request*) SG(server_context); - return fcgi_getenv(request, name, name_len); - } + fcgi_request *request = (fcgi_request*) SG(server_context); + char *ret = fcgi_getenv(request, name, name_len); + + if (ret) return ret; /* if cgi, or fastcgi and not found in fcgi env check the regular environment */ return getenv(name); } -static char
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
felipe Wed, 01 Sep 2010 23:21:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302985 Log: - Fixed compiler warning (missing return statement) Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-01 22:59:25 UTC (rev 302984) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-09-01 23:21:03 UTC (rev 302985) @@ -1445,6 +1445,7 @@ if (!req) return NULL; if (val == NULL) { fcgi_hash_del(req-env, FCGI_HASH_FUNC(var, var_len), var, var_len); + return NULL; } else { return fcgi_hash_set(req-env, FCGI_HASH_FUNC(var, var_len), var, var_len, val, strlen(val)); } @@ -1454,6 +1455,7 @@ { if (val == NULL) { fcgi_hash_del(req-env, hash_value, var, var_len); + return NULL; } else { return fcgi_hash_set(req-env, hash_value, var, var_len, val, strlen(val)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
dmitry Fri, 27 Aug 2010 08:50:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302845 Log: Don't check FCGI_WEB_SERVER_ADDRS for UNIX sockets Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-27 08:49:21 UTC (rev 302844) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-27 08:50:32 UTC (rev 302845) @@ -1157,17 +1157,19 @@ FCGI_LOCK(req-listen_socket); req-fd = accept(listen_socket, (struct sockaddr *)sa, len); FCGI_UNLOCK(req-listen_socket); - if (req-fd = 0 allowed_clients) { + if (req-fd = 0 + allowed_clients + ((struct sockaddr *)sa)-sa_family == AF_INET) { int n = 0; int allowed = 0; - while (allowed_clients[n] != INADDR_NONE) { - if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { - allowed = 1; - break; - } - n++; + while (allowed_clients[n] != INADDR_NONE) { + if (allowed_clients[n] == sa.sa_inet.sin_addr.s_addr) { + allowed = 1; + break; } + n++; + } if (!allowed) { fprintf(stderr, Connection from disallowed IP address '%s' is dropped.\n, inet_ntoa(sa.sa_inet.sin_addr)); closesocket(req-fd); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c fastcgi.c fastcgi.h
kalleWed, 18 Aug 2010 12:59:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302440 Log: Use the TSRMLS_DC/TSRMLS_CC macros instead of TSRMLS_FETCH() Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/fastcgi.c U php/php-src/trunk/sapi/cgi/fastcgi.h Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-08-18 12:12:29 UTC (rev 302439) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-08-18 12:59:52 UTC (rev 302440) @@ -587,14 +587,12 @@ return sapi_cgibin_getenv((char *) HTTP_COOKIE, sizeof(HTTP_COOKIE)-1 TSRMLS_CC); } -static void cgi_php_load_env_var(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg) +static void cgi_php_load_env_var(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg TSRMLS_DC) { zval *array_ptr = (zval*)arg; - int filter_arg; + int filter_arg = (array_ptr == PG(http_globals)[TRACK_VARS_ENV])?PARSE_ENV:PARSE_SERVER; unsigned int new_val_len; - TSRMLS_FETCH(); - filter_arg = (array_ptr == PG(http_globals)[TRACK_VARS_ENV])?PARSE_ENV:PARSE_SERVER; if (sapi_module.input_filter(filter_arg, var, val, strlen(val), new_val_len TSRMLS_CC)) { php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); } @@ -633,7 +631,7 @@ /* turn off magic_quotes while importing environment variables */ PG(magic_quotes_gpc) = 0; - fcgi_loadenv(request, cgi_php_load_env_var, array_ptr); + fcgi_loadenv(request, cgi_php_load_env_var, array_ptr TSRMLS_CC); PG(magic_quotes_gpc) = magic_quotes_gpc; } } Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 12:12:29 UTC (rev 302439) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 12:59:52 UTC (rev 302440) @@ -322,13 +322,13 @@ return NULL; } -static void fcgi_hash_apply(fcgi_hash *h, fcgi_apply_func func, void *arg) +static void fcgi_hash_apply(fcgi_hash *h, fcgi_apply_func func, void *arg TSRMLS_DC) { fcgi_hash_bucket *p = h-list; while (p) { if (EXPECTED(p-val != NULL)) { - func(p-var, p-var_len, p-val, p-val_len, arg); + func(p-var, p-var_len, p-val, p-val_len, arg TSRMLS_CC); } p = p-list_next; } @@ -848,7 +848,7 @@ val_len |= *p++; } if (UNEXPECTED(name_len + val_len 0) || - UNEXPECTED(name_len + val_len end - p)) { + UNEXPECTED((unsigned char *) (name_len + val_len) end - p)) { /* Malformated request */ ret = 0; break; @@ -1435,9 +1435,9 @@ return NULL; } -void fcgi_loadenv(fcgi_request *req, fcgi_apply_func func, zval *array) +void fcgi_loadenv(fcgi_request *req, fcgi_apply_func func, zval *array TSRMLS_DC) { - fcgi_hash_apply(req-env, func, array); + fcgi_hash_apply(req-env, func, array TSRMLS_CC); } #ifdef _WIN32 Modified: php/php-src/trunk/sapi/cgi/fastcgi.h === --- php/php-src/trunk/sapi/cgi/fastcgi.h2010-08-18 12:12:29 UTC (rev 302439) +++ php/php-src/trunk/sapi/cgi/fastcgi.h2010-08-18 12:59:52 UTC (rev 302440) @@ -91,7 +91,7 @@ /* FastCGI client API */ -typedef void (*fcgi_apply_func)(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg); +typedef void (*fcgi_apply_func)(char *var, unsigned int var_len, char *val, unsigned int val_len, void *arg TSRMLS_DC); typedef struct _fcgi_request fcgi_request; @@ -107,7 +107,7 @@ char* fcgi_getenv(fcgi_request *req, const char* var, int var_len); char* fcgi_putenv(fcgi_request *req, char* var, int var_len, char* val); -void fcgi_loadenv(fcgi_request *req, fcgi_apply_func load_func, zval *array); +void fcgi_loadenv(fcgi_request *req, fcgi_apply_func load_func, zval *array TSRMLS_DC); int fcgi_read(fcgi_request *req, char *str, int len); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
kalleWed, 18 Aug 2010 18:00:33 + Revision: http://svn.php.net/viewvc?view=revisionrevision=302451 Log: Nuke compiler warning, wrong fix that shouldn't have been in the previously commit Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 16:54:47 UTC (rev 302450) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-08-18 18:00:33 UTC (rev 302451) @@ -848,7 +848,7 @@ val_len |= *p++; } if (UNEXPECTED(name_len + val_len 0) || - UNEXPECTED((unsigned char *) (name_len + val_len) end - p)) { + UNEXPECTED(name_len + val_len (unsigned int) (end - p))) { /* Malformated request */ ret = 0; break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c
dmitry Tue, 20 Jul 2010 11:28:53 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301419 Log: typo Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-07-20 09:43:37 UTC (rev 301418) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-07-20 11:28:53 UTC (rev 301419) @@ -2086,7 +2086,7 @@ if (file_handle.handle.fd 0) { break; } - file_handle.type == ZEND_HANDLE_FP; + file_handle.type = ZEND_HANDLE_FP; file_handle.handle.fp = fdopen(file_handle.handle.fd, rb); /* break missing intentionally */ case ZEND_HANDLE_FP: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c fastcgi.c fastcgi.h
dmitry Mon, 05 Jul 2010 15:40:54 + Revision: http://svn.php.net/viewvc?view=revisionrevision=301003 Log: reduced request processing overhead Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c U php/php-src/trunk/sapi/cgi/fastcgi.c U php/php-src/trunk/sapi/cgi/fastcgi.h Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2010-07-05 14:32:29 UTC (rev 301002) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2010-07-05 15:40:54 UTC (rev 301003) @@ -625,10 +625,10 @@ /* turn off magic_quotes while importing environment variables */ PG(magic_quotes_gpc) = 0; - for (zend_hash_internal_pointer_reset_ex(request-env, pos); - zend_hash_get_current_key_ex(request-env, var, var_len, idx, 0, pos) == HASH_KEY_IS_STRING - zend_hash_get_current_data_ex(request-env, (void **) val, pos) == SUCCESS; - zend_hash_move_forward_ex(request-env, pos) + for (zend_hash_internal_pointer_reset_ex(request-env, pos); + zend_hash_get_current_key_ex(request-env, var, var_len, idx, 0, pos) == HASH_KEY_IS_STRING + zend_hash_get_current_data_ex(request-env, (void **) val, pos) == SUCCESS; + zend_hash_move_forward_ex(request-env, pos) ) { unsigned int new_val_len; Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2010-07-05 14:32:29 UTC (rev 301002) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2010-07-05 15:40:54 UTC (rev 301003) @@ -638,7 +638,7 @@ memcpy(tmp, p, name_len); tmp[name_len] = 0; s = estrndup((char*)p + name_len, val_len); - zend_hash_update(req-env, tmp, name_len+1, s, sizeof(char*), NULL); + zend_hash_update(req-env, tmp, name_len+1, s, sizeof(char*), NULL); p += name_len + val_len; } if (tmp != buf tmp != NULL) { @@ -663,8 +663,8 @@ req-in_len = 0; req-out_hdr = NULL; req-out_pos = req-out_buf; - ALLOC_HASHTABLE(req-env); - zend_hash_init(req-env, 0, NULL, (void (*)(void *)) fcgi_free_var, 0); + req-has_env = 1; + zend_hash_init(req-env, 32, NULL, (void (*)(void *)) fcgi_free_var, 0); if (safe_read(req, hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) || hdr.version FCGI_VERSION_1) { @@ -700,16 +700,16 @@ req-keep = (((fcgi_begin_request*)buf)-flags FCGI_KEEP_CONN); switch fcgi_begin_request*)buf)-roleB1 8) + ((fcgi_begin_request*)buf)-roleB0) { case FCGI_RESPONDER: - val = estrdup(RESPONDER); - zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); + val = estrndup(RESPONDER, sizeof(RESPONDER)-1); + zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); break; case FCGI_AUTHORIZER: - val = estrdup(AUTHORIZER); - zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); + val = estrndup(AUTHORIZER, sizeof(AUTHORIZER)-1); + zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); break; case FCGI_FILTER: - val = estrdup(FILTER); - zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); + val = estrndup(FILTER, sizeof(FILTER)-1); + zend_hash_update(req-env, FCGI_ROLE, sizeof(FCGI_ROLE), val, sizeof(char*), NULL); break; default: return 0; @@ -765,10 +765,10 @@ return 0; } - zend_hash_internal_pointer_reset_ex(req-env, pos); - while ((key_type = zend_hash_get_current_key_ex(req-env, str_index, str_length, num_index, 0, pos)) != HASH_KEY_NON_EXISTANT) { + zend_hash_internal_pointer_reset_ex(req-env, pos); + while ((key_type = zend_hash_get_current_key_ex(req-env, str_index, str_length, num_index, 0, pos)) != HASH_KEY_NON_EXISTANT) { int zlen; - zend_hash_move_forward_ex(req-env, pos); +
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
mike Tue, 01 Jun 2010 13:51:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=300050 Log: fix fpm build Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-06-01 13:48:50 UTC (rev 300049) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-06-01 13:51:05 UTC (rev 300050) @@ -1493,7 +1493,7 @@ if (fcgi_is_fastcgi() request-fd = 0) { - php_end_ob_buffers(1 TSRMLS_CC); + php_output_end_all(TSRMLS_C); php_header(TSRMLS_C); fcgi_flush(request, 1); @@ -1629,7 +1629,6 @@ case 'm': /* list compiled in modules */ cgi_sapi_module.startup(cgi_sapi_module); - php_output_startup(); php_output_activate(TSRMLS_C); SG(headers_sent) = 1; php_printf([PHP Modules]\n); @@ -1637,7 +1636,8 @@ php_printf(\n[Zend Modules]\n); print_extensions(TSRMLS_C); php_printf(\n); - php_end_ob_buffers(1 TSRMLS_CC); + php_output_end_all(TSRMLS_C); + php_output_deactivate(TSRMLS_C); exit_status = 0; goto out; @@ -1660,11 +1660,11 @@ case 'h': case '?': cgi_sapi_module.startup(cgi_sapi_module); - php_output_startup(); php_output_activate(TSRMLS_C); SG(headers_sent) = 1; php_cgi_usage(argv[0]); - php_end_ob_buffers(1 TSRMLS_CC); + php_output_end_all(TSRMLS_C); + php_output_deactivate(TSRMLS_C); exit_status = 0; goto out; @@ -1692,11 +1692,11 @@ /* No other args are permitted here as there is not interactive mode */ if (argc != php_optind) { cgi_sapi_module.startup(cgi_sapi_module); - php_output_startup(); php_output_activate(TSRMLS_C); SG(headers_sent) = 1; php_cgi_usage(argv[0]); - php_end_ob_buffers(1 TSRMLS_CC); + php_output_end_all(TSRMLS_C); + php_output_deactivate(TSRMLS_C); exit_status = 0; goto out; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ php-fpm.conf.in
fat Thu, 27 May 2010 20:59:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299877 Log: typo Changed paths: U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/php-fpm.conf.in === --- php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-05-27 20:31:26 UTC (rev 299876) +++ php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-05-27 20:59:21 UTC (rev 299877) @@ -27,7 +27,8 @@ ; ;log_level = notice -; When this amount of php processes exited with SIGSEGV or SIGBUS ... +; When this amount of php processes exited with SIGSEGV or SIGBUS, +; php-fpm will restart ; 0 means 'Off' ; default: 0 ; @@ -35,18 +36,18 @@ ; ... in a less than this interval of time, a graceful restart will be initiated. ; Useful to work around accidental curruptions in accelerator's shared memory. -; available units are s(econd), m(inute), h(hour), or d(day) -; default : 0s +; available units are s(econd)(default), m(inute), h(hour), or d(day) +; default : 0 ; -;emergency_restart_interval = 0s +;emergency_restart_interval = 0 ; Time limit on waiting child's reaction on signals from master -; available units are s(econd), m(inute), h(hour), or d(day) -; default : 0s +; available units are s(econd)(default), m(inute), h(hour), or d(day) +; default : 0 ; -;process_control_timeout = 0s +;process_control_timeout = 0 -; send fpm to backgound (default) +; send fpm to backgound ; set to 'no' to keep FPM in foreground for debugging ; default : yes ; @@ -54,12 +55,12 @@ ; Start a new pool named 'www' ; The name is used in logs and stats -; There is no limitation of the number of pool FPM can handle. Your system will tell you anyway :) +; There is no limitation on the number of pool FPM can handle. Your system will tell you anyway :) [www] ; Address to accept fastcgi requests on. ; Valid syntaxes are: -; - 'ip.ad.re.ss:port' to listen on a TCP scoket to the specific address on the specific port +; - 'ip.add.re.ss:port' to listen on a TCP scoket to the specific address on the specific port ; - 'port' to listen on a TCP socket to all addreses on the specific port ; - '/path/to/unix/socket' to listen on a unix socket ; it's mandatory @@ -72,10 +73,11 @@ ; ;listen.backlog = -1 -; List of ipv4 addresses of FastCGI clients that allowed to connect. +; List of ipv4 addresses of FastCGI clients which are allowed to connect. ; Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) ; Makes sense only with a tcp listening socket. ; Each addresses must be separated by a comma +; If it's left blank, it accept connection from any ip address ; default: any ; ;listen.allowed_clients = 127.0.0.1 @@ -101,10 +103,10 @@ ; - dynamic : The number of child processes are set up dynamically depending on the following directives ; - pm.max_children : the maximum number of children that can be alive at the same time ; - pm.start_servers : the number of children created on startup -; - pm.min_spare_servers : the minimum number of children in 'idle' state (waiting to precess). +; - pm.min_spare_servers : the minimum number of children in 'idle' state (waiting to process). ; If the number of 'idle' processes is less than this number, ; some children will be created. -; - pm.max_spare_servers : the maximum number of children in 'idle' state (waiting to precess). +; - pm.max_spare_servers : the maximum number of children in 'idle' state (waiting to process). ; If the number of 'idle' processes is greater than this number, ; some children will be killed; ; It's mandatory @@ -201,27 +203,27 @@ ; ;ping.response = pong -; The timeout (in seconds) for serving a single request after which the worker process will be terminated +; The timeout for serving a single request after which the worker process will be killed ; Should be used when 'max_execution_time' ini option does not stop script execution for some reason ; '0' means 'off' -; available units are s(econd), m(inute), h(hour), or d(day) +; available units are s(econd)(default), m(inute), h(hour), or d(day) ; default: 0 ; -;request_terminate_timeout = 0s +;request_terminate_timeout = 0 -; The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file +; The timeout for serving of single request after which a php backtrace will be dumped to slow.log file ; '0s' means 'off' -; available units are s(econd), m(inute), h(hour), or d(day) +; available units are s(econd)(default), m(inute), h(hour), or d(day) ; default: 0 ; -;request_slowlog_timeout = 0s +;request_slowlog_timeout = 0 ; The log file for slow requests ;
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ php-fpm.conf.in
On Thu, 2010-05-27 at 20:59 +, Jérôme Loyet wrote: fat Thu, 27 May 2010 20:59:21 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299877 Log: typo Changed paths: U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Please mind that fpm has been added to the 5.3 branch. johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ config.m4
fat Wed, 19 May 2010 11:29:31 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299485 Log: - #51821, fix --with-libevent-dir (patch by tony2001) Bug: http://bugs.php.net/51821 (Assigned) configure fails to pick up a custom prefix for libevent Changed paths: U php/php-src/trunk/sapi/fpm/config.m4 Modified: php/php-src/trunk/sapi/fpm/config.m4 === --- php/php-src/trunk/sapi/fpm/config.m42010-05-19 11:28:08 UTC (rev 299484) +++ php/php-src/trunk/sapi/fpm/config.m42010-05-19 11:29:31 UTC (rev 299485) @@ -203,10 +203,12 @@ if test -n $ac_libevent_path; then LIBEVENT_CFLAGS=-I$ac_libevent_path/include LIBEVENT_LIBS=-L$ac_libevent_path/$PHP_LIBDIR $LIBEVENT_LIBS +LIBEVENT_PATH=$ac_libevent_path/$PHP_LIBDIR fi AC_SUBST(LIBEVENT_CFLAGS) AC_SUBST(LIBEVENT_LIBS) + AC_SUBST(LIBEVENT_PATH) else AC_MSG_ERROR([FPM requires libevent = $WANT_LIBEVENT_VERSION. Please specify libevent install prefix with --with-libevent-dir=yes]) @@ -505,6 +507,8 @@ AC_LIB_EVENT([$minimum_libevent_version]) + PHP_ADD_LIBRARY_WITH_PATH(event, $LIBEVENT_PATH) + PHP_TEST_BUILD(event_init, [ ], [ AC_MSG_RESULT(no) AC_MSG_ERROR([build test failed. Please check the config.log for details.]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_unix.c
fat Wed, 19 May 2010 18:37:25 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299504 Log: - set hard and soft limit (instead of only the soft limit) when setting rlimit_core or rlimit_files - remove the debug log about getrlimit on the main process wich is meaningless when rlmit_* settings are set Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_unix.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_unix.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_unix.c 2010-05-19 17:58:50 UTC (rev 299503) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_unix.c 2010-05-19 18:37:25 UTC (rev 299504) @@ -150,21 +150,20 @@ if (wp-config-rlimit_files) { struct rlimit r; - getrlimit(RLIMIT_NOFILE, r); - r.rlim_cur = (rlim_t) wp-config-rlimit_files; -// r.rlim_max = (rlim_t) wp-config-rlimit_files; + r.rlim_max = r.rlim_cur = (rlim_t) wp-config-rlimit_files; + if (0 setrlimit(RLIMIT_NOFILE, r)) { - zlog(ZLOG_STUFF, ZLOG_SYSERROR, [pool %s] setrlimit(RLIMIT_NOFILE) failed, wp-config-name); + zlog(ZLOG_STUFF, ZLOG_SYSERROR, [pool %s] setrlimit(RLIMIT_NOFILE, %d) failed (%d), wp-config-name, wp-config-rlimit_files, errno); } } if (wp-config-rlimit_core) { struct rlimit r; - getrlimit(RLIMIT_CORE, r); - r.rlim_cur = wp-config-rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp-config-rlimit_core; + r.rlim_max = r.rlim_cur = wp-config-rlimit_core == -1 ? (rlim_t) RLIM_INFINITY : (rlim_t) wp-config-rlimit_core; + if (0 setrlimit(RLIMIT_CORE, r)) { - zlog(ZLOG_STUFF, ZLOG_SYSERROR, [pool %s] setrlimit(RLIMIT_CORE) failed, wp-config-name); + zlog(ZLOG_STUFF, ZLOG_SYSERROR, [pool %s] setrlimit(RLIMIT_CORE, %d) failed (%d), wp-config-name, wp-config-rlimit_core, errno); } } @@ -248,14 +247,6 @@ } fpm_stdio_init_final(); - - { - struct rlimit r; - getrlimit(RLIMIT_NOFILE, r); - - zlog(ZLOG_STUFF, ZLOG_NOTICE, getrlimit(nofile): max:%lld, cur:%lld, - (long long) r.rlim_max, (long long) r.rlim_cur); - } return 0; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ zlog.c
fat Wed, 19 May 2010 20:11:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299509 Log: fix undefined value for log_level when not set in the conf file Changed paths: U php/php-src/trunk/sapi/fpm/fpm/zlog.c Modified: php/php-src/trunk/sapi/fpm/fpm/zlog.c === --- php/php-src/trunk/sapi/fpm/fpm/zlog.c 2010-05-19 20:05:09 UTC (rev 299508) +++ php/php-src/trunk/sapi/fpm/fpm/zlog.c 2010-05-19 20:11:56 UTC (rev 299509) @@ -51,6 +51,8 @@ { int old_value = zlog_level; + if (new_value ZLOG_DEBUG || new_value ZLOG_ALERT) return old_value; + zlog_level = new_value; return old_value; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_events.c
fat Wed, 19 May 2010 20:12:56 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299510 Log: change the startup libevent info log from notice to debug Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_events.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_events.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_events.c 2010-05-19 20:11:56 UTC (rev 299509) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_events.c 2010-05-19 20:12:56 UTC (rev 299510) @@ -90,7 +90,7 @@ { *base = event_base_new(); - zlog(ZLOG_STUFF, ZLOG_NOTICE, libevent: using %s, event_base_get_method(*base)); + zlog(ZLOG_STUFF, ZLOG_DEBUG, libevent: using %s, event_base_get_method(*base)); if (0 fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_event_cleanup, *base)) { return -1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ Makefile.frag
tony2001 Fri, 14 May 2010 15:22:38 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299383 Log: fix external build Changed paths: U php/php-src/trunk/sapi/fpm/Makefile.frag Modified: php/php-src/trunk/sapi/fpm/Makefile.frag === --- php/php-src/trunk/sapi/fpm/Makefile.frag2010-05-14 15:11:56 UTC (rev 299382) +++ php/php-src/trunk/sapi/fpm/Makefile.frag2010-05-14 15:22:38 UTC (rev 299383) @@ -1,6 +1,9 @@ fpm: $(SAPI_FPM_PATH) -$(SAPI_FPM_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS) +fpm-subdir: + @mkdir -p $(builddir)/fpm + +$(SAPI_FPM_PATH): fpm-subdir $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS) $(BUILD_FPM) $(builddir)/fpm/fpm_conf.lo: $(builddir)/../../main/build-defs.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_conf.c
fat Sat, 08 May 2010 08:52:32 + Revision: http://svn.php.net/viewvc?view=revisionrevision=299141 Log: Fix #51736, wrong checks on dynamic parameters Bug: http://bugs.php.net/51736 (Assigned) configuration parsing problem Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-05-08 06:40:45 UTC (rev 299140) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-05-08 08:52:32 UTC (rev 299141) @@ -441,25 +441,26 @@ return -1; } - if (config-pm_max_spare_servers config-pm_max_children || + if (config-pm_min_spare_servers config-pm_max_children || config-pm_max_spare_servers config-pm_max_children) { zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] min_spare_servers(%d) and max_spare_servers(%d) cannot be greater than max_children(%d), - wp-config-name, config-pm_max_spare_servers, config-pm_max_spare_servers, config-pm_max_children); + wp-config-name, config-pm_min_spare_servers, config-pm_max_spare_servers, config-pm_max_children); return -1; } - if (config-pm_max_spare_servers config-pm_max_spare_servers) { - zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] max_spare_servers(%d) must not be less than min_spare_servers(%d), wp-config-name, config-pm_max_spare_servers, config-pm_max_spare_servers); + if (config-pm_max_spare_servers config-pm_min_spare_servers) { + zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] max_spare_servers(%d) must not be less than min_spare_servers(%d), wp-config-name, config-pm_max_spare_servers, config-pm_min_spare_servers); return -1; } if (config-pm_start_servers = 0) { config-pm_start_servers = config-pm_min_spare_servers + ((config-pm_max_spare_servers - config-pm_min_spare_servers) / 2); zlog(ZLOG_STUFF, ZLOG_WARNING, [pool %s] start_servers is not set. It's been set to %d., wp-config-name, config-pm_start_servers); - } else if (config-pm_start_servers config-pm_max_spare_servers || config-pm_start_servers config-pm_max_spare_servers) { - zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d), wp-config-name, config-pm_start_servers, config-pm_max_spare_servers, config-pm_max_spare_servers); + } else if (config-pm_start_servers config-pm_min_spare_servers || config-pm_start_servers config-pm_max_spare_servers) { + zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] start_servers(%d) must not be less than min_spare_servers(%d) and not greater than max_spare_servers(%d), wp-config-name, config-pm_start_servers, config-pm_min_spare_servers, config-pm_max_spare_servers); return -1; } + } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2handler/ sapi_apache2.c
rrichardsTue, 04 May 2010 12:12:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298966 Log: fix non-windows builds Changed paths: U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 11:59:54 UTC (rev 298965) +++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 12:12:28 UTC (rev 298966) @@ -53,8 +53,10 @@ #include php_apache.h -#if _MSC_VER = 1300 -# include win32/php_strtoi64.h +#ifdef PHP_WIN32 +# if _MSC_VER = 1300 +# include win32/php_strtoi64.h +# endif #endif /* UnixWare and Netware define shutdown to _shutdown, which causes problems later -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2handler/ sapi_apache2.c
pajoye Mon, 03 May 2010 14:30:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298906 Log: - WS Changed paths: U php/php-src/trunk/sapi/apache2handler/sapi_apache2.c Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-03 14:29:07 UTC (rev 298905) +++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-03 14:30:14 UTC (rev 298906) @@ -119,8 +119,8 @@ efree(ctx-content_type); } ctx-content_type = estrdup(val); - } else if (!strcasecmp(sapi_header-header, content-length)) { - ap_set_content_length(ctx-r, strtol(val, (char **)NULL, 10)); + } else if (!strcasecmp(sapi_header-header, content-length)) { + ap_set_content_length(ctx-r, strtol(val, (char **)NULL, 10)); } else if (op == SAPI_HEADER_REPLACE) { apr_table_set(ctx-r-headers_out, sapi_header-header, val); } else { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
tony2001 Fri, 30 Apr 2010 08:20:57 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298795 Log: merge the fix for #51688 Bug: http://bugs.php.net/51688 (Closed) php_cgi_ini_activate_user_config() crashes when given apache-rewritten URL Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-30 08:15:09 UTC (rev 298794) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-30 08:20:57 UTC (rev 298795) @@ -753,6 +753,9 @@ if (!IS_ABSOLUTE_PATH(path, path_len)) { real_path = tsrm_realpath(path, NULL TSRMLS_CC); + if (real_path == NULL) { + return; + } real_path_len = strlen(real_path); path = real_path; path_len = real_path_len; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ php-fpm.conf.in
fat Fri, 23 Apr 2010 08:06:49 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298368 Log: typo and errors in php-fpm.conf Changed paths: U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/php-fpm.conf.in === --- php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-04-23 06:56:15 UTC (rev 298367) +++ php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-04-23 08:06:49 UTC (rev 298368) @@ -71,6 +71,14 @@ ; default : -1 ; ;listen.backlog = -1 + +; List of ipv4 addresses of FastCGI clients that allowed to connect. +; Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) +; Makes sense only with a tcp listening socket. +; Each addresses must be separated by a comma +; default: any +; +;listen.allowed_client = 127.0.0.1 ; Set permissions for unix socket, if one used. ; In Linux read/write permissions must be set in order to allow connections from web server. @@ -134,7 +142,7 @@ ; Equivalent to PHP_FCGI_MAX_REQUESTS ; default : 0 ; -;max_requests = 500 +;pm.max_requests = 500 ; Sets the status URI to call to obtain php-fpm status page. ; If not set, no URI will be recognized as a status page. @@ -191,7 +199,7 @@ ; ; default: pong ; -;pong.response = pong +;ping.response = pong ; The timeout (in seconds) for serving a single request after which the worker process will be terminated ; Should be used when 'max_execution_time' ini option does not stop script execution for some reason @@ -245,14 +253,6 @@ ; ;catch_workers_output = yes -; List of ipv4 addresses of FastCGI clients that allowed to connect. -; Equivalent to FCGI_WEB_SERVER_ADDRS environment in original php.fcgi (5.2.2+) -; Makes sense only with a tcp listening socket. -; Each addresses must be separated by a comma -; default: any -; -;listen.allowed_client = 127.0.0.1 - ; Pass environment variables like LD_LIBRARY_PATH ; All $VARIABLEs are taken from current environment ; default: clean env -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ php-fpm.conf.in
fat Fri, 23 Apr 2010 13:56:14 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298375 Log: typo Changed paths: U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/php-fpm.conf.in === --- php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-04-23 13:54:40 UTC (rev 298374) +++ php/php-src/trunk/sapi/fpm/php-fpm.conf.in 2010-04-23 13:56:14 UTC (rev 298375) @@ -78,7 +78,7 @@ ; Each addresses must be separated by a comma ; default: any ; -;listen.allowed_client = 127.0.0.1 +;listen.allowed_clients = 127.0.0.1 ; Set permissions for unix socket, if one used. ; In Linux read/write permissions must be set in order to allow connections from web server. @@ -148,7 +148,7 @@ ; If not set, no URI will be recognized as a status page. ; By default, it returns text/plain looking like: ; accepted conn: 12073 -; pool: default +; pool: www ; process manager: static ; idle processes: 35 ; active processes: 65 @@ -212,6 +212,7 @@ ; The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file ; '0s' means 'off' ; available units are s(econd), m(inute), h(hour), or d(day) +; default: 0 ; ;request_slowlog_timeout = 0s @@ -276,8 +277,8 @@ ; ; default: nothing is defined but the ones in php.ini and at startup with the -d arguement ; -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -fpo...@my.domain.com +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f...@my.domain.com ;php_flag[display_errors] = off ;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_value[log_errors] = on +;php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 32M -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fastcgi.c fastcgi.h fpm_main.c fpm_status.c fpm_status.h fpm_stdio.c
fat Fri, 23 Apr 2010 15:09:28 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298380 Log: Remove unused functions / variables / #if 0 blocks Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fastcgi.c U php/php-src/trunk/sapi/fpm/fpm/fastcgi.h U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c U php/php-src/trunk/sapi/fpm/fpm/fpm_status.c U php/php-src/trunk/sapi/fpm/fpm/fpm_status.h U php/php-src/trunk/sapi/fpm/fpm/fpm_stdio.c Modified: php/php-src/trunk/sapi/fpm/fpm/fastcgi.c === --- php/php-src/trunk/sapi/fpm/fpm/fastcgi.c 2010-04-23 15:01:04 UTC (rev 298379) +++ php/php-src/trunk/sapi/fpm/fpm/fastcgi.c 2010-04-23 15:09:28 UTC (rev 298380) @@ -183,11 +183,6 @@ } #endif -int fcgi_in_shutdown(void) -{ - return in_shutdown; -} - int fcgi_init(void) { if (!is_initialized) { @@ -278,76 +273,6 @@ } } -#ifdef _WIN32 -/* Do some black magic with the NT security API. - * We prepare a DACL (Discretionary Access Control List) so that - * we, the creator, are allowed all access, while Everyone Else - * is only allowed to read and write to the pipe. - * This avoids security issues on shared hosts where a luser messes - * with the lower-level pipe settings and screws up the FastCGI service. - */ -static PACL prepare_named_pipe_acl(PSECURITY_DESCRIPTOR sd, LPSECURITY_ATTRIBUTES sa) -{ - DWORD req_acl_size; - char everyone_buf[32], owner_buf[32]; - PSID sid_everyone, sid_owner; - SID_IDENTIFIER_AUTHORITY - siaWorld = SECURITY_WORLD_SID_AUTHORITY, - siaCreator = SECURITY_CREATOR_SID_AUTHORITY; - PACL acl; - - sid_everyone = (PSID)everyone_buf; - sid_owner = (PSID)owner_buf; - - req_acl_size = sizeof(ACL) + - (2 * ((sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD)) + GetSidLengthRequired(1))); - - acl = malloc(req_acl_size); - - if (acl == NULL) { - return NULL; - } - - if (!InitializeSid(sid_everyone, siaWorld, 1)) { - goto out_fail; - } - *GetSidSubAuthority(sid_everyone, 0) = SECURITY_WORLD_RID; - - if (!InitializeSid(sid_owner, siaCreator, 1)) { - goto out_fail; - } - *GetSidSubAuthority(sid_owner, 0) = SECURITY_CREATOR_OWNER_RID; - - if (!InitializeAcl(acl, req_acl_size, ACL_REVISION)) { - goto out_fail; - } - - if (!AddAccessAllowedAce(acl, ACL_REVISION, FILE_GENERIC_READ | FILE_GENERIC_WRITE, sid_everyone)) { - goto out_fail; - } - - if (!AddAccessAllowedAce(acl, ACL_REVISION, FILE_ALL_ACCESS, sid_owner)) { - goto out_fail; - } - - if (!InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION)) { - goto out_fail; - } - - if (!SetSecurityDescriptorDacl(sd, TRUE, acl, FALSE)) { - goto out_fail; - } - - sa-lpSecurityDescriptor = sd; - - return acl; - -out_fail: - free(acl); - return NULL; -} -#endif - void fcgi_set_allowed_clients(char *ip) { char *cur, *end; @@ -383,154 +308,6 @@ } } -//TODO -static int is_port_number(const char *bindpath) -{ - while (*bindpath) { - if (*bindpath '0' || *bindpath '9') { - return 0; - } - bindpath++; - } - return 1; -} - -int fcgi_listen(const char *path, int backlog) -{ - char *s; - int tcp = 0; - char host[MAXPATHLEN]; - short port = 0; - int listen_socket; - sa_t sa; - socklen_t sock_len; -#ifdef SO_REUSEADDR -# ifdef _WIN32 - BOOL reuse = 1; -# else - int reuse = 1; -# endif -#endif - - if ((s = strchr(path, ':'))) { - port = atoi(s+1); - if (port != 0 (s-path) MAXPATHLEN) { - strncpy(host, path, s-path); - host[s-path] = '\0'; - tcp = 1; - } - } else if (is_port_number(path)) { - port = atoi(path); - if (port != 0) { - host[0] = '\0'; - tcp = 1; - } - } - - /* Prepare socket address */ - if (tcp) { - memset(sa.sa_inet, 0, sizeof(sa.sa_inet)); - sa.sa_inet.sin_family = AF_INET; - sa.sa_inet.sin_port = htons(port); - sock_len = sizeof(sa.sa_inet); - - if (!*host || !strncmp(host, *, sizeof(*)-1)) { - sa.sa_inet.sin_addr.s_addr = htonl(INADDR_ANY); - } else { - sa.sa_inet.sin_addr.s_addr = inet_addr(host); - if (sa.sa_inet.sin_addr.s_addr == INADDR_NONE) { -struct hostent *hep; - -hep = gethostbyname(host); -if (!hep || hep-h_addrtype != AF_INET || !hep-h_addr_list[0]) { - fprintf(stderr, Cannot resolve host name '%s'!\n, host); - return -1; -} else if (hep-h_addr_list[1]) { - fprintf(stderr, Host '%s' has multiple addresses. You must choose one explicitly!\n, host); - return -1; -} -sa.sa_inet.sin_addr.s_addr = ((struct in_addr*)hep-h_addr_list[0])-s_addr; - } - } - } else { -#ifdef _WIN32 - SECURITY_DESCRIPTOR sd; - SECURITY_ATTRIBUTES saw; - PACL acl; - HANDLE namedPipe; - - memset(sa, 0, sizeof(saw)); - saw.nLength = sizeof(saw); - saw.bInheritHandle = FALSE; - acl = prepare_named_pipe_acl(sd, saw); - - namedPipe = CreateNamedPipe(path, - PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, - PIPE_TYPE_BYTE | PIPE_WAIT | PIPE_READMODE_BYTE, - PIPE_UNLIMITED_INSTANCES, -
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
fat Fri, 23 Apr 2010 16:05:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298383 Log: Add PHP_VALUE and PHP_ADMIN_VALUE interpretation from fastcgi headers. It works as php_value and php_admin_value from the main conf file or apache sapi. See bug (request) #51595 Bug: http://bugs.php.net/51595 (Open) passing ini settings via FASTCGI parameters Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-23 15:52:45 UTC (rev 298382) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-23 16:05:52 UTC (rev 298383) @@ -27,6 +27,10 @@ #include php_globals.h #include php_variables.h #include zend_modules.h +#include php.h +#include zend_ini_scanner.h +#include zend_globals.h +#include zend_stream.h #include SAPI.h @@ -103,6 +107,8 @@ #include fpm/fpm.h #include fpm/fpm_request.h #include fpm/fpm_status.h +#include fpm/fpm_conf.h +#include fpm/fpm_php.h #ifndef PHP_WIN32 /* XXX this will need to change later when threaded fastcgi is implemented. shane */ @@ -123,6 +129,7 @@ static int request_body_fd; static char *sapi_cgibin_getenv(char *name, size_t name_len TSRMLS_DC); +static void fastcgi_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC); #define PHP_MODE_STANDARD 1 #define PHP_MODE_HIGHLIGHT 2 @@ -1070,6 +1077,7 @@ char *env_script_filename = sapi_cgibin_getenv(SCRIPT_FILENAME, sizeof(SCRIPT_FILENAME)-1 TSRMLS_CC); char *env_path_translated = sapi_cgibin_getenv(PATH_TRANSLATED, sizeof(PATH_TRANSLATED)-1 TSRMLS_CC); char *script_path_translated = env_script_filename; + char *ini; /* some broken servers do not have script_filename or argv0 * an example, IIS configured in some ways. then they do more @@ -1354,9 +1362,61 @@ auth = sapi_cgibin_getenv(HTTP_AUTHORIZATION, sizeof(HTTP_AUTHORIZATION)-1 TSRMLS_CC); php_handle_auth_data(auth TSRMLS_CC); } + + /* INI stuff */ + ini = sapi_cgibin_getenv(PHP_VALUE, sizeof(PHP_VALUE)-1 TSRMLS_CC); + if (ini) { + int mode = ZEND_INI_USER; + char *tmp; + spprintf(tmp, 0, %s\n, ini); + zend_parse_ini_string(tmp, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t)fastcgi_ini_parser, mode TSRMLS_CC); + efree(tmp); + } + + ini = sapi_cgibin_getenv(PHP_ADMIN_VALUE, sizeof(PHP_ADMIN_VALUE)-1 TSRMLS_CC); + if (ini) { + int mode = ZEND_INI_SYSTEM; + char *tmp; + spprintf(tmp, 0, %s\n, ini); + zend_parse_ini_string(tmp, 1, ZEND_INI_SCANNER_RAW, (zend_ini_parser_cb_t)fastcgi_ini_parser, mode TSRMLS_CC); + efree(tmp); + } } /* }}} */ +static void fastcgi_ini_parser(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC) /* {{{ */ +{ + int *mode = (int *)arg; + char *key = Z_STRVAL_P(arg1); + char *value = Z_STRVAL_P(arg2); + struct key_value_s kv; + + if (!mode) return; + + if (callback_type != ZEND_INI_PARSER_ENTRY) { + fprintf(stderr, Passing INI directive through FastCGI: only classic entries are allowed\n); + return; + } + + if (!key || strlen(key) 1) { + fprintf(stderr, Passing INI directive through FastCGI: empty key\n); + return; + } + + if (!value || strlen(value) 1) { + fprintf(stderr, Passing INI directive through FastCGI: empty value for key '%s'\n, key); + return; + } + + kv.key = key; + kv.value = value; + kv.next = NULL; + if (fpm_php_apply_defines_ex(kv, *mode) == -1) { + fprintf(stderr, Passing INI directive through FastCGI: unable to set '%s'\n, key); + } +} +/* }}} */ + PHP_INI_BEGIN() STD_PHP_INI_ENTRY(cgi.rfc2616_headers, 0, PHP_INI_ALL, OnUpdateBool, rfc2616_headers, php_cgi_globals_struct, php_cgi_globals) STD_PHP_INI_ENTRY(cgi.nph, 0, PHP_INI_ALL, OnUpdateBool, nph, php_cgi_globals_struct, php_cgi_globals) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_conf.c
fat Thu, 22 Apr 2010 07:14:06 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298298 Log: correct wrong comparison (thx to felipe) Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-22 06:15:46 UTC (rev 298297) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-22 07:14:06 UTC (rev 298298) @@ -418,7 +418,7 @@ return -1; } - if (wp-config-pm == NULL) { + if (wp-config-pm != PM_STYLE_STATIC wp-config-pm != PM_STYLE_DYNAMIC) { zlog(ZLOG_STUFF, ZLOG_ALERT, [pool %s] the process manager is missing (static or dynamic), wp-config-name); return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_conf.c fpm_php.c
felipe Wed, 21 Apr 2010 23:22:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298286 Log: - Fix ZTS build Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_php.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-21 23:19:39 UTC (rev 298285) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-21 23:22:20 UTC (rev 298286) @@ -43,7 +43,7 @@ #include fpm_status.h #include zlog.h -static int fpm_conf_load_ini_file(char *filename); +static int fpm_conf_load_ini_file(char *filename TSRMLS_DC); static char *fpm_conf_set_integer(zval *value, void **config, intptr_t offset); static char *fpm_conf_set_time(zval *value, void **config, intptr_t offset); static char *fpm_conf_set_boolean(zval *value, void **config, intptr_t offset); @@ -673,7 +673,7 @@ int len = strlen(g.gl_pathv[i]); if (len 1) continue; if (g.gl_pathv[i][len - 1] == '/') continue; /* don't parse directories */ - if (0 fpm_conf_load_ini_file(g.gl_pathv[i])) { + if (0 fpm_conf_load_ini_file(g.gl_pathv[i] TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, Unable to include %s from %s at line %d, g.gl_pathv[i], filename, ini_lineno); *error = 1; return; @@ -682,7 +682,7 @@ globfree(g); } #else /* HAVE_GLOB */ - if (0 fpm_conf_load_ini_file(inc)) { + if (0 fpm_conf_load_ini_file(inc TSRMLS_CC)) { zlog(ZLOG_STUFF, ZLOG_ERROR, Unable to include %s from %s at line %d, inc, filename, ini_lineno); *error = 1; return; @@ -848,13 +848,13 @@ switch(callback_type) { case ZEND_INI_PARSER_ENTRY: - fpm_conf_ini_parser_entry(arg1, arg2, error); + fpm_conf_ini_parser_entry(arg1, arg2, error TSRMLS_CC); break;; case ZEND_INI_PARSER_SECTION: - fpm_conf_ini_parser_section(arg1, error); + fpm_conf_ini_parser_section(arg1, error TSRMLS_CC); break;; case ZEND_INI_PARSER_POP_ENTRY: - fpm_conf_ini_parser_array(arg1, arg3, arg2, error); + fpm_conf_ini_parser_array(arg1, arg3, arg2, error TSRMLS_CC); break;; default: zlog(ZLOG_STUFF, ZLOG_ERROR, [%s:%d] Unknown INI syntax, ini_filename, ini_lineno); @@ -864,7 +864,7 @@ } /* }}} */ -int fpm_conf_load_ini_file(char *filename) /* {{{ */ +int fpm_conf_load_ini_file(char *filename TSRMLS_DC) /* {{{ */ { int error = 0; char buf[1024+1]; @@ -936,13 +936,14 @@ char *filename = fpm_globals.config; int free = 0; int ret; + TSRMLS_FETCH(); if (filename == NULL) { spprintf(filename, 0, %s/php-fpm.conf, PHP_SYSCONFDIR); free = 1; } - ret = fpm_conf_load_ini_file(filename); + ret = fpm_conf_load_ini_file(filename TSRMLS_CC); if (0 ret) { zlog(ZLOG_STUFF, ZLOG_ERROR, failed to load configuration file '%s', filename); Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_php.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_php.c2010-04-21 23:19:39 UTC (rev 298285) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_php.c2010-04-21 23:22:20 UTC (rev 298286) @@ -113,7 +113,6 @@ static int fpm_php_apply_defines(struct fpm_worker_pool_s *wp) /* {{{ */ { - TSRMLS_FETCH(); struct key_value_s *kv; for (kv = wp-config-php_values; kv; kv = kv-next) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ fpm/fpm_conf.c fpm/fpm_conf.h fpm/fpm_php.c fpm/fpm_php.h php-fpm.conf.in
fat Tue, 20 Apr 2010 21:13:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298236 Log: Change php_defines in configuration file to php_value,php_admin_value,php_flag,php_admin_flag (as in the apache sapi). php_admin* sets values as ZEND_INI_SYSTEM mode while php_* sets values as ZEND_INI_USER Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c U php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h U php/php-src/trunk/sapi/fpm/fpm/fpm_php.c U php/php-src/trunk/sapi/fpm/fpm/fpm_php.h U php/php-src/trunk/sapi/fpm/php-fpm.conf.in Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-20 20:02:32 UTC (rev 298235) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.c 2010-04-20 21:13:40 UTC (rev 298236) @@ -239,12 +239,27 @@ return xml_conf_set_slot_key_value_pair(): strdup() failed; } + kv-next = **parent; **parent = kv; - *parent = kv-next; return NULL; } /* }}} */ +static char *xml_conf_set_slot_key_value_pair_bool(void **conf, char *name, void *vv, intptr_t offset) /* {{{ */ +{ + int value; + void *subconf = value; + char *error; + + error = xml_conf_set_slot_boolean(subconf, name, vv, 0); + if (error) { + return error; + } + + return(xml_conf_set_slot_key_value_pair(conf, name, value ? On : Off, offset)); +} +/* }}} */ + static struct xml_conf_section fpm_conf_set_key_value_pairs_subsection_conf = { .path = key_value_pairs somewhere, /* fixme */ .parsers = (struct xml_value_parser []) { @@ -253,6 +268,14 @@ } }; +static struct xml_conf_section fpm_conf_set_key_value_pairs_subsection_conf_bool = { + .path = key_value_pairs somewhere, /* fixme */ + .parsers = (struct xml_value_parser []) { + { XML_CONF_SCALAR, 0, xml_conf_set_slot_key_value_pair_bool, 0 }, + { 0, 0, 0, 0 } + } +}; + static char *fpm_conf_set_key_value_pairs_subsection(void **conf, char *name, void *xml_node, intptr_t offset) /* {{{ */ { void *next_kv = (char *) *conf + offset; @@ -260,6 +283,13 @@ } /* }}} */ +static char *fpm_conf_set_key_value_pairs_subsection_bool(void **conf, char *name, void *xml_node, intptr_t offset) /* {{{ */ +{ + void *next_kv = (char *) *conf + offset; + return xml_conf_parse_section(next_kv, fpm_conf_set_key_value_pairs_subsection_conf_bool, xml_node); +} +/* }}} */ + static void *fpm_worker_pool_config_alloc() /* {{{ */ { static struct fpm_worker_pool_s *current_wp = 0; @@ -303,12 +333,18 @@ free(wpc-listen_options-mode); free(wpc-listen_options); } - for (kv = wpc-php_defines; kv; kv = kv_next) { + for (kv = wpc-php_values; kv; kv = kv_next) { kv_next = kv-next; free(kv-key); free(kv-value); free(kv); } + for (kv = wpc-php_admin_values; kv; kv = kv_next) { + kv_next = kv-next; + free(kv-key); + free(kv-value); + free(kv); + } for (kv = wpc-environment; kv; kv = kv_next) { kv_next = kv-next; free(kv-key); @@ -334,7 +370,10 @@ { XML_CONF_SCALAR, name, xml_conf_set_slot_string, offsetof(struct fpm_worker_pool_config_s, name) }, { XML_CONF_SCALAR, listen_address,xml_conf_set_slot_string, offsetof(struct fpm_worker_pool_config_s, listen_address) }, { XML_CONF_SUBSECTION, listen_options,fpm_conf_set_listen_options_subsection, offsetof(struct fpm_worker_pool_config_s, listen_options) }, - { XML_CONF_SUBSECTION, php_defines, fpm_conf_set_key_value_pairs_subsection, offsetof(struct fpm_worker_pool_config_s, php_defines) }, + { XML_CONF_SUBSECTION, php_value, fpm_conf_set_key_value_pairs_subsection, offsetof(struct fpm_worker_pool_config_s, php_values) }, + { XML_CONF_SUBSECTION, php_flag, fpm_conf_set_key_value_pairs_subsection_bool, offsetof(struct fpm_worker_pool_config_s, php_values) }, + { XML_CONF_SUBSECTION, php_admin_value, fpm_conf_set_key_value_pairs_subsection, offsetof(struct fpm_worker_pool_config_s, php_admin_values) }, + { XML_CONF_SUBSECTION, php_admin_flag, fpm_conf_set_key_value_pairs_subsection_bool, offsetof(struct fpm_worker_pool_config_s, php_admin_values) }, { XML_CONF_SCALAR, user, xml_conf_set_slot_string, offsetof(struct fpm_worker_pool_config_s, user) }, { XML_CONF_SCALAR, group, xml_conf_set_slot_string, offsetof(struct fpm_worker_pool_config_s, group) }, { XML_CONF_SCALAR, chroot, xml_conf_set_slot_string, offsetof(struct fpm_worker_pool_config_s, chroot) }, Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h === --- php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2010-04-20 20:02:32 UTC (rev 298235) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_conf.h 2010-04-20 21:13:40 UTC (rev 298236) @@ -50,7 +50,8 @@ char *name; char *listen_address; struct fpm_listen_options_s *listen_options; - struct key_value_s *php_defines; + struct key_value_s *php_values; + struct key_value_s
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
fat Tue, 20 Apr 2010 23:28:20 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298238 Log: Add a check request_method. If fcgi protocol is not followed, a segfault can occur. Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 22:47:06 UTC (rev 298237) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 23:28:20 UTC (rev 298238) @@ -1773,6 +1773,12 @@ return FAILURE; } + /* check request_method has been sent. +* if not, the certainly not an HTTP over fcgi request */ + if (!SG(request_info).request_method) { + goto fastcgi_request_done; + } + if (!strcasecmp(SG(request_info).request_method, GET) fpm_status_handle_status(SG(request_info).request_uri, SG(request_info).query_string, status_buffer, status_content_type)) { if (status_buffer) { if (status_content_type) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
fat Tue, 20 Apr 2010 23:31:13 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298239 Log: typo Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 23:28:20 UTC (rev 298238) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 23:31:13 UTC (rev 298239) @@ -1773,8 +1773,8 @@ return FAILURE; } - /* check request_method has been sent. -* if not, the certainly not an HTTP over fcgi request */ + /* check if request_method has been sent. +* if not, it's certainly not an HTTP over fcgi request */ if (!SG(request_info).request_method) { goto fastcgi_request_done; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/ config.m4 php-fpm.1.in
fat Mon, 19 Apr 2010 18:02:36 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298185 Log: correct path in the man page Changed paths: U php/php-src/trunk/sapi/fpm/config.m4 U php/php-src/trunk/sapi/fpm/php-fpm.1.in Modified: php/php-src/trunk/sapi/fpm/config.m4 === --- php/php-src/trunk/sapi/fpm/config.m42010-04-19 17:50:31 UTC (rev 298184) +++ php/php-src/trunk/sapi/fpm/config.m42010-04-19 18:02:36 UTC (rev 298185) @@ -547,6 +547,10 @@ PHP_SUBST_OLD(fpm_version) PHP_SUBST_OLD(php_fpm_user) PHP_SUBST_OLD(php_fpm_group) + php_fpm_sysconfdir=`eval echo $sysconfdir` + PHP_SUBST_OLD(php_fpm_sysconfdir) + php_fpm_localstatedir=`eval echo $localstatedir` + PHP_SUBST_OLD(php_fpm_localstatedir) AC_DEFINE_UNQUOTED(PHP_FPM_VERSION, $fpm_version, [fpm version]) AC_DEFINE_UNQUOTED(PHP_FPM_USER, $php_fpm_user, [fpm user name]) Modified: php/php-src/trunk/sapi/fpm/php-fpm.1.in === --- php/php-src/trunk/sapi/fpm/php-fpm.1.in 2010-04-19 17:50:31 UTC (rev 298184) +++ php/php-src/trunk/sapi/fpm/php-fpm.1.in 2010-04-19 18:02:36 UTC (rev 298185) @@ -1,16 +1,16 @@ .TH PHP-FPM 1 2009 The PHP Group Scripting Language .SH NAME .TP 15 -...@php_fpm_bin@ \- PHP FastCGI Process Manager 'PHP-FPM' +php-fpm \- PHP FastCGI Process Manager 'PHP-FPM' .SH SYNOPSIS -.B @php_fpm_bin@ +.B php-fpm [options] .LP .SH DESCRIPTION \fBPHP\fP is a widely\-used general\-purpose scripting language that is especially suited for -Web development and can be embedded into HTML. This is a variant of PHP that will run in the background as a daemon, listening for CGI requests. Output is logged to @php_fpm_log_p...@. +Web development and can be embedded into HTML. This is a variant of PHP that will run in the background as a daemon, listening for CGI requests. Output is logged to @php_fpm_localstatedir@/log/php-fpm.log. .LP -Most options are set in the configuration file. The configuration file is @php_fpm_conf_p...@. By default, @php_fpm_bin@ will respond to CGI requests listening on localhost http port 9000. Therefore @php_fpm_bin@ expects your webserver to forward all requests for '.php' files to port 9000 and you should edit your webserver configuration file appropriately. +Most options are set in the configuration file. The configuration file is @php_fpm_sysconfdir@/php-fpm.conf. By default, php-fpm will respond to CGI requests listening on localhost http port 9000. Therefore php-fpm expects your webserver to forward all requests for '.php' files to port 9000 and you should edit your webserver configuration file appropriately. .SH OPTIONS .TP 15 .B \-C @@ -83,7 +83,7 @@ .TP .PD 1 .B \-\-y -Specify alternative path to FastCGI process manager configuration file (the default is @php_fpm_conf_path@) +Specify alternative path to FastCGI process manager configuration file (the default is @php_fpm_sysconfdir@/php-fpm.conf) .TP .PD 0 .B \-\-zend\-extension \fIfile\fP @@ -94,20 +94,20 @@ .IR file .SH FILES .TP 15 -.B @php_fpm_...@.conf -The configuration file for the @php_fpm_bin@ daemon. +.B php-fpm.conf +The configuration file for the php-fpm daemon. .TP .B php.ini The standard php configuration file. .SH EXAMPLES -You should use the init script provided to start and stop the @php_fpm_bin@ daemon. This situation applies for any unix systems which use init.d for their main process manager. +You should use the init script provided to start and stop the php-fpm daemon. This situation applies for any unix systems which use init.d for their main process manager. .P .PD 1 .RS -sudo /etc/init.d/@php_fpm_bin@ start +sudo /etc/init.d/php-fpm start .RE .TP -If your installation has no appropriate init script, launch @php_fpm_bin_path@ with no arguments. It will launch as a daemon (background process) by default. The file @php_fpm_pid_path@ determines whether @php_fpm_bin@ is already up and running. Once started, @php_fpm_bin@ then responds to several POSIX signals: +If your installation has no appropriate init script, launch php-fpm with no arguments. It will launch as a daemon (background process) by default. The file @php_fpm_localstatedir@/run/php-fpm.pid determines whether php-fpm is already up and running. Once started, php-fpm then responds to several POSIX signals: .P .PD 0 .RS -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ xml_config.c
fat Mon, 19 Apr 2010 20:45:03 + Revision: http://svn.php.net/viewvc?view=revisionrevision=298188 Log: true/false was not a valid value for boolean directives Changed paths: U php/php-src/trunk/sapi/fpm/fpm/xml_config.c Modified: php/php-src/trunk/sapi/fpm/fpm/xml_config.c === --- php/php-src/trunk/sapi/fpm/fpm/xml_config.c 2010-04-19 19:45:03 UTC (rev 298187) +++ php/php-src/trunk/sapi/fpm/fpm/xml_config.c 2010-04-19 20:45:03 UTC (rev 298188) @@ -24,8 +24,8 @@ char *xml_conf_set_slot_boolean(void **conf, char *name, void *vv, intptr_t offset) /* {{{ */ { char *value = vv; - long value_y = !strcasecmp(value, yes) || !strcmp(value, 1) || !strcasecmp(value, on); - long value_n = !strcasecmp(value, no) || !strcmp(value, 0) || !strcasecmp(value, off); + long value_y = !strcasecmp(value, yes) || !strcmp(value, 1) || !strcasecmp(value, on) || !strcasecmp(value, true); + long value_n = !strcasecmp(value, no) || !strcmp(value, 0) || !strcasecmp(value, off) || !strcasecmp(value, false); if (!value_y !value_n) { return xml_conf_set_slot(): invalid boolean value; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/
tony2001 Tue, 13 Apr 2010 12:13:24 + Revision: http://svn.php.net/viewvc?view=revisionrevision=297958 Log: prepare to re-add newer FPM version Changed paths: D php/php-src/trunk/sapi/fpm/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/
tony2001 Tue, 13 Apr 2010 12:13:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=297959 Log: re-add updated FPM Changed paths: A + php/php-src/trunk/sapi/fpm/ (from php/php-src/branches/PHP_5_3_FPM/sapi/fpm/:r297957) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
tony2001 Tue, 13 Apr 2010 12:16:26 + Revision: http://svn.php.net/viewvc?view=revisionrevision=297960 Log: use new type + const static Changed paths: U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c === --- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-13 12:13:46 UTC (rev 297959) +++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-13 12:16:26 UTC (rev 297960) @@ -1477,7 +1477,7 @@ } /* }}} */ -function_entry cgi_fcgi_sapi_functions[] = { +static const zend_function_entry cgi_fcgi_sapi_functions[] = { PHP_FE(fastcgi_finish_request, NULL) {NULL, NULL, NULL} }; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/
tony2001 Mon, 12 Apr 2010 11:22:24 + Revision: http://svn.php.net/viewvc?view=revisionrevision=297879 Log: add FPM sapi to trunk Changed paths: A + php/php-src/trunk/sapi/fpm/ (from php/php-src/branches/PHP_5_3_FPM/sapi/fpm/:r291592) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/apache/ php_apache.c
jani Tue, 08 Dec 2009 16:13:01 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291879 Log: MFB: sprintf - snprintf (Thanks Marcus for not merging to HEAD..) Changed paths: U php/php-src/trunk/sapi/apache/php_apache.c Modified: php/php-src/trunk/sapi/apache/php_apache.c === --- php/php-src/trunk/sapi/apache/php_apache.c 2009-12-08 15:27:37 UTC (rev 291878) +++ php/php-src/trunk/sapi/apache/php_apache.c 2009-12-08 16:13:01 UTC (rev 291879) @@ -244,20 +244,20 @@ } #ifdef APACHE_RELEASE - sprintf(output_buf, %d, APACHE_RELEASE); + snprintf(output_buf, sizeof(output_buf), %d, APACHE_RELEASE); php_info_print_table_row(2, Apache Release, output_buf); #endif - sprintf(output_buf, %d, MODULE_MAGIC_NUMBER); + snprintf(output_buf, sizeof(output_buf), %d, MODULE_MAGIC_NUMBER); php_info_print_table_row(2, Apache API Version, output_buf); - sprintf(output_buf, %s:%u, serv-server_hostname, serv-port); + snprintf(output_buf, sizeof(output_buf), %s:%u, serv-server_hostname, serv-port); php_info_print_table_row(2, Hostname:Port, output_buf); #if !defined(WIN32) !defined(WINNT) - sprintf(output_buf, %s(%d)/%d, user_name, (int)user_id, (int)group_id); + snprintf(output_buf, sizeof(output_buf), %s(%d)/%d, user_name, (int)user_id, (int)group_id); php_info_print_table_row(2, User/Group, output_buf); - sprintf(output_buf, Per Child: %d - Keep Alive: %s - Max Per Connection: %d, max_requests_per_child, serv-keep_alive ? on:off, serv-keep_alive_max); + snprintf(output_buf, sizeof(output_buf), Per Child: %d - Keep Alive: %s - Max Per Connection: %d, max_requests_per_child, serv-keep_alive ? on:off, serv-keep_alive_max); php_info_print_table_row(2, Max Requests, output_buf); #endif - sprintf(output_buf, Connection: %d - Keep-Alive: %d, serv-timeout, serv-keep_alive_timeout); + snprintf(output_buf, sizeof(output_buf), Connection: %d - Keep-Alive: %d, serv-timeout, serv-keep_alive_timeout); php_info_print_table_row(2, Timeouts, output_buf); #if !defined(WIN32) !defined(WINNT) /* -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/apache/ libpre.c mod_php.c php_apache.c sapi_apache.c
jani Tue, 08 Dec 2009 16:13:46 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291880 Log: - ws + cs Changed paths: U php/php-src/trunk/sapi/apache/libpre.c U php/php-src/trunk/sapi/apache/mod_php.c U php/php-src/trunk/sapi/apache/php_apache.c U php/php-src/trunk/sapi/apache/sapi_apache.c Modified: php/php-src/trunk/sapi/apache/libpre.c === --- php/php-src/trunk/sapi/apache/libpre.c 2009-12-08 16:13:01 UTC (rev 291879) +++ php/php-src/trunk/sapi/apache/libpre.c 2009-12-08 16:13:46 UTC (rev 291880) @@ -33,7 +33,7 @@ #ifdef __GNUC__ -#include string.h/* memset */ +#include string.h /* memset */ extern char _edata, _end ; /* end of DATA (start of BSS), end of BSS */ #endif @@ -41,15 +41,15 @@ { /* printf(Inside _lib_start\n);*/ #ifdef __GNUC__ -memset (_edata, 0, _end - _edata); + memset (_edata, 0, _end - _edata); #endif -return 0; + return 0; } int _lib_stop() { /* printf(Inside _lib_stop\n);*/ -return 0; + return 0; } #endif /* NETWARE */ Modified: php/php-src/trunk/sapi/apache/mod_php.c === --- php/php-src/trunk/sapi/apache/mod_php.c 2009-12-08 16:13:01 UTC (rev 291879) +++ php/php-src/trunk/sapi/apache/mod_php.c 2009-12-08 16:13:46 UTC (rev 291880) @@ -76,7 +76,7 @@ uint key_length; uint value_length; int type; -char htaccess; + char htaccess; } php_per_dir_entry; /* some systems are missing these from their header files */ @@ -95,7 +95,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC) { int ret=0; - + if (SG(server_context)) { ret = rwrite(str, str_length, (request_rec *) SG(server_context)); } @@ -137,7 +137,7 @@ if (!SG(read_post_bytes) !ap_should_client_block(r)) { return total_read_bytes; } - + handler = signal(SIGPIPE, SIG_IGN); while (total_read_bytescount_bytes) { hard_timeout(Read POST information, r); /* start timeout timer */ @@ -148,7 +148,7 @@ } total_read_bytes += read_bytes; } - signal(SIGPIPE, handler); + signal(SIGPIPE, handler); return total_read_bytes; } /* }}} */ @@ -334,10 +334,10 @@ AP(in_request) = 0; php_request_shutdown(dummy); } - SG(server_context) = NULL; - /* - * The server context (request) is NOT invalid by the time - * run_cleanups() is called + SG(server_context) = NULL; + /* + * The server context (request) is NOT invalid by the time + * run_cleanups() is called */ } /* }}} */ @@ -346,7 +346,7 @@ */ static int php_apache_sapi_activate(TSRMLS_D) { - request_rec *r = (request_rec *) SG(server_context); + request_rec *r = (request_rec *) SG(server_context); /* * For the Apache module version, this bit of code registers a cleanup @@ -354,7 +354,7 @@ * We need this because at any point in our code we can be interrupted * and that may happen before we have had time to free our memory. * The php_request_shutdown function needs to free all outstanding allocated - * memory. + * memory. */ block_alarms(); register_cleanup(r-pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec); @@ -398,7 +398,7 @@ int fd; fd = r-connection-client-fd; - + if (fd = 0) { if (nfd) *nfd = fd; return SUCCESS; @@ -413,9 +413,9 @@ static int sapi_apache_force_http_10(TSRMLS_D) { request_rec *r = SG(server_context); - + r-proto_num = HTTP_VERSION(1,0); - + return SUCCESS; } /* }}} */ @@ -461,7 +461,7 @@ static sapi_module_struct apache_sapi_module = { apache, /* name */ Apache, /* pretty name */ - + php_apache_startup,/* startup */ php_module_shutdown_wrapper, /* shutdown */ @@ -576,11 +576,11 @@ */ static char *php_apache_get_default_mimetype(request_rec *r TSRMLS_DC) { - char *mimetype; + char *tmpmimetype; + /* Assume output will be of the default MIME type. Individual scripts may change this later. */ - char *tmpmimetype; tmpmimetype = sapi_get_default_content_type(TSRMLS_C); mimetype = pstrdup(r-pool, tmpmimetype); efree(tmpmimetype); @@ -621,7 +621,7 @@ if (per_dir_conf) { zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); } - + /* If PHP parser engine has been turned off with an engine off * directive, then decline to handle this request */ @@ -689,10 +689,9 @@ { int result = send_php(r, 0, NULL); TSRMLS_FETCH(); - - ap_table_setn(r-notes, mod_php_memory_usage, - ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC))); + ap_table_setn(r-notes, mod_php_memory_usage, ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC))); + return result; } /* }}} */ @@ -853,7 +852,7 @@ bool_val[0] = '0'; } bool_val[1] = 0; - + return php_apache_value_handler_ex(cmd, conf, arg1, bool_val, mode); } /* }}} */ @@ -919,7 +918,7 @@ #if MODULE_MAGIC_NUMBER = 19970728
[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2filter/ php_apache.h sapi_apache2.c
jani Tue, 08 Dec 2009 17:29:11 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291886 Log: MFB: r215701, Reimplementation of the way Apache 2 Filter works. Changed paths: U php/php-src/trunk/sapi/apache2filter/php_apache.h U php/php-src/trunk/sapi/apache2filter/sapi_apache2.c Modified: php/php-src/trunk/sapi/apache2filter/php_apache.h === --- php/php-src/trunk/sapi/apache2filter/php_apache.h 2009-12-08 17:06:07 UTC (rev 291885) +++ php/php-src/trunk/sapi/apache2filter/php_apache.h 2009-12-08 17:29:11 UTC (rev 291886) @@ -48,12 +48,19 @@ int request_processed; } php_struct; +typedef struct _php_apr_bucket_brigade { + apr_bucket_brigade *bb; +} php_apr_bucket_brigade; + void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf); void *create_php_config(apr_pool_t *p, char *dummy); char *get_php_config(void *conf, char *name, size_t name_len); void apply_config(void *); extern const command_rec php_dir_cmds[]; +static size_t php_apache_read_stream(void *, char *, size_t TSRMLS_DC); +static size_t php_apache_fsizer_stream(void * TSRMLS_DC); + #define APR_ARRAY_FOREACH_OPEN(arr, key, val) \ { \ apr_table_entry_t *elts; \ Modified: php/php-src/trunk/sapi/apache2filter/sapi_apache2.c === --- php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2009-12-08 17:06:07 UTC (rev 291885) +++ php/php-src/trunk/sapi/apache2filter/sapi_apache2.c 2009-12-08 17:29:11 UTC (rev 291886) @@ -39,6 +39,7 @@ #include apr_strings.h #include ap_config.h +#include apr_buckets.h #include util_filter.h #include httpd.h #include http_config.h @@ -48,7 +49,7 @@ #include http_log.h #include http_main.h #include util_script.h -#include http_core.h +#include http_core.h #include ap_mpm.h #include php_apache.h @@ -75,26 +76,17 @@ f = ctx-f; if (str_length == 0) return 0; - + ba = f-c-bucket_alloc; bb = apr_brigade_create(ctx-r-pool, ba); b = apr_bucket_transient_create(str, str_length, ba); APR_BRIGADE_INSERT_TAIL(bb, b); -#if 0 - /* Add a Flush bucket to the end of this brigade, so that - * the transient buckets above are more likely to make it out - * the end of the filter instead of having to be copied into - * someone's setaside. */ - b = apr_bucket_flush_create(ba); - APR_BRIGADE_INSERT_TAIL(bb, b); -#endif - if (ap_pass_brigade(f-next, bb) != APR_SUCCESS || ctx-r-connection-aborted) { php_handle_aborted_connection(); } - + return str_length; /* we always consume all the data passed to us. */ } @@ -128,7 +120,7 @@ ptr = val; *val = '\0'; - + do { val++; } while (*val == ' '); @@ -139,7 +131,7 @@ apr_table_set(ctx-r-headers_out, sapi_header-header, val); else apr_table_add(ctx-r-headers_out, sapi_header-header, val); - + *ptr = ':'; return SAPI_HEADER_ADD; @@ -167,7 +159,7 @@ to_read = ctx-post_len - ctx-post_idx; n = MIN(to_read, count_bytes); - + if (n 0) { memcpy(buf, ctx-post_data + ctx-post_idx, n); ctx-post_idx += n; @@ -221,7 +213,7 @@ { php_struct *ctx = SG(server_context); const char *env_var; - + env_var = apr_table_get(ctx-r-subprocess_env, name); return (char *) env_var; @@ -235,7 +227,7 @@ char *key, *val; int new_val_len; UConverter *conv = ZEND_U_CONVERTER(UG(runtime_encoding_conv)); - + APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { val = ; @@ -245,7 +237,7 @@ php_error(E_WARNING, Failed to decode _SERVER array entry); } APR_ARRAY_FOREACH_CLOSE() - + if (php_register_variable_with_conv(conv, ZEND_STRL(PHP_SELF), ctx-r-uri, strlen(ctx-r-uri), track_vars_array, PARSE_SERVER TSRMLS_CC) == FAILURE) { php_error(E_WARNING, Failed to decode _SERVER array entry); @@ -280,7 +272,7 @@ * handler seems to act on the first flush bucket, but ignores * all further flush buckets. */ - + ba = ctx-r-connection-bucket_alloc; bb = apr_brigade_create(ctx-r-pool, ba); b = apr_bucket_flush_create(ba); @@ -296,7 +288,7 @@ TSRMLS_FETCH(); ctx = SG(server_context); - + if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */ ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, %s, msg); } @@ -308,12 +300,12 @@ static int php_apache_disable_caching(ap_filter_t *f) { - /* Identify PHP scripts as non-cacheable, thus preventing + /* Identify PHP scripts as non-cacheable, thus preventing * Apache from sending a 304 status when the browser sends * If-Modified-Since header. */ f-r-no_local_copy = 1; - + return OK; } @@ -360,12 +352,12 @@ php_apache_sapi_register_variables, php_apache_sapi_log_message, /* Log message */ php_apache_sapi_get_request_time, /* Get Request Time */ - NULL, /* Child terminate */ + NULL, /* Child terminate */ STANDARD_SAPI_MODULE_PROPERTIES }; -static
[PHP-CVS] svn: /php/php-src/trunk/sapi/ apache2handler/php_functions.c cli/php.1.in cli/php_cli_readline.c isapi/php5isapi.c litespeed/lsapilib.c
jani Tue, 08 Dec 2009 17:46:19 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291888 Log: MFB: sprintf - snprintf + all other patches people did not bother to merge Changed paths: U php/php-src/trunk/sapi/apache2handler/php_functions.c U php/php-src/trunk/sapi/cli/php.1.in U php/php-src/trunk/sapi/cli/php_cli_readline.c U php/php-src/trunk/sapi/isapi/php5isapi.c U php/php-src/trunk/sapi/litespeed/lsapilib.c Modified: php/php-src/trunk/sapi/apache2handler/php_functions.c === --- php/php-src/trunk/sapi/apache2handler/php_functions.c 2009-12-08 17:30:22 UTC (rev 291887) +++ php/php-src/trunk/sapi/apache2handler/php_functions.c 2009-12-08 17:46:19 UTC (rev 291888) @@ -396,27 +396,27 @@ if (apv *apv) { php_info_print_table_row(2, Apache Version, apv); } - sprintf(tmp, %d, MODULE_MAGIC_NUMBER); + snprintf(tmp, sizeof(tmp), %d, MODULE_MAGIC_NUMBER); php_info_print_table_row(2, Apache API Version, tmp); if (serv-server_admin *(serv-server_admin)) { php_info_print_table_row(2, Server Administrator, serv-server_admin); } - sprintf(tmp, %s:%u, serv-server_hostname, serv-port); + snprintf(tmp, sizeof(tmp), %s:%u, serv-server_hostname, serv-port); php_info_print_table_row(2, Hostname:Port, tmp); #if !defined(WIN32) !defined(WINNT) #if MODULE_MAGIC_NUMBER_MAJOR = 20081201 - sprintf(tmp, %s(%d)/%d, ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id); + snprintf(tmp, sizeof(tmp), %s(%d)/%d, ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id); #else - sprintf(tmp, %s(%d)/%d, unixd_config.user_name, unixd_config.user_id, unixd_config.group_id); + snprintf(tmp, sizeof(tmp), %s(%d)/%d, unixd_config.user_name, unixd_config.user_id, unixd_config.group_id); #endif php_info_print_table_row(2, User/Group, tmp); #endif ap_mpm_query(AP_MPMQ_MAX_REQUESTS_DAEMON, max_requests); - sprintf(tmp, Per Child: %d - Keep Alive: %s - Max Per Connection: %d, max_requests, (serv-keep_alive ? on:off), serv-keep_alive_max); + snprintf(tmp, sizeof(tmp), Per Child: %d - Keep Alive: %s - Max Per Connection: %d, max_requests, (serv-keep_alive ? on:off), serv-keep_alive_max); php_info_print_table_row(2, Max Requests, tmp); apr_snprintf(tmp, sizeof tmp, Modified: php/php-src/trunk/sapi/cli/php.1.in === --- php/php-src/trunk/sapi/cli/php.1.in 2009-12-08 17:30:22 UTC (rev 291887) +++ php/php-src/trunk/sapi/cli/php.1.in 2009-12-08 17:46:19 UTC (rev 291888) @@ -375,11 +375,6 @@ .B http://www.php.net/manual/ .PD 1 .P -A nice introduction to PHP by Stig Bakken can be found here: -.PD 0 -.P -.B http://www.zend.com/zend/art/intro.php -.PD 1 .SH BUGS You can view the list of known bugs or report any new bug you found at: Modified: php/php-src/trunk/sapi/cli/php_cli_readline.c === --- php/php-src/trunk/sapi/cli/php_cli_readline.c 2009-12-08 17:30:22 UTC (rev 291887) +++ php/php-src/trunk/sapi/cli/php_cli_readline.c 2009-12-08 17:46:19 UTC (rev 291888) @@ -59,8 +59,6 @@ #include zend_highlight.h #include zend_indent.h -/* {{{ cli_is_valid_code - */ typedef enum { body, sstring, @@ -74,7 +72,7 @@ outside, } php_code_type; -int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) +int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */ { int valid_end = 1, last_valid_end; int brackets_count = 0; @@ -458,9 +456,10 @@ efree(class_name); } if (pce retval) { - char *tmp = malloc(class_name_len + 2 + strlen(retval) + 1); + int len = class_name_len + 2 + strlen(retval) + 1; + char *tmp = malloc(len); - sprintf(tmp, %s::%s, (*pce)-name.s, retval); + snprintf(tmp, len, %s::%s, (*pce)-name.s, retval); free(retval); retval = tmp; } @@ -469,9 +468,7 @@ return retval; } /* }}} */ -/* {{{ cli_code_completion - */ -char **cli_code_completion(const char *text, int start, int end) +char **cli_code_completion(const char *text, int start, int end) /* {{{ */ { return rl_completion_matches(text, cli_completion_generator); } Modified: php/php-src/trunk/sapi/isapi/php5isapi.c === --- php/php-src/trunk/sapi/isapi/php5isapi.c2009-12-08 17:30:22 UTC (rev 291887) +++ php/php-src/trunk/sapi/isapi/php5isapi.c2009-12-08 17:46:19 UTC (rev
[PHP-CVS] svn: /php/php-src/trunk/sapi/cli/ php.1.in
joey Wed, 02 Dec 2009 02:01:18 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291577 Log: Merge some spelling corrections found in the Debian patch base. Changed paths: U php/php-src/trunk/sapi/cli/php.1.in Modified: php/php-src/trunk/sapi/cli/php.1.in === --- php/php-src/trunk/sapi/cli/php.1.in 2009-12-02 00:54:58 UTC (rev 291576) +++ php/php-src/trunk/sapi/cli/php.1.in 2009-12-02 02:01:18 UTC (rev 291577) @@ -69,7 +69,7 @@ You can access the input line by \fB$argn\fP. While processing the input lines .B $argi contains the number of the actual line being processed. Further more -the paramters \-B and \-E can be used to execute +the parameters \-B and \-E can be used to execute .IR code (see \-r) before and after all input lines have been processed respectively. Notice that the @@ -318,7 +318,7 @@ cannot be found. .SH EXAMPLES .TP 5 -\fIphp -r 'echo Hello World\\n;'\fP +\fIphp \-r 'echo Hello World\\n;'\fP This command simply writes the text Hello World to standard out. .TP \fIphp \-r 'print_r(gd_info());'\fP @@ -342,7 +342,7 @@ Using this PHP command you can count the lines being input. .TP \fIphp \-R '@$l+=count(file($argn));' \-E 'echo Lines:$l\\n;'\fP -In this example PHP expects each input line beeing a file. It counts all lines +In this example PHP expects each input line being a file. It counts all lines of the files specified by each input line and shows the summarized result. You may combine this with tools like find and change the php scriptlet. .TP -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
thetaphi Thu, 19 Nov 2009 22:13:15 + Revision: http://svn.php.net/viewvc?view=revisionrevision=291041 Log: Fix compile error because of wrong merging from 5.3 branch. TODO: Convert $SERVER[] variables to unicode also for NSAPI (see apache2_handler) Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-11-19 21:52:48 UTC (rev 291040) +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-11-19 22:13:15 UTC (rev 291041) @@ -729,7 +729,7 @@ /* DOCUMENT_ROOT */ if (value = request_translate_uri(/, rc-sn)) { pos = strlen(value); - php_register_variable_safe(DOCUMENT_ROOT, value, pos-1, track_vars_array TSRMLS_CC); + php_register_variable_safe(IS_STRING, ZSTR(DOCUMENT_ROOT), ZSTR(value), pos-1, track_vars_array TSRMLS_CC); nsapi_free(value); } @@ -753,7 +753,7 @@ efree(value); } } else { - php_register_variable_safe(REQUEST_URI, SG(request_info).request_uri, pos, track_vars_array TSRMLS_CC); + php_register_variable_safe(IS_STRING, ZSTR(REQUEST_URI), ZSTR(SG(request_info).request_uri), pos, track_vars_array TSRMLS_CC); } if (rc-path_info) { @@ -762,7 +762,7 @@ pos = 0; } } - php_register_variable_safe(SCRIPT_NAME, SG(request_info).request_uri, pos, track_vars_array TSRMLS_CC); + php_register_variable_safe(IS_STRING, ZSTR(SCRIPT_NAME), ZSTR(SG(request_info).request_uri), pos, track_vars_array TSRMLS_CC); } php_register_variable(SCRIPT_FILENAME, SG(request_info).path_translated, track_vars_array TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ cgi_main.c
felipe Sat, 05 Sep 2009 18:21:10 + Revision: http://svn.php.net/viewvc?view=revisionrevision=288086 Log: - Drop unused var Changed paths: U php/php-src/trunk/sapi/cgi/cgi_main.c Modified: php/php-src/trunk/sapi/cgi/cgi_main.c === --- php/php-src/trunk/sapi/cgi/cgi_main.c 2009-09-05 18:10:31 UTC (rev 288085) +++ php/php-src/trunk/sapi/cgi/cgi_main.c 2009-09-05 18:21:10 UTC (rev 288086) @@ -1451,7 +1451,6 @@ int exit_status = SUCCESS; int cgi = 0, c, i, len; zend_file_handle file_handle; - int retval = FAILURE; char *s; /* temporary locals */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/cgi/ fastcgi.c
pajoye Wed, 26 Aug 2009 19:19:05 + Revision: http://svn.php.net/viewvc?view=revisionrevision=287778 Log: - fix build Changed paths: U php/php-src/trunk/sapi/cgi/fastcgi.c Modified: php/php-src/trunk/sapi/cgi/fastcgi.c === --- php/php-src/trunk/sapi/cgi/fastcgi.c2009-08-26 19:17:32 UTC (rev 28) +++ php/php-src/trunk/sapi/cgi/fastcgi.c2009-08-26 19:19:05 UTC (rev 287778) @@ -403,8 +403,8 @@ HANDLE namedPipe; memset(sa, 0, sizeof(saw)); - sa.nLength = sizeof(saw); - sa.bInheritHandle = FALSE; + saw.nLength = sizeof(saw); + saw.bInheritHandle = FALSE; acl = prepare_named_pipe_acl(sd, saw); namedPipe = CreateNamedPipe(path, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
Hi, On Mon, 2009-08-03 at 13:18 +0200, Uwe Schindler wrote: I got it, it works with TortoiseSVN, too. You can specify in the GUI to checkout only the immediates and so on. When you want to checkout one branch Can you add the relevant information to the wiki so others can find it? Do we meanwhile hae a phpweb site for svn - maybe suh things should be mentioned there so they are available at a proper location for newomers in future. Maybe somebody could also update README.SVN-RULES to mention sparse-checkouts and the single-commit-to-all-banches thing. Thanks, johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
thetaphi Mon, 03 Aug 2009 10:12:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286721 Log: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 on HPUX, #define HPUX Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 286720) +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 286721) @@ -57,6 +57,13 @@ #endif /* + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to detect HPUX + */ +#ifdef __hpux +#define HPUX +#endif + +/* * NSAPI includes */ #include nsapi.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
Please use the single-commit way instead of doing multiple commits. Especially when you fix bugs..now there are 3 commit entries in that report. :D See also: http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions --Jani On 08/03/2009 01:12 PM, Uwe Schindler wrote: thetaphi Mon, 03 Aug 2009 10:12:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286721 Log: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 on HPUX, #define HPUX Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 286720) +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 286721) @@ -57,6 +57,13 @@ #endif /* + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to detect HPUX + */ +#ifdef __hpux +#define HPUX +#endif + +/* * NSAPI includes */ #include nsapi.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
Thanks Jani, I thought it is still optional to do this. The question is, how to do that on Windows with TortoiseSVN using the GUI? We had a similar discussion on the Lucene-Java Mailinglist about updating the backwards-compatibility tests branch with one commit together with trunk. - Uwe Schindler theta...@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany -Original Message- From: Jani Taskinen [mailto:j...@php.net] Sent: Monday, August 03, 2009 12:26 PM To: Uwe Schindler Cc: php-cvs@lists.php.net; gwy...@php.net Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c Please use the single-commit way instead of doing multiple commits. Especially when you fix bugs..now there are 3 commit entries in that report. :D See also: http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions --Jani On 08/03/2009 01:12 PM, Uwe Schindler wrote: thetaphi Mon, 03 Aug 2009 10:12:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286721 Log: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 on HPUX, #define HPUX Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 286720) +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 286721) @@ -57,6 +57,13 @@ #endif /* + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to detect HPUX + */ +#ifdef __hpux +#define HPUX +#endif + +/* * NSAPI includes */ #include nsapi.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
On 08/03/2009 01:36 PM, Uwe Schindler wrote: Thanks Jani, I thought it is still optional to do this. Semi-optional. Since we use svn, why not fully make use of the features it provides? The question is, how to do that on Windows with TortoiseSVN using the GUI? No idea..is it not possible? Use some other svn client? Or commit from command line, it's not that hard..? (no idea if that's possible in windows..I don't do clickety-click stuff) --Jani We had a similar discussion on the Lucene-Java Mailinglist about updating the backwards-compatibility tests branch with one commit together with trunk. - Uwe Schindler theta...@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany -Original Message- From: Jani Taskinen [mailto:j...@php.net] Sent: Monday, August 03, 2009 12:26 PM To: Uwe Schindler Cc: php-cvs@lists.php.net; gwy...@php.net Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c Please use the single-commit way instead of doing multiple commits. Especially when you fix bugs..now there are 3 commit entries in that report. :D See also: http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions --Jani On 08/03/2009 01:12 PM, Uwe Schindler wrote: thetaphi Mon, 03 Aug 2009 10:12:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286721 Log: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 on HPUX, #define HPUX Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 09:48:53 UTC (rev 286720) +++ php/php-src/trunk/sapi/nsapi/nsapi.c2009-08-03 10:12:30 UTC (rev 286721) @@ -57,6 +57,13 @@ #endif /* + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to detect HPUX + */ +#ifdef __hpux +#define HPUX +#endif + +/* * NSAPI includes */ #include nsapi.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
Hi Uwe 2009/8/3 Uwe Schindler theta...@php.net: Thanks Jani, I thought it is still optional to do this. The question is, how to do that on Windows with TortoiseSVN using the GUI? We had a similar discussion on the Lucene-Java Mailinglist about updating the backwards-compatibility tests branch with one commit together with trunk. The way I did it was to download a separate client for command line, doing my sparse checkouts there and then use TortoiseSVN to commit and it worked pretty well :) -- regrads, Kalle Sommer Nielsen ka...@php.net -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c
On 08/03/2009 01:36 PM, Uwe Schindler wrote: Thanks Jani, I thought it is still optional to do this. Semi-optional. Since we use svn, why not fully make use of the features it provides? +1. But excuse my fault, it was my first commit since the SVN migration. The question is, how to do that on Windows with TortoiseSVN using the GUI? No idea..is it not possible? Use some other svn client? Or commit from command line, it's not that hard..? (no idea if that's possible in windows..I don't do clickety-click stuff) I got it, it works with TortoiseSVN, too. You can specify in the GUI to checkout only the immediates and so on. When you want to checkout one branch in complete, you can just use the Update to revision menu item and specify HEAD (as we do not want to update a specific revision like the menu item name suggests) and then use fully recursive. I think I could update the Wiki with a short HowTo. I like TortoiseSVN to manage my checkouts, because it colors the folder and file icons and you can quickly see whats updated. We had a similar discussion on the Lucene-Java Mailinglist about updating the backwards-compatibility tests branch with one commit together with trunk. - Uwe Schindler theta...@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany -Original Message- From: Jani Taskinen [mailto:j...@php.net] Sent: Monday, August 03, 2009 12:26 PM To: Uwe Schindler Cc: php-cvs@lists.php.net; gwy...@php.net Subject: Re: [PHP-CVS] svn: /php/php-src/trunk/sapi/nsapi/ nsapi.c Please use the single-commit way instead of doing multiple commits. Especially when you fix bugs..now there are 3 commit entries in that report. :D See also: http://wiki.php.net/vcs/svnfaq#sparse_directory_checkout_instructions --Jani On 08/03/2009 01:12 PM, Uwe Schindler wrote: thetaphi Mon, 03 Aug 2009 10:12:30 + Revision: http://svn.php.net/viewvc?view=revisionrevision=286721 Log: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX Bug: http://bugs.php.net/46020 (Assigned) With Sun Java System Web Server 7.0 on HPUX, #define HPUX Changed paths: U php/php-src/trunk/sapi/nsapi/nsapi.c Modified: php/php-src/trunk/sapi/nsapi/nsapi.c === --- php/php-src/trunk/sapi/nsapi/nsapi.c 2009-08-03 09:48:53 UTC (rev 286720) +++ php/php-src/trunk/sapi/nsapi/nsapi.c 2009-08-03 10:12:30 UTC (rev 286721) @@ -57,6 +57,13 @@ #endif /* + * The manual define of HPUX is to fix bug #46020, nsapi.h needs this to detect HPUX + */ +#ifdef __hpux +#define HPUX +#endif + +/* * NSAPI includes */ #include nsapi.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php