[PHP-CVS] cvs: php-src(PHP_5_2) /sapi/apache mod_php5.c
bfrance Thu Oct 12 20:02:58 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/apachemod_php5.c Log: Memory assigned to the request_rec should be allocated from apache pools and should not be free'ed at the end of the handler phase http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r1=1.19.2.7.2.5r2=1.19.2.7.2.6diff_format=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.19.2.7.2.5 php-src/sapi/apache/mod_php5.c:1.19.2.7.2.6 --- php-src/sapi/apache/mod_php5.c:1.19.2.7.2.5 Thu Aug 3 09:56:50 2006 +++ php-src/sapi/apache/mod_php5.c Thu Oct 12 20:02:58 2006 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php5.c,v 1.19.2.7.2.5 2006/08/03 09:56:50 dmitry Exp $ */ +/* $Id: mod_php5.c,v 1.19.2.7.2.6 2006/10/12 20:02:58 bfrance Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -209,7 +209,6 @@ static int sapi_apache_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { request_rec *r = SG(server_context); - char *status_buf = NULL; const char *sline = SG(sapi_headers).http_status_line; int sline_len; @@ -223,11 +222,10 @@ * the status-code: */ if (sline ((sline_len = strlen(sline)) 12) strncmp(sline, HTTP/1., 7) == 0 sline[8] == ' ' sline[12] == ' ') { if ((sline_len - 9) MAX_STATUS_LENGTH) { - status_buf = estrndup(sline + 9, MAX_STATUS_LENGTH); + r-status_line = ap_pstrndup(r-pool, sline + 9, MAX_STATUS_LENGTH); } else { - status_buf = estrndup(sline + 9, sline_len - 9); + r-status_line = ap_pstrndup(r-pool, sline + 9, sline_len - 9); } - r-status_line = status_buf; } if(r-status==304) { @@ -235,9 +233,6 @@ } else { send_http_header(r); } - if (status_buf) { - efree(status_buf); - } return SAPI_HEADER_SENT_SUCCESSFULLY; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/curl multi.c
bfrance Mon May 8 15:29:28 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/curl multi.c Log: MFH: Add implementation of curl_multi_info_read http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.3r2=1.2027.2.547.2.4diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.3 php-src/NEWS:1.2027.2.547.2.4 --- php-src/NEWS:1.2027.2.547.2.3 Sun May 7 16:32:39 2006 +++ php-src/NEWSMon May 8 15:29:27 2006 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? ??? 2006, PHP 5.2.0 +- Add implementation of curl_multi_info_read (Brian) - Fixed bug #37348 (make PEAR install ignore open_basedir). (Ilia) - Fixed bug #37313 (sigemptyset() used without including signal.h). (jdolecek) http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/multi.c?r1=1.19.2.3r2=1.19.2.3.2.1diff_format=u Index: php-src/ext/curl/multi.c diff -u php-src/ext/curl/multi.c:1.19.2.3 php-src/ext/curl/multi.c:1.19.2.3.2.1 --- php-src/ext/curl/multi.c:1.19.2.3 Thu Apr 13 11:26:10 2006 +++ php-src/ext/curl/multi.cMon May 8 15:29:28 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: multi.c,v 1.19.2.3 2006/04/13 11:26:10 tony2001 Exp $ */ +/* $Id: multi.c,v 1.19.2.3.2.1 2006/05/08 15:29:28 bfrance Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -84,17 +84,29 @@ ZEND_FETCH_RESOURCE(mh, php_curlm *, z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle); ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl); - zval_add_ref(z_ch); - _php_curl_cleanup_handle(ch); ch-uses++; + /* we want to create a copy of this zval that we store in the multihandle + structure element easyh - so we separate it from the original + input zval to this function using SEPARATE_ZVAL */ + SEPARATE_ZVAL( z_ch ); zend_llist_add_element(mh-easyh, z_ch); RETURN_LONG((long) curl_multi_add_handle(mh-multi, ch-cp)); } /* }}} */ + +/* Used internally as comparison routine passed to zend_list_del_element */ +static int curl_compare_resources( zval **z1, zval **z2 ) +{ + return (Z_TYPE_PP( z1 ) == Z_TYPE_PP( z2 ) +Z_TYPE_PP( z1 ) == IS_RESOURCE +Z_LVAL_PP( z1 ) == Z_LVAL_PP( z2 ) ); +} + + /* {{{ proto int curl_multi_remove_handle(resource mh, resource ch) Remove a multi handle from a set of cURL handles */ PHP_FUNCTION(curl_multi_remove_handle) @@ -112,6 +124,9 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl); --ch-uses; + + zend_llist_del_element( mh-easyh, z_ch, + (int (*)(void *, void *)) curl_compare_resources ); RETURN_LONG((long) curl_multi_remove_handle(mh-multi, ch-cp)); } @@ -206,13 +221,11 @@ { zval *z_mh; php_curlm *mh; - CURLMsg *tmp_msg; + CURLMsg *tmp_msg; intqueued_msgs; + zval *zmsgs_in_queue = NULL; - /* XXX: Not Implemented */ - return; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, z_mh) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|z, z_mh, zmsgs_in_queue) == FAILURE) { return; } @@ -222,12 +235,46 @@ if (tmp_msg == NULL) { RETURN_FALSE; } + if (zmsgs_in_queue) { + zval_dtor(zmsgs_in_queue); + ZVAL_LONG(zmsgs_in_queue, queued_msgs); + } array_init(return_value); add_assoc_long(return_value, msg, tmp_msg-msg); add_assoc_long(return_value, result, tmp_msg-data.result); - /* add_assoc_resource(return_value, handle, zend_list_id_by_pointer(tmp_msg-easy_handle, le_curl TSRMLS_CC)); */ - add_assoc_string(return_value, whatever, (char *) tmp_msg-data.whatever, 1); + + /* find the original easy curl handle */ + { + zend_llist_position pos; + php_curl *ch; + zval**pz_ch; + + /* search the list of easy handles hanging off the multi-handle */ + for(pz_ch = (zval **)zend_llist_get_first_ex(mh-easyh, pos); pz_ch; + pz_ch = (zval **)zend_llist_get_next_ex(mh-easyh, pos)) { + ZEND_FETCH_RESOURCE(ch, php_curl *, pz_ch, -1, le_curl_name, le_curl); + if (ch-cp == tmp_msg-easy_handle) { + + /* we are adding a reference to the underlying php_curl + resource, so we need to add one to the resource's refcount + in order to ensure it doesn't get destroyed when the +
[PHP-CVS] cvs: php-src / NEWS /ext/curl multi.c
bfrance Wed May 3 19:52:48 2006 UTC Modified files: /php-srcNEWS /php-src/ext/curl multi.c Log: - Add implementation of curl_multi_info_read (Brian) Not adding to PHP 5_1, but should go into 5_2. http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2113r2=1.2114diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2113 php-src/NEWS:1.2114 --- php-src/NEWS:1.2113 Mon Apr 10 10:16:42 2006 +++ php-src/NEWSWed May 3 19:52:48 2006 @@ -34,6 +34,7 @@ . Added curl_setopt_array() which allows setting of multiple cURL options. . Added CURLINFO_HEADER_OUT constant to facilitate request retrieval. +- Add implementation of curl_multi_info_read (Brian) - Added jump label operator (limited goto). (Dmitry, Sara) - Added E_STRICT to E_ALL. (Dmitry) - Added gmp_nextprime() function. (Tony, patch by ants dot aasma at gmail dot com) http://cvs.php.net/viewcvs.cgi/php-src/ext/curl/multi.c?r1=1.22r2=1.23diff_format=u Index: php-src/ext/curl/multi.c diff -u php-src/ext/curl/multi.c:1.22 php-src/ext/curl/multi.c:1.23 --- php-src/ext/curl/multi.c:1.22 Thu Apr 13 11:26:43 2006 +++ php-src/ext/curl/multi.cWed May 3 19:52:48 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: multi.c,v 1.22 2006/04/13 11:26:43 tony2001 Exp $ */ +/* $Id: multi.c,v 1.23 2006/05/03 19:52:48 bfrance Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -84,17 +84,29 @@ ZEND_FETCH_RESOURCE(mh, php_curlm *, z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle); ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl); - zval_add_ref(z_ch); - _php_curl_cleanup_handle(ch); ch-uses++; + /* we want to create a copy of this zval that we store in the multihandle + structure element easyh - so we separate it from the original + input zval to this function using SEPARATE_ZVAL */ + SEPARATE_ZVAL( z_ch ); zend_llist_add_element(mh-easyh, z_ch); RETURN_LONG((long) curl_multi_add_handle(mh-multi, ch-cp)); } /* }}} */ + +/* Used internally as comparison routine passed to zend_list_del_element */ +static int curl_compare_resources( zval **z1, zval **z2 ) +{ + return (Z_TYPE_PP( z1 ) == Z_TYPE_PP( z2 ) +Z_TYPE_PP( z1 ) == IS_RESOURCE +Z_LVAL_PP( z1 ) == Z_LVAL_PP( z2 ) ); +} + + /* {{{ proto int curl_multi_remove_handle(resource mh, resource ch) Remove a multi handle from a set of cURL handles */ PHP_FUNCTION(curl_multi_remove_handle) @@ -112,6 +124,9 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, z_ch, -1, le_curl_name, le_curl); --ch-uses; + + zend_llist_del_element( mh-easyh, z_ch, + (int (*)(void *, void *)) curl_compare_resources ); RETURN_LONG((long) curl_multi_remove_handle(mh-multi, ch-cp)); } @@ -206,13 +221,11 @@ { zval *z_mh; php_curlm *mh; - CURLMsg *tmp_msg; + CURLMsg *tmp_msg; intqueued_msgs; + zval *zmsgs_in_queue = NULL; - /* XXX: Not Implemented */ - return; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, z_mh) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|z, z_mh, zmsgs_in_queue) == FAILURE) { return; } @@ -222,12 +235,46 @@ if (tmp_msg == NULL) { RETURN_FALSE; } + if (zmsgs_in_queue) { + zval_dtor(zmsgs_in_queue); + ZVAL_LONG(zmsgs_in_queue, queued_msgs); + } array_init(return_value); add_assoc_long(return_value, msg, tmp_msg-msg); add_assoc_long(return_value, result, tmp_msg-data.result); - /* add_assoc_resource(return_value, handle, zend_list_id_by_pointer(tmp_msg-easy_handle, le_curl TSRMLS_CC)); */ - add_assoc_string(return_value, whatever, (char *) tmp_msg-data.whatever, 1); + + /* find the original easy curl handle */ + { + zend_llist_position pos; + php_curl *ch; + zval**pz_ch; + + /* search the list of easy handles hanging off the multi-handle */ + for(pz_ch = (zval **)zend_llist_get_first_ex(mh-easyh, pos); pz_ch; + pz_ch = (zval **)zend_llist_get_next_ex(mh-easyh, pos)) { + ZEND_FETCH_RESOURCE(ch, php_curl *, pz_ch, -1, le_curl_name, le_curl); + if (ch-cp == tmp_msg-easy_handle) { + + /* we are adding a reference to the underlying php_curl + resource, so we need to add one to the resource's refcount + in order to ensure it doesn't get destroyed when the + underlying curl easy handle
[PHP-CVS] cvs: php-src /main main.c
bfrance Fri Mar 10 18:16:24 2006 UTC Modified files: /php-src/main main.c Log: for the primary file only lookup the real file path and add it to the included_files list if already opened otherwise it will get opened and added to the included_files list in zend_execute_scripts http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.671r2=1.672diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.671 php-src/main/main.c:1.672 --- php-src/main/main.c:1.671 Thu Mar 9 20:31:58 2006 +++ php-src/main/main.c Fri Mar 10 18:16:24 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.671 2006/03/09 20:31:58 pollita Exp $ */ +/* $Id: main.c,v 1.672 2006/03/10 18:16:24 bfrance Exp $ */ /* {{{ includes */ @@ -1786,7 +1786,10 @@ VCWD_CHDIR_FILE(primary_file-filename); } - if (primary_file-filename) { + /* Only lookup the real file path and add it to the included_files list if already opened +* otherwise it will get opened and added to the included_files list in zend_execute_scripts +*/ + if (primary_file-filename primary_file-type != ZEND_HANDLE_FILENAME) { int realfile_len; int dummy = 1; if (VCWD_REALPATH(primary_file-filename, realfile)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /main main.c
bfrance Fri Mar 10 18:19:29 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/main main.c Log: MFH: for the primary file only lookup the real file path and add it to the included_files list if already opened otherwise it will get opened and added to the included_files list in zend_execute_scripts http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.640.2.17r2=1.640.2.18diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.17 php-src/main/main.c:1.640.2.18 --- php-src/main/main.c:1.640.2.17 Thu Mar 9 20:32:22 2006 +++ php-src/main/main.c Fri Mar 10 18:19:29 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.640.2.17 2006/03/09 20:32:22 pollita Exp $ */ +/* $Id: main.c,v 1.640.2.18 2006/03/10 18:19:29 bfrance Exp $ */ /* {{{ includes */ @@ -1681,7 +1681,10 @@ VCWD_CHDIR_FILE(primary_file-filename); } - if (primary_file-filename) { + /* Only lookup the real file path and add it to the included_files list if already opened +* otherwise it will get opened and added to the included_files list in zend_execute_scripts +*/ + if (primary_file-filename primary_file-type != ZEND_HANDLE_FILENAME) { int realfile_len; int dummy = 1; if (VCWD_REALPATH(primary_file-filename, realfile)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
bfrance Thu Feb 23 03:48:30 2006 UTC Modified files: /php-src/ext/standard basic_functions.c Log: fixed bug #35594 for all systems. optind = 0 doesn't work on FreeBSD, but optind = 1 seems to work on all systems (bug #36091) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.757r2=1.758diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.757 php-src/ext/standard/basic_functions.c:1.758 --- php-src/ext/standard/basic_functions.c:1.757Wed Feb 22 13:10:32 2006 +++ php-src/ext/standard/basic_functions.c Thu Feb 23 03:48:30 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.757 2006/02/22 13:10:32 dmitry Exp $ */ +/* $Id: basic_functions.c,v 1.758 2006/02/23 03:48:30 bfrance Exp $ */ #include php.h #include php_streams.h @@ -1597,7 +1597,7 @@ opterr = 0; /* Force reinitialization of getopt() (via optind reset) on every call. */ - optind = 0; + optind = 1; /* Invoke getopt(3) on the argument array. */ #ifdef HARTMUT_0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/standard basic_functions.c
bfrance Thu Feb 23 03:51:46 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/standard basic_functions.c Log: MFH: fixed bug #35594 for all systems. optind = 0 doesn't work on FreeBSD, but optind = 1 seems to work on all systems (bug #36091) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.23r2=1.725.2.24diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.23 php-src/ext/standard/basic_functions.c:1.725.2.24 --- php-src/ext/standard/basic_functions.c:1.725.2.23 Tue Feb 21 15:32:06 2006 +++ php-src/ext/standard/basic_functions.c Thu Feb 23 03:51:46 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.23 2006/02/21 15:32:06 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.24 2006/02/23 03:51:46 bfrance Exp $ */ #include php.h #include php_streams.h @@ -1667,7 +1667,7 @@ opterr = 0; /* Force reinitialization of getopt() (via optind reset) on every call. */ - optind = 0; + optind = 1; /* Invoke getopt(3) on the argument array. */ #ifdef HARTMUT_0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/standard basic_functions.c
bfrance Thu Feb 23 03:53:00 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/standard basic_functions.c Log: MFH: fixed bug #35594 for all systems. optind = 0 doesn't work on FreeBSD, but optind = 1 seems to work on all systems (bug #36091) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.543.2.51.2.7r2=1.543.2.51.2.8diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.543.2.51.2.7 php-src/ext/standard/basic_functions.c:1.543.2.51.2.8 --- php-src/ext/standard/basic_functions.c:1.543.2.51.2.7 Tue Feb 21 15:35:01 2006 +++ php-src/ext/standard/basic_functions.c Thu Feb 23 03:53:00 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.543.2.51.2.7 2006/02/21 15:35:01 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.543.2.51.2.8 2006/02/23 03:53:00 bfrance Exp $ */ #include php.h #include php_streams.h @@ -1596,7 +1596,7 @@ opterr = 0; /* Force reinitialization of getopt() (via optind reset) on every call. */ - optind = 0; + optind = 1; /* Invoke getopt(3) on the argument array. */ #ifdef HARTMUT_0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/sqlite sqlite.c
bfrance Mon Dec 5 15:40:55 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/sqlite sqlite.c Log: Wrap the php_session.h include in the same ifdef as the rest of the session code. http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.166.2.7r2=1.166.2.8ty=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.166.2.7 php-src/ext/sqlite/sqlite.c:1.166.2.8 --- php-src/ext/sqlite/sqlite.c:1.166.2.7 Fri Nov 25 11:01:41 2005 +++ php-src/ext/sqlite/sqlite.c Mon Dec 5 15:40:54 2005 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: sqlite.c,v 1.166.2.7 2005/11/25 16:01:41 sniper Exp $ + $Id: sqlite.c,v 1.166.2.8 2005/12/05 20:40:54 bfrance Exp $ */ #ifdef HAVE_CONFIG_H @@ -29,7 +29,9 @@ #include php.h #include php_ini.h #include ext/standard/info.h +#if HAVE_PHP_SESSION !defined(COMPILE_DL_SESSION) #include ext/session/php_session.h +#endif #include php_sqlite.h #if HAVE_TIME_H @@ -346,11 +348,11 @@ { if (rsrc-ptr) { struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc-ptr; - + sqlite_close(db-db); zend_hash_destroy(db-callbacks); - + pefree(db, db-is_persistent); rsrc-ptr = NULL; @@ -413,7 +415,7 @@ /* don't leave pending commits hanging around */ sqlite_exec(db-db, ROLLBACK, NULL, NULL, NULL); - + return 0; } @@ -438,7 +440,7 @@ sqlite_set_result_error(func, not enough parameters, -1); return; } - + ZVAL_STRING(funcname, (char*)argv[0], 1); if (!zend_make_callable(funcname, callable TSRMLS_CC)) { @@ -449,10 +451,10 @@ zval_dtor(funcname); return; } - + if (argc 1) { zargs = (zval ***)safe_emalloc((argc - 1), sizeof(zval **), 0); - + for (i = 0; i argc-1; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -529,7 +531,7 @@ if (argc 0) { zargs = (zval ***)safe_emalloc(argc, sizeof(zval **), 0); - + for (i = 0; i argc; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -608,10 +610,10 @@ if (argc 1) { return; } - + zargc = argc + 1; zargs = (zval ***)safe_emalloc(zargc, sizeof(zval **), 0); - + /* first arg is always the context zval */ context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); @@ -673,9 +675,9 @@ sqlite_set_result_error(func, this function has not been correctly defined for this request, -1); return; } - + context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); - + res = call_user_function_ex(EG(function_table), NULL, funcs-fini, @@ -837,7 +839,7 @@ static zend_object_value sqlite_object_new_db(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_db, retval TSRMLS_CC); return retval; } @@ -845,7 +847,7 @@ static zend_object_value sqlite_object_new_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_query, retval TSRMLS_CC); return retval; } @@ -853,7 +855,7 @@ static zend_object_value sqlite_object_new_ub_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_ub_query, retval TSRMLS_CC); return retval; } @@ -861,7 +863,7 @@ static zend_object_value sqlite_object_new_exception(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_exception, retval TSRMLS_CC); return retval; } @@ -947,7 +949,7 @@ MAKE_STD_ZVAL(**data); php_sqlite_fetch_array(res, res-mode, 1, 0, **data TSRMLS_CC); } - + } int sqlite_iterator_get_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) @@ -976,7 +978,7 @@ /* php_error_docref(NULL TSRMLS_CC, E_WARNING, no more rows available); */ return; } - + res-curr_row++; } } @@ -1029,7 +1031,7 @@ REGISTER_SQLITE_CLASS(Exception, exception,
[PHP-CVS] cvs: php-src /ext/sqlite sqlite.c
bfrance Mon Dec 5 15:41:57 2005 EDT Modified files: /php-src/ext/sqlite sqlite.c Log: Wrap the php_session.h include in the same ifdef as the rest of the session code. http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.178r2=1.179ty=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.178 php-src/ext/sqlite/sqlite.c:1.179 --- php-src/ext/sqlite/sqlite.c:1.178 Fri Nov 25 10:40:14 2005 +++ php-src/ext/sqlite/sqlite.c Mon Dec 5 15:41:57 2005 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: sqlite.c,v 1.178 2005/11/25 15:40:14 sniper Exp $ + $Id: sqlite.c,v 1.179 2005/12/05 20:41:57 bfrance Exp $ */ #ifdef HAVE_CONFIG_H @@ -29,7 +29,9 @@ #include php.h #include php_ini.h #include ext/standard/info.h +#if HAVE_PHP_SESSION !defined(COMPILE_DL_SESSION) #include ext/session/php_session.h +#endif #include php_sqlite.h #if HAVE_TIME_H @@ -346,11 +348,11 @@ { if (rsrc-ptr) { struct php_sqlite_db *db = (struct php_sqlite_db*)rsrc-ptr; - + sqlite_close(db-db); zend_hash_destroy(db-callbacks); - + pefree(db, db-is_persistent); rsrc-ptr = NULL; @@ -413,7 +415,7 @@ /* don't leave pending commits hanging around */ sqlite_exec(db-db, ROLLBACK, NULL, NULL, NULL); - + return 0; } @@ -439,7 +441,7 @@ sqlite_set_result_error(func, not enough parameters, -1); return; } - + ZVAL_STRING(funcname, (char*)argv[0], 1); if (!zend_make_callable(funcname, callable TSRMLS_CC)) { @@ -450,10 +452,10 @@ zval_dtor(funcname); return; } - + if (argc 1) { zargs = (zval ***)safe_emalloc((argc - 1), sizeof(zval **), 0); - + for (i = 0; i argc-1; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -530,7 +532,7 @@ if (argc 0) { zargs = (zval ***)safe_emalloc(argc, sizeof(zval **), 0); - + for (i = 0; i argc; i++) { zargs[i] = emalloc(sizeof(zval *)); MAKE_STD_ZVAL(*zargs[i]); @@ -609,10 +611,10 @@ if (argc 1) { return; } - + zargc = argc + 1; zargs = (zval ***)safe_emalloc(zargc, sizeof(zval **), 0); - + /* first arg is always the context zval */ context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); @@ -674,9 +676,9 @@ sqlite_set_result_error(func, this function has not been correctly defined for this request, -1); return; } - + context_p = (zval **)sqlite_aggregate_context(func, sizeof(*context_p)); - + res = call_user_function_ex(EG(function_table), NULL, funcs-fini, @@ -838,7 +840,7 @@ static zend_object_value sqlite_object_new_db(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_db, retval TSRMLS_CC); return retval; } @@ -846,7 +848,7 @@ static zend_object_value sqlite_object_new_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_query, retval TSRMLS_CC); return retval; } @@ -854,7 +856,7 @@ static zend_object_value sqlite_object_new_ub_query(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_ub_query, retval TSRMLS_CC); return retval; } @@ -862,7 +864,7 @@ static zend_object_value sqlite_object_new_exception(zend_class_entry *class_type TSRMLS_DC) { zend_object_value retval; - + sqlite_object_new(class_type, sqlite_object_handlers_exception, retval TSRMLS_CC); return retval; } @@ -948,7 +950,7 @@ MAKE_STD_ZVAL(**data); php_sqlite_fetch_array(res, res-mode, 1, 0, **data TSRMLS_CC); } - + } int sqlite_iterator_get_current_key(zend_object_iterator *iter, char **str_key, uint *str_key_len, ulong *int_key TSRMLS_DC) @@ -977,7 +979,7 @@ /* php_error_docref(NULL TSRMLS_CC, E_WARNING, no more rows available); */ return; } - + res-curr_row++; } } @@ -1030,7 +1032,7 @@ REGISTER_SQLITE_CLASS(Exception, exception, spl_ce_RuntimeException); #else
[PHP-CVS] cvs: php-src(PHP_5_1) /ext/ftp config.m4
bfrance Mon Oct 31 19:32:23 2005 EDT Modified files: (Branch: PHP_5_1) /php-src/ext/ftpconfig.m4 Log: Fixed phpize build (default PHP_OPENSSL to no if not set) http://cvs.php.net/diff.php/php-src/ext/ftp/config.m4?r1=1.7.20.2r2=1.7.20.3ty=u Index: php-src/ext/ftp/config.m4 diff -u php-src/ext/ftp/config.m4:1.7.20.2 php-src/ext/ftp/config.m4:1.7.20.3 --- php-src/ext/ftp/config.m4:1.7.20.2 Sun Oct 9 16:44:02 2005 +++ php-src/ext/ftp/config.m4 Mon Oct 31 19:32:21 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.7.20.2 2005/10/09 20:44:02 sniper Exp $ +dnl $Id: config.m4,v 1.7.20.3 2005/11/01 00:32:21 bfrance Exp $ dnl PHP_ARG_ENABLE(ftp,whether to enable FTP support, @@ -12,6 +12,9 @@ AC_DEFINE(HAVE_FTP,1,[Whether you want FTP support]) PHP_NEW_EXTENSION(ftp, php_ftp.c ftp.c, $ext_shared) + dnl Empty variable means 'no' + test -z $PHP_OPENSSL PHP_OPENSSL=no + if test $PHP_OPENSSL != no || test $PHP_OPENSSL_DIR != no; then PHP_SETUP_OPENSSL(FTP_SHARED_LIBADD) PHP_SUBST(FTP_SHARED_LIBADD) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/ftp config.m4
bfrance Mon Oct 31 19:46:49 2005 EDT Modified files: /php-src/ext/ftpconfig.m4 Log: MFB: Fixed phpize build (default PHP_OPENSSL to no if not set) http://cvs.php.net/diff.php/php-src/ext/ftp/config.m4?r1=1.10r2=1.11ty=u Index: php-src/ext/ftp/config.m4 diff -u php-src/ext/ftp/config.m4:1.10 php-src/ext/ftp/config.m4:1.11 --- php-src/ext/ftp/config.m4:1.10 Sun Oct 9 16:44:26 2005 +++ php-src/ext/ftp/config.m4 Mon Oct 31 19:46:44 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.10 2005/10/09 20:44:26 sniper Exp $ +dnl $Id: config.m4,v 1.11 2005/11/01 00:46:44 bfrance Exp $ dnl PHP_ARG_ENABLE(ftp,whether to enable FTP support, @@ -12,6 +12,9 @@ AC_DEFINE(HAVE_FTP,1,[Whether you want FTP support]) PHP_NEW_EXTENSION(ftp, php_ftp.c ftp.c, $ext_shared) + dnl Empty variable means 'no' + test -z $PHP_OPENSSL PHP_OPENSSL=no + if test $PHP_OPENSSL != no || test $PHP_OPENSSL_DIR != no; then PHP_SETUP_OPENSSL(FTP_SHARED_LIBADD) PHP_SUBST(FTP_SHARED_LIBADD) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /sapi/apache mod_php5.c
bfrance Tue Jun 28 12:34:18 2005 EDT Modified files: /php-srcNEWS /php-src/sapi/apachemod_php5.c Log: Added a SG(server_context) NULL check to php_apache_getenv. This can get called when key = ${key}:/foo is used in a .ini file, but key has not be set yet. You will end up with a value of :/foo, but at least it will not crash now. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1962r2=1.1963ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1962 php-src/NEWS:1.1963 --- php-src/NEWS:1.1962 Mon Jun 27 14:38:03 2005 +++ php-src/NEWSTue Jun 28 12:34:17 2005 @@ -3,6 +3,7 @@ ?? ??? 2005, PHP 5.1 Beta 3 - Added PDO_MYSQL_ATTR_USE_BUFFERED_QUERY parameter for pdo_mysql, to toggle usage of buffered queries. +- Added a SG(server_context) NULL check to php_apache_getenv. (Brian) - Fixed bug #33491 (crash after extending MySQLi internal class). (Tony) - Fixed bug #33475 (cURL handle is not closed on curl_close(). (Ilia) - Fixed bug #33469 (Compile error undefined reference to ifx_checkAPI). (Jani) http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=1.16r2=1.17ty=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.16 php-src/sapi/apache/mod_php5.c:1.17 --- php-src/sapi/apache/mod_php5.c:1.16 Mon Jun 20 08:46:34 2005 +++ php-src/sapi/apache/mod_php5.c Tue Jun 28 12:34:18 2005 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php5.c,v 1.16 2005/06/20 12:46:34 tony2001 Exp $ */ +/* $Id: mod_php5.c,v 1.17 2005/06/28 16:34:18 bfrance Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -352,6 +352,10 @@ */ static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC) { + if (SG(server_context) == NULL) { + return NULL; + } + return (char *) table_get(((request_rec *) SG(server_context))-subprocess_env, name); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /sapi/apache mod_php5.c
bfrance Tue Jun 28 12:38:03 2005 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS /php-src/sapi/apachemod_php5.c Log: MFH: Added a SG(server_context) NULL check to php_apache_getenv. This can get called when key = ${key}:/foo is used in a .ini file, but key has not be set yet. You will end up with a value of :/foo, but at least it will not crash. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.444r2=1.1760.2.445ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.444 php-src/NEWS:1.1760.2.445 --- php-src/NEWS:1.1760.2.444 Mon Jun 27 14:21:57 2005 +++ php-src/NEWSTue Jun 28 12:38:03 2005 @@ -3,6 +3,7 @@ ?? ??? 2005, PHP 5.0.5 - Upgraded PCRE library to version 5.0. (Andrei) - Removed php_check_syntax() function which never worked properly. (Ilia) +- Added a SG(server_context) NULL check to php_apache_getenv. (Brian) - Added new function mysqli_set_charset(). (Georg) - Added man pages for phpize and php-config scripts. (Jakub Vrana) - Added support for .cc files in extensions. (Brian) http://cvs.php.net/diff.php/php-src/sapi/apache/mod_php5.c?r1=1.10.2.2r2=1.10.2.3ty=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.10.2.2 php-src/sapi/apache/mod_php5.c:1.10.2.3 --- php-src/sapi/apache/mod_php5.c:1.10.2.2 Mon Jun 20 08:46:52 2005 +++ php-src/sapi/apache/mod_php5.c Tue Jun 28 12:38:03 2005 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: mod_php5.c,v 1.10.2.2 2005/06/20 12:46:52 tony2001 Exp $ */ +/* $Id: mod_php5.c,v 1.10.2.3 2005/06/28 16:38:03 bfrance Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -352,6 +352,10 @@ */ static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC) { + if (SG(server_context) == NULL) { + return NULL; + } + return (char *) table_get(((request_rec *) SG(server_context))-subprocess_env, name); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_soap.h soap.c
bfrance Thu Jun 16 18:35:15 2005 EDT Modified files: /php-src/ext/soap php_soap.h soap.c Log: ifdef'ed the code but not the includes http://cvs.php.net/diff.php/php-src/ext/soap/php_soap.h?r1=1.36r2=1.37ty=u Index: php-src/ext/soap/php_soap.h diff -u php-src/ext/soap/php_soap.h:1.36 php-src/ext/soap/php_soap.h:1.37 --- php-src/ext/soap/php_soap.h:1.36Wed Feb 2 05:34:39 2005 +++ php-src/ext/soap/php_soap.h Thu Jun 16 18:35:11 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_soap.h,v 1.36 2005/02/02 10:34:39 dmitry Exp $ */ +/* $Id: php_soap.h,v 1.37 2005/06/16 22:35:11 bfrance Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H @@ -26,7 +26,9 @@ #include php_globals.h #include ext/standard/info.h #include ext/standard/php_standard.h +#if HAVE_PHP_SESSION !defined(COMPILE_DL_SESSION) #include ext/session/php_session.h +#endif #include ext/standard/php_smart_str.h #include php_ini.h #include SAPI.h http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.151r2=1.152ty=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.151 php-src/ext/soap/soap.c:1.152 --- php-src/ext/soap/soap.c:1.151 Fri Jun 3 03:34:49 2005 +++ php-src/ext/soap/soap.c Thu Jun 16 18:35:11 2005 @@ -17,13 +17,15 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.151 2005/06/03 07:34:49 gschlossnagle Exp $ */ +/* $Id: soap.c,v 1.152 2005/06/16 22:35:11 bfrance Exp $ */ #ifdef HAVE_CONFIG_H #include config.h #endif #include php_soap.h +#if HAVE_PHP_SESSION !defined(COMPILE_DL_SESSION) #include ext/session/php_session.h +#endif #ifdef ZEND_ENGINE_2 # include zend_exceptions.h #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS acinclude.m4
bfrance Wed Apr 20 16:48:20 2005 EDT Modified files: /php-srcNEWS acinclude.m4 Log: Added support for .cc files in extensions. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1875r2=1.1876ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1875 php-src/NEWS:1.1876 --- php-src/NEWS:1.1875 Sun Apr 17 12:11:49 2005 +++ php-src/NEWSWed Apr 20 16:48:19 2005 @@ -31,6 +31,7 @@ . added class File . added possibility to use a string with class_parents() and class_implements(). (Andrey) +- Added support for .cc files in extensions. (Brian) - Added imageconvolution() function which can be used to apply a custom 3x3 matrix convolution to an image. (Pierre) - Added optional first parameter to XsltProcessor::registerPHPFunctions to only http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.298r2=1.299ty=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.298 php-src/acinclude.m4:1.299 --- php-src/acinclude.m4:1.298 Thu Apr 7 16:39:02 2005 +++ php-src/acinclude.m4Wed Apr 20 16:48:19 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: acinclude.m4,v 1.298 2005/04/07 20:39:02 sniper Exp $ +dnl $Id: acinclude.m4,v 1.299 2005/04/20 20:48:19 bfrance Exp $ dnl dnl This file contains local autoconf functions. dnl @@ -258,7 +258,7 @@ *.c[)] ac_comp=$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post ;; *.s[)] ac_comp=$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post ;; *.S[)] ac_comp=$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post ;; - *.cpp[)] ac_comp=$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post ;; + *.cpp|*.cc[)] ac_comp=$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post ;; esac dnl create a rule for the object/source combo -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /main SAPI.c
bfrance Thu Aug 19 16:26:39 2004 EDT Modified files: /php-srcNEWS /php-src/main SAPI.c Log: If you send a post with a content-type header and then the next post without the content-type header, raw_post_data will not be set. This is because SG(request_info).post_entry is set to the first requests function pointer which makes it follow the wrong code path. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1796r2=1.1797ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1796 php-src/NEWS:1.1797 --- php-src/NEWS:1.1796 Thu Aug 19 14:15:48 2004 +++ php-src/NEWSThu Aug 19 16:26:39 2004 @@ -25,6 +25,7 @@ - Added bz2 stream filter support. (Sara) - Added support of parameter-value arrays to xsl_xsltprocessor_set_parameter() (Tony) +- Fixed bug with raw_post_data not getting set (Brian) - Fixed bug in mysql-client_version (Georg) - Fixed ZTS destruction. (Marcus) - Fixed bug #29737 (ip2long should return -1 if IP is 255.255.255.255 and FALSE on error). (Tony) http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.189r2=1.190ty=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.189 php-src/main/SAPI.c:1.190 --- php-src/main/SAPI.c:1.189 Wed Aug 11 02:18:25 2004 +++ php-src/main/SAPI.c Thu Aug 19 16:26:39 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.189 2004/08/11 06:18:25 rasmus Exp $ */ +/* $Id: SAPI.c,v 1.190 2004/08/19 20:26:39 bfrance Exp $ */ #include ctype.h #include sys/stat.h @@ -296,6 +296,7 @@ SG(request_info).current_user = NULL; SG(request_info).current_user_length = 0; SG(request_info).no_headers = 0; + SG(request_info).post_entry = NULL; /* * It's possible to override this general case in the activate() callback, -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /main SAPI.c
bfrance Thu Aug 19 16:34:04 2004 EDT Modified files: (Branch: PHP_5_0) /php-srcNEWS /php-src/main SAPI.c Log: [MFH] If you send a post with a content-type header and then the next post without the content-type header, raw_post_data will not be set. This is because SG(request_info).post_entry is set to the first requests function pointer which makes it follow the wrong code path. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.47r2=1.1760.2.48ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.47 php-src/NEWS:1.1760.2.48 --- php-src/NEWS:1.1760.2.47Thu Aug 19 11:23:54 2004 +++ php-src/NEWSThu Aug 19 16:34:04 2004 @@ -3,6 +3,7 @@ ?? ??? 2004, PHP 5.0.2 - Added PHP_EOL constant that contains the OS way of representing newlines. (Paul Hudson, Derick) +- Fixed bug with raw_post_data not getting set (Brian) - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev) - Fixed bug #29737 (ip2long should return -1 if IP is 255.255.255.255 and FALSE on error). (Tony) - Fixed bug #29711 (Changed ext/xml to default to UTF-8 output). (Rob) http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.187r2=1.187.2.1ty=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.187 php-src/main/SAPI.c:1.187.2.1 --- php-src/main/SAPI.c:1.187 Tue Jun 8 09:23:38 2004 +++ php-src/main/SAPI.c Thu Aug 19 16:34:04 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.187 2004/06/08 13:23:38 iliaa Exp $ */ +/* $Id: SAPI.c,v 1.187.2.1 2004/08/19 20:34:04 bfrance Exp $ */ #include ctype.h #include sys/stat.h @@ -331,6 +331,7 @@ SG(request_info).current_user = NULL; SG(request_info).current_user_length = 0; SG(request_info).no_headers = 0; + SG(request_info).post_entry = NULL; /* It's possible to override this general case in the activate() callback, if * necessary. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /main SAPI.c
bfrance Thu Aug 19 16:35:36 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/main SAPI.c Log: [MFH] If you send a post with a content-type header and then the next post without the content-type header, raw_post_data will not be set. This is because SG(request_info).post_entry is set to the first requests function pointer which makes it follow the wrong code path. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.719r2=1.1247.2.720ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.719 php-src/NEWS:1.1247.2.720 --- php-src/NEWS:1.1247.2.719 Wed Aug 18 17:30:40 2004 +++ php-src/NEWSThu Aug 19 16:35:35 2004 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ?? ??? 2004, Version 4.3.9 +- Fixed bug with raw_post_data not getting set (Brian) - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev) - Fixed bug #29727 (Added missing CURL authentication directives). (Ilia) - Fixed bug #29719 (fgetcsv() has problem parsing strings ending with escaped http://cvs.php.net/diff.php/php-src/main/SAPI.c?r1=1.155.2.21r2=1.155.2.22ty=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.155.2.21 php-src/main/SAPI.c:1.155.2.22 --- php-src/main/SAPI.c:1.155.2.21 Tue Jun 8 09:23:46 2004 +++ php-src/main/SAPI.c Thu Aug 19 16:35:36 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: SAPI.c,v 1.155.2.21 2004/06/08 13:23:46 iliaa Exp $ */ +/* $Id: SAPI.c,v 1.155.2.22 2004/08/19 20:35:36 bfrance Exp $ */ #include ctype.h #include sys/stat.h @@ -331,6 +331,7 @@ SG(request_info).current_user = NULL; SG(request_info).current_user_length = 0; SG(request_info).no_headers = 0; + SG(request_info).post_entry = NULL; /* It's possible to override this general case in the activate() callback, if * necessary. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard head.c
bfrance Wed Feb 11 14:00:44 2004 EDT Modified files: /php-src/ext/standard head.c Log: Added checks for invalid characters in a cookie name or cookie data from setrawcookie http://cvs.php.net/diff.php/php-src/ext/standard/head.c?r1=1.74r2=1.75ty=u Index: php-src/ext/standard/head.c diff -u php-src/ext/standard/head.c:1.74 php-src/ext/standard/head.c:1.75 --- php-src/ext/standard/head.c:1.74Thu Jan 8 03:17:32 2004 +++ php-src/ext/standard/head.c Wed Feb 11 14:00:42 2004 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf [EMAIL PROTECTED]| +--+ */ -/* $Id: head.c,v 1.74 2004/01/08 08:17:32 andi Exp $ */ +/* $Id: head.c,v 1.75 2004/02/11 19:00:42 bfrance Exp $ */ #include stdio.h @@ -74,6 +74,16 @@ sapi_header_line ctr = {0}; int result; + if (name strpbrk(name, =,; \t\r\n\013\014) != NULL) { /* man isspace for \013 and \014 */ + zend_error( E_WARNING, Cookie names can not contain any of the folllowing '=,; \\t\\r\\n\\013\\014' (%s), name ); + return FAILURE; + } + + if (!url_encode value strpbrk(value, ,; \t\r\n\013\014) != NULL) { /* man isspace for \013 and \014 */ + zend_error( E_WARNING, Cookie values can not contain any of the folllowing ',; \\t\\r\\n\\013\\014' (%s), value ); + return FAILURE; + } + len += name_len; if (value url_encode) { int encoded_value_len; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS
bfrance Wed Feb 11 14:02:41 2004 EDT Modified files: /php-srcNEWS Log: - Added checks for invalid characters in a cookie name or cookie data from setrawcookie. (Brian) - Added new pspell functions to set the dict-dir and data-dir options. (Brian) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1599r2=1.1600ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1599 php-src/NEWS:1.1600 --- php-src/NEWS:1.1599 Tue Feb 10 04:37:11 2004 +++ php-src/NEWSWed Feb 11 14:02:39 2004 @@ -1,6 +1,9 @@ PHPNEWS ||| ?? ??? 2004, PHP 5 Beta 4 +- Added checks for invalid characters in a cookie name or cookie data + from setrawcookie. (Brian) +- Added new pspell functions to set the dict-dir and data-dir options. (Brian) - Added support for ++ and += (and similar) to SimpleXML. (Andi, Zeev) - Added infrastructure for ++ and += (and similar) to object overloading modules. (Andi, Zeev) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php.h
bfrance Fri Aug 22 12:43:30 2003 EDT Modified files: /php-src/main php.h Log: Updated PHP_API_VERSION to 20030820 for the php_setcookie api change Index: php-src/main/php.h diff -u php-src/main/php.h:1.192 php-src/main/php.h:1.193 --- php-src/main/php.h:1.192Mon Aug 18 19:19:27 2003 +++ php-src/main/php.h Fri Aug 22 12:43:29 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.192 2003/08/18 23:19:27 wez Exp $ */ +/* $Id: php.h,v 1.193 2003/08/22 16:43:29 bfrance Exp $ */ #ifndef PHP_H #define PHP_H @@ -26,7 +26,7 @@ #include dmalloc.h #endif -#define PHP_API_VERSION 20030518 +#define PHP_API_VERSION 20030820 #define PHP_HAVE_STREAMS #define YYDEBUG 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / acinclude.m4
bfrance Wed Aug 13 18:50:34 2003 EDT Modified files: (Branch: PHP_4_3) /php-srcacinclude.m4 Log: Fixed two translit so they don't remove underscores Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.218.2.22 php-src/acinclude.m4:1.218.2.23 --- php-src/acinclude.m4:1.218.2.22 Thu Jul 3 18:54:07 2003 +++ php-src/acinclude.m4Wed Aug 13 18:50:34 2003 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.22 2003/07/03 22:54:07 sas Exp $ +dnl $Id: acinclude.m4,v 1.218.2.23 2003/08/13 22:50:34 bfrance Exp $ dnl dnl This file contains local autoconf functions. @@ -1221,8 +1221,8 @@ \$(phplibdir)/$1.la: $3/$1.la \$(LIBTOOL) --mode=install cp $3/$1.la \$(phplibdir) -$3/$1.la: \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_DEPENDENCIES) - \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z-,A-Z_)_SHARED_LIBADD) +$3/$1.la: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES) + \$(LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -export-dynamic -avoid-version -prefer-non-pic -module -rpath \$(phplibdir) \$(EXTRA_LDFLAGS) \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) EOF ]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mbstring mbregex.c
bfrance Wed Aug 6 11:16:46 2003 EDT Modified files: /php-src/ext/mbstring mbregex.c Log: MFB: added include config.h so shared extensions builds work correctly Index: php-src/ext/mbstring/mbregex.c diff -u php-src/ext/mbstring/mbregex.c:1.18 php-src/ext/mbstring/mbregex.c:1.19 --- php-src/ext/mbstring/mbregex.c:1.18 Mon Dec 2 16:10:37 2002 +++ php-src/ext/mbstring/mbregex.c Wed Aug 6 11:16:46 2003 @@ -23,6 +23,10 @@ #include php.h +#ifdef HAVE_CONFIG_H +#include config.h +#endif + #if HAVE_MBREGEX #define re_compile_pattern mbre_compile_pattern -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mbstring mbregex.c
bfrance Tue Aug 5 16:54:43 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mbstring mbregex.c Log: added include config.h so shared extensions builds work correctly Index: php-src/ext/mbstring/mbregex.c diff -u php-src/ext/mbstring/mbregex.c:1.16 php-src/ext/mbstring/mbregex.c:1.16.2.1 --- php-src/ext/mbstring/mbregex.c:1.16 Tue Nov 12 12:41:26 2002 +++ php-src/ext/mbstring/mbregex.c Tue Aug 5 16:54:43 2003 @@ -23,6 +23,10 @@ #include php.h +#ifdef HAVE_CONFIG_H +#include config.h +#endif + #if HAVE_MBREGEX #define re_compile_pattern mbre_compile_pattern -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/curl multi.c
bfrance Sat Apr 5 03:14:57 2003 EDT Modified files: /php4/ext/curl multi.c Log: Added HAVE_CONFIG_H check so the phpize build method works Index: php4/ext/curl/multi.c diff -u php4/ext/curl/multi.c:1.9 php4/ext/curl/multi.c:1.10 --- php4/ext/curl/multi.c:1.9 Fri Apr 4 11:00:33 2003 +++ php4/ext/curl/multi.c Sat Apr 5 03:14:56 2003 @@ -16,9 +16,13 @@ +--+ */ -/* $Id: multi.c,v 1.9 2003/04/04 16:00:33 sterling Exp $ */ +/* $Id: multi.c,v 1.10 2003/04/05 08:14:56 bfrance Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS + +#ifdef HAVE_CONFIG_H +#include config.h +#endif #include php.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /main main.c
bfrance Mon Mar 31 16:24:59 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main main.c Log: Fixes the problem where argv and argc are not populated unless S is in the variables_order, even if register_argc_argv is on. Index: php4/main/main.c diff -u php4/main/main.c:1.512.2.20 php4/main/main.c:1.512.2.21 --- php4/main/main.c:1.512.2.20 Wed Mar 19 03:22:35 2003 +++ php4/main/main.cMon Mar 31 16:24:59 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: main.c,v 1.512.2.20 2003/03/19 08:22:35 sniper Exp $ */ +/* $Id: main.c,v 1.512.2.21 2003/03/31 21:24:59 bfrance Exp $ */ /* {{{ includes */ @@ -110,7 +110,7 @@ static last_error_type last_error; -static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC); +static void php_build_argv(char *s TSRMLS_DC); static char *short_track_vars_names[] = { @@ -1317,11 +1317,6 @@ sapi_module.register_server_variables(array_ptr TSRMLS_CC); } - /* argv/argc support */ - if (PG(register_argc_argv)) { - php_build_argv(SG(request_info).query_string, array_ptr TSRMLS_CC); - } - /* PHP Authentication support */ if (SG(request_info).auth_user) { php_register_variable(PHP_AUTH_USER, SG(request_info).auth_user, array_ptr TSRMLS_CC); @@ -1423,6 +1418,11 @@ php_register_server_variables(TSRMLS_C); } + /* argv/argc support */ + if (PG(register_argc_argv)) { + php_build_argv(SG(request_info).query_string TSRMLS_CC); + } + for (i=0; iNUM_TRACK_VARS; i++) { if (!PG(http_globals)[i]) { if (!initialized_dummy_track_vars_array) { @@ -1474,7 +1474,7 @@ /* {{{ php_build_argv */ -static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC) +static void php_build_argv(char *s TSRMLS_DC) { pval *arr, *argc, *tmp; int count = 0; @@ -1544,8 +1544,10 @@ zend_hash_add(EG(symbol_table), argc, sizeof(argc), argc, sizeof(zval *), NULL); } - zend_hash_update(Z_ARRVAL_P(track_vars_array), argv, sizeof(argv), arr, sizeof(pval *), NULL); - zend_hash_update(Z_ARRVAL_P(track_vars_array), argc, sizeof(argc), argc, sizeof(pval *), NULL); + if ( PG(http_globals)[TRACK_VARS_SERVER] != NULL ) { + zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), argv, sizeof(argv), arr, sizeof(pval *), NULL); + zend_hash_update(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), argc, sizeof(argc), argc, sizeof(pval *), NULL); + } } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php