[PHP-CVS-DAILY] cvs: Zend / ChangeLog
changelog Fri Feb 14 20:35:48 2003 EDT Modified files: /Zend ChangeLog Log: ChangeLog update Index: Zend/ChangeLog diff -u Zend/ChangeLog:1.111 Zend/ChangeLog:1.112 --- Zend/ChangeLog:1.111Thu Feb 13 20:33:09 2003 +++ Zend/ChangeLog Fri Feb 14 20:35:47 2003 @@ -1,3 +1,9 @@ +2003-02-14 Thies C. Arntzen [EMAIL PROTECTED] + +* (PHP_4) + zend_execute_API.c: + init current_execute_data befor we start executing + 2003-02-13 Harald Radi [EMAIL PROTECTED] * zend_language_scanner.l: @@ -936,7 +942,7 @@ 2002-05-13 Sterling Hughes [EMAIL PROTECTED] -* zend_qsort.c: add $Id: ChangeLog,v 1.111 2003/02/14 01:33:09 changelog Exp $ tag +* zend_qsort.c: add $Id: ChangeLog,v 1.112 2003/02/15 01:35:47 changelog Exp $ tag 2002-05-13 Derick Rethans [EMAIL PROTECTED]
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Feb 14 20:35:52 2003 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.172 ZendEngine2/ChangeLog:1.173 --- ZendEngine2/ChangeLog:1.172 Thu Feb 13 20:33:16 2003 +++ ZendEngine2/ChangeLog Fri Feb 14 20:35:51 2003 @@ -1,3 +1,14 @@ +2003-02-14 Thies C. Arntzen [EMAIL PROTECTED] + +* zend_execute_API.c: + init current_execute_data befor we start executing + +* Makefile.am: + ups + +* Makefile.am: + add really nice dump_bt function for debugging in gdb + 2003-02-13 Zeev Suraski [EMAIL PROTECTED] * zend_object_handlers.c: @@ -311,7 +322,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.172 2003/02/14 01:33:16 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.173 2003/02/15 01:35:51 changelog +Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_3) /sapi/cgi cgi_main.c
sniper Fri Feb 14 09:38:02 2003 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/cgi cgi_main.c Log: Added missing $Id$ tag Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.190.2.14 php4/sapi/cgi/cgi_main.c:1.190.2.15 --- php4/sapi/cgi/cgi_main.c:1.190.2.14 Thu Feb 13 15:58:41 2003 +++ php4/sapi/cgi/cgi_main.cFri Feb 14 09:38:01 2003 @@ -20,6 +20,7 @@ +--+ */ +/* $Id: cgi_main.c,v 1.190.2.15 2003/02/14 14:38:01 sniper Exp $ */ #include php.h #include php_globals.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c
sniper Fri Feb 14 09:38:20 2003 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: MFB Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.210 php4/sapi/cgi/cgi_main.c:1.211 --- php4/sapi/cgi/cgi_main.c:1.210 Thu Feb 13 14:46:40 2003 +++ php4/sapi/cgi/cgi_main.cFri Feb 14 09:38:20 2003 @@ -20,6 +20,7 @@ +--+ */ +/* $Id: cgi_main.c,v 1.211 2003/02/14 14:38:20 sniper Exp $ */ #include php.h #include php_globals.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli.c
georg Fri Feb 14 11:31:22 2003 EDT Modified files: /php4/ext/mysqlimysqli.c Log: fixed a bug in prepare/bind Index: php4/ext/mysqli/mysqli.c diff -u php4/ext/mysqli/mysqli.c:1.1 php4/ext/mysqli/mysqli.c:1.2 --- php4/ext/mysqli/mysqli.c:1.1Tue Feb 11 19:45:53 2003 +++ php4/ext/mysqli/mysqli.cFri Feb 14 11:31:22 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.1 2003/02/12 00:45:53 georg Exp $ + $Id: mysqli.c,v 1.2 2003/02/14 16:31:22 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -42,7 +42,7 @@ int i; - if (stmt-stmt) + if (stmt-stmt stmt-stmt-mysql-host) mysql_stmt_close(stmt-stmt); if (stmt-var_cnt) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_api.c
georg Fri Feb 14 11:31:51 2003 EDT Modified files: /php4/ext/mysqlimysqli_api.c Log: bind_result fix Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.4 php4/ext/mysqli/mysqli_api.c:1.5 --- php4/ext/mysqli/mysqli_api.c:1.4Thu Feb 13 12:15:22 2003 +++ php4/ext/mysqli/mysqli_api.cFri Feb 14 11:31:51 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.4 2003/02/13 17:15:22 edink Exp $ + $Id: mysqli_api.c,v 1.5 2003/02/14 16:31:51 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -282,12 +282,12 @@ case MYSQL_TYPE_LONGLONG: stmt-bind[ofs].type = IS_STRING; - stmt-bind[ofs].buflen = (stmt-stmt-fields) ? stmt-stmt-fields[ofs].length + 1 : 256; + stmt-bind[ofs].buflen = sizeof(my_ulonglong); stmt-bind[ofs].buffer = (char *)emalloc(stmt-bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG; bind[ofs].buffer = stmt-bind[ofs].buffer; bind[ofs].is_null = stmt-is_null[ofs]; - bind[ofs].buffer_length = stmt-bind[ofs].buflen - 1; + bind[ofs].buffer_length = stmt-bind[ofs].buflen; break; case MYSQL_TYPE_DATE: case MYSQL_TYPE_TIME: @@ -298,15 +298,16 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_TIMESTAMP: stmt-bind[ofs].type = IS_STRING; - stmt-bind[ofs].buflen = (stmt-stmt-fields) ? stmt-stmt-fields[ofs].length + 1: 256; + stmt-bind[ofs].buflen = (stmt-stmt-fields) ? +stmt-stmt-fields[ofs].length + 1: 250; stmt-bind[ofs].buffer = (char *)emalloc(stmt-bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_STRING; bind[ofs].buffer = stmt-bind[ofs].buffer; bind[ofs].is_null = stmt-is_null[ofs]; bind[ofs].buffer_length = stmt-bind[ofs].buflen; + bind[ofs].length = stmt-bind[ofs].buflen; break; } - bind[ofs].length = stmt-bind[ofs].buflen; +// bind[ofs].length = stmt-bind[ofs].buflen; } if (mysql_bind_result(stmt-stmt, bind)) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli php_mysqli.h
iliaa Fri Feb 14 11:45:31 2003 EDT Modified files: /php4/ext/mysqliphp_mysqli.h Log: Buncha Fixes. * Fixed a number of memory leaks. * Fixed some php_error_docref() calls that tried to print non-existent arguments. * Fixed some signed/unsigned problems. * Fixed the MYSQLI_FETCH_RESOURCE macro so that compilers do not complain about un-initialized variables. * CS fixes. Index: php4/ext/mysqli/php_mysqli.h diff -u php4/ext/mysqli/php_mysqli.h:1.3 php4/ext/mysqli/php_mysqli.h:1.4 --- php4/ext/mysqli/php_mysqli.h:1.3Wed Feb 12 19:11:17 2003 +++ php4/ext/mysqli/php_mysqli.hFri Feb 14 11:45:31 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: php_mysqli.h,v 1.3 2003/02/13 00:11:17 georg Exp $ + $Id: php_mysqli.h,v 1.4 2003/02/14 16:45:31 iliaa Exp $ */ #include mysql.h @@ -103,7 +103,7 @@ { \ mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\ if (!((__ptr) != (__type)intern-ptr)) {\ - php_error(E_WARNING, Couldn' fetch %s, intern-zo.ce-name);\ + php_error(E_WARNING, Couldn't fetch %s, intern-zo.ce-name);\ RETURN_NULL();\ }\ __ptr = (__type)intern-ptr; \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c php_mysqli.h
iliaa Fri Feb 14 11:49:09 2003 EDT Modified files: /php4/ext/mysqlimysqli.c mysqli_api.c mysqli_nonapi.c php_mysqli.h Log: Missing portion of the previous patch. Index: php4/ext/mysqli/mysqli.c diff -u php4/ext/mysqli/mysqli.c:1.2 php4/ext/mysqli/mysqli.c:1.3 --- php4/ext/mysqli/mysqli.c:1.2Fri Feb 14 11:31:22 2003 +++ php4/ext/mysqli/mysqli.cFri Feb 14 11:49:09 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.2 2003/02/14 16:31:22 georg Exp $ + $Id: mysqli.c,v 1.3 2003/02/14 16:49:09 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -27,6 +27,7 @@ #include php.h #include php_ini.h #include ext/standard/info.h +#include ext/standard/php_string.h #include php_mysqli.h @@ -38,16 +39,16 @@ static zend_object_handlers mysqli_object_handlers; /* {{{ php_clear_stmt_bind */ -void php_clear_stmt_bind(STMT *stmt) { - int i; - +void php_clear_stmt_bind(STMT *stmt) +{ + unsigned int i; - if (stmt-stmt stmt-stmt-mysql-host) + if (stmt-stmt stmt-stmt-mysql-host) { mysql_stmt_close(stmt-stmt); + } if (stmt-var_cnt) { - - for (i=0; i stmt-var_cnt; i++) { + for (i = 0; i stmt-var_cnt; i++) { if (stmt-type == FETCH_RESULT) { if (stmt-bind[i].type == IS_STRING) { efree(stmt-bind[i].buffer); @@ -80,16 +81,12 @@ if (mysql) { mysql_close(mysql); } - } - /* stmt object */ - else if (intern-zo.ce == mysqli_stmt_class_entry) { + } else if (intern-zo.ce == mysqli_stmt_class_entry) { /* stmt object */ STMT *stmt = (STMT *)intern-ptr; if (stmt) { php_clear_stmt_bind(stmt); } - } - /* result object */ - else if (intern-zo.ce == mysqli_result_class_entry) { + } else if (intern-zo.ce == mysqli_result_class_entry) { /* result object */ MYSQL_RES *res = (MYSQL_RES *)intern-ptr; if (res) { mysql_free_result(res); @@ -300,6 +297,9 @@ */ PHP_RINIT_FUNCTION(mysqli) { + MyG(error_msg) = NULL; + MyG(error_no) = 0; + return SUCCESS; } /* }}} */ @@ -309,6 +309,10 @@ */ PHP_RSHUTDOWN_FUNCTION(mysqli) { + if (MyG(error_msg)) { + efree(MyG(error_msg)); + } + return SUCCESS; } /* }}} */ @@ -335,7 +339,7 @@ { MYSQL_RES *result; zval *mysql_result; - int fetchtype; + int fetchtype; int copyflag, i; MYSQL_FIELD *fields; MYSQL_ROW row; @@ -355,25 +359,22 @@ MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, mysqli_result); - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); fields = mysql_fetch_fields(result); row = mysql_fetch_row(result); field_len = mysql_fetch_lengths(result); - for (i=0; i mysql_num_fields(result); i++){ + for (i = 0; i mysql_num_fields(result); i++) { if (row[i]) { char*column; - int column_len; + int column_len; /* check if we need magic quotes */ if (PG(magic_quotes_runtime)) { column = php_addslashes(row[i], field_len[i], column_len, 0 TSRMLS_CC); copyflag = 0; - } - else { + } else { column = row[i]; column_len = field_len[i]; copyflag = 1; @@ -385,9 +386,7 @@ if (fetchtype MYSQLI_ASSOC) { add_assoc_stringl(return_value, fields[i].name, column, column_len, copyflag); } - - } - else { + } else { if (fetchtype MYSQLI_NUM) { add_index_null(return_value, i); } @@ -396,6 +395,18 @@ } } } +} +/* }}} */ + +/* {{{ php_mysqli_set_error + */ +PHP_MYSQLI_API void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRMLS_DC) +{ + MyG(error_no) = mysql_errno; + if (MyG(error_msg)) { + efree(MyG(error_msg)); + } + MyG(error_msg) = estrdup(mysql_err); } /* }}} */ Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.5
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_api.c
georg Fri Feb 14 13:17:25 2003 EDT Modified files: /php4/ext/mysqlimysqli_api.c Log: fixed a bug in mysqli_fetch removed c++ comment (thx to Jani :) fixed compiler warning Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.6 php4/ext/mysqli/mysqli_api.c:1.7 --- php4/ext/mysqli/mysqli_api.c:1.6Fri Feb 14 11:49:09 2003 +++ php4/ext/mysqli/mysqli_api.cFri Feb 14 13:17:25 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.6 2003/02/14 16:49:09 iliaa Exp $ + $Id: mysqli_api.c,v 1.7 2003/02/14 18:17:25 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -282,6 +282,8 @@ case MYSQL_TYPE_LONGLONG: stmt-bind[ofs].type = IS_STRING; + + /* TODO: change and check buflen when bug #74 is fixed +*/ stmt-bind[ofs].buflen = sizeof(my_ulonglong); stmt-bind[ofs].buffer = (char *)emalloc(stmt-bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG; @@ -298,7 +300,7 @@ case MYSQL_TYPE_BLOB: case MYSQL_TYPE_TIMESTAMP: stmt-bind[ofs].type = IS_STRING; - stmt-bind[ofs].buflen = (stmt-stmt-fields) ? stmt-stmt-fields[ofs].length + 1: 250; + stmt-bind[ofs].buflen = (stmt-stmt-fields) ? +stmt-stmt-fields[ofs].length + 1: 256; stmt-bind[ofs].buffer = (char *)emalloc(stmt-bind[ofs].buflen); bind[ofs].buffer_type = MYSQL_TYPE_STRING; bind[ofs].buffer = stmt-bind[ofs].buffer; @@ -307,7 +309,6 @@ bind[ofs].length = stmt-bind[ofs].buflen; break; } -// bind[ofs].length = stmt-bind[ofs].buflen; } if (mysql_bind_result(stmt-stmt, bind)) { @@ -598,7 +599,7 @@ } /* }}} */ -/* {{{ proto bool mysqli_fetch(resource stmt) +/* {{{ proto int mysqli_fetch(resource stmt) */ PHP_FUNCTION(mysqli_fetch) { @@ -622,39 +623,38 @@ } if (!(ret = mysql_fetch(stmt-stmt))) { - RETURN_FALSE; - } - for (i = 0; i stmt-var_cnt; i++) { - if (!stmt-is_null[i]) { - switch (stmt-bind[i].type) { - case IS_LONG: - stmt-vars[i]-type = IS_LONG; - break; - case IS_DOUBLE: - stmt-vars[i]-type = IS_DOUBLE; - break; - case IS_STRING: - if (stmt-stmt-bind[i].buffer_type == MYSQL_TYPE_LONGLONG) { - char tmp[50]; - my_ulonglong lval; - memcpy (lval, stmt-bind[i].buffer, sizeof(my_ulonglong)); - if (lval != (long)lval) { - sprintf((char *)tmp, %lld, lval); - ZVAL_STRING(stmt-vars[i], tmp, 1); + for (i = 0; i stmt-var_cnt; i++) { + if (!stmt-is_null[i]) { + switch (stmt-bind[i].type) { + case IS_LONG: + stmt-vars[i]-type = IS_LONG; + break; + case IS_DOUBLE: + stmt-vars[i]-type = IS_DOUBLE; + break; + case IS_STRING: + if (stmt-stmt-bind[i].buffer_type == +MYSQL_TYPE_LONGLONG) { + char tmp[50]; + my_ulonglong lval; + memcpy (lval, +stmt-bind[i].buffer, sizeof(my_ulonglong)); + if (lval != (long)lval) { + sprintf((char *)tmp, +%lld, lval); + +ZVAL_STRING(stmt-vars[i], tmp, 1); + } else { +
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_nonapi.c
georg Fri Feb 14 13:18:12 2003 EDT Modified files: /php4/ext/mysqlimysqli_nonapi.c Log: fixed compiler warning Index: php4/ext/mysqli/mysqli_nonapi.c diff -u php4/ext/mysqli/mysqli_nonapi.c:1.2 php4/ext/mysqli/mysqli_nonapi.c:1.3 --- php4/ext/mysqli/mysqli_nonapi.c:1.2 Fri Feb 14 11:49:09 2003 +++ php4/ext/mysqli/mysqli_nonapi.c Fri Feb 14 13:18:12 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_nonapi.c,v 1.2 2003/02/14 16:49:09 iliaa Exp $ + $Id: mysqli_nonapi.c,v 1.3 2003/02/14 18:18:12 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -60,7 +60,7 @@ if (mysql_real_connect(mysql,hostname,username,passwd,dbname,port,socket,0) == NULL) { /* Save error messages */ - php_mysqli_set_error(mysql_errno(mysql), mysql_error(mysql) TSRMLS_CC); + php_mysqli_set_error(mysql_errno(mysql), (char *mysql_error(mysql) +TSRMLS_CC); php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, mysql_error(mysql)); /* free mysql structure */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_nonapi.c
iliaa Fri Feb 14 13:27:20 2003 EDT Modified files: /php4/ext/mysqlimysqli_nonapi.c Log: Fixed a typo. Index: php4/ext/mysqli/mysqli_nonapi.c diff -u php4/ext/mysqli/mysqli_nonapi.c:1.3 php4/ext/mysqli/mysqli_nonapi.c:1.4 --- php4/ext/mysqli/mysqli_nonapi.c:1.3 Fri Feb 14 13:18:12 2003 +++ php4/ext/mysqli/mysqli_nonapi.c Fri Feb 14 13:27:20 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_nonapi.c,v 1.3 2003/02/14 18:18:12 georg Exp $ + $Id: mysqli_nonapi.c,v 1.4 2003/02/14 18:27:20 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -60,7 +60,8 @@ if (mysql_real_connect(mysql,hostname,username,passwd,dbname,port,socket,0) == NULL) { /* Save error messages */ - php_mysqli_set_error(mysql_errno(mysql), (char *mysql_error(mysql) TSRMLS_CC); + + php_mysqli_set_error(mysql_errno(mysql), (char *) mysql_error(mysql) +TSRMLS_CC); php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, mysql_error(mysql)); /* free mysql structure */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli_api.c
iliaa Fri Feb 14 13:35:30 2003 EDT Modified files: /php4/ext/mysqlimysqli_api.c Log: CS fixes. Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.7 php4/ext/mysqli/mysqli_api.c:1.8 --- php4/ext/mysqli/mysqli_api.c:1.7Fri Feb 14 13:17:25 2003 +++ php4/ext/mysqli/mysqli_api.cFri Feb 14 13:35:30 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.7 2003/02/14 18:17:25 georg Exp $ + $Id: mysqli_api.c,v 1.8 2003/02/14 18:35:30 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -100,8 +100,7 @@ } MYSQLI_FETCH_RESOURCE(stmt, STMT *, args[0], mysqli_stmt); start = 1; - } - else { + } else { object = (getThis()); MYSQLI_FETCH_RESOURCE(stmt, STMT *, object, mysqli_stmt); } @@ -434,7 +433,7 @@ PHP_FUNCTION(mysqli_debug) { char*debug; - int debug_len; + int debug_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, debug, debug_len) == FAILURE) { return; @@ -546,7 +545,7 @@ PHP_FUNCTION(mysqli_error) { MYSQL *mysql; - zval*mysql_link; + zval *mysql_link; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, mysql_link, mysqli_link_class_entry) == FAILURE) { return; @@ -962,7 +961,7 @@ { MYSQL *mysql; char *info = NULL; - zval*mysql_link = NULL; + zval *mysql_link = NULL; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, mysql_link, mysqli_link_class_entry) == FAILURE) { return; @@ -1277,7 +1276,8 @@ /* {{{ proto bool mysqli_real_query(resource link, string query) */ -PHP_FUNCTION(mysqli_real_query) { +PHP_FUNCTION(mysqli_real_query) +{ MYSQL *mysql; zval*mysql_link; char*query = NULL; @@ -1350,7 +1350,8 @@ /* {{{ proto int mysqli_rpl_parse_enabled(resource link) */ -PHP_FUNCTION(mysqli_rpl_parse_enabled) { +PHP_FUNCTION(mysqli_rpl_parse_enabled) +{ MYSQL *mysql; zval *mysql_link; @@ -1365,7 +1366,8 @@ /* {{{ proto bool mysqli_rpl_probe(resource link) */ -PHP_FUNCTION(mysqli_rpl_probe) { +PHP_FUNCTION(mysqli_rpl_probe) +{ MYSQL *mysql; zval *mysql_link; @@ -1384,11 +1386,12 @@ /* {{{ proto int mysqli_rpl_query_type(string query) */ -PHP_FUNCTION(mysqli_rpl_query_type) { +PHP_FUNCTION(mysqli_rpl_query_type) +{ MYSQL *mysql; zval*mysql_link; char*query; - int query_len; + int query_len; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os, mysql_link, mysqli_link_class_entry, query, query_len) == FAILURE) { return; @@ -1429,7 +1432,8 @@ /* {{{ proto bool mysqli_send_query(resource link, string query) */ -PHP_FUNCTION(mysqli_send_query) { +PHP_FUNCTION(mysqli_send_query) +{ MYSQL *mysql; zval*mysql_link; char*query = NULL; @@ -1449,7 +1453,8 @@ /* {{{ proto bool mysqli_slave_query(resource link, string query) */ -PHP_FUNCTION(mysqli_slave_query) { +PHP_FUNCTION(mysqli_slave_query) +{ MYSQL *mysql; zval*mysql_link; char*query = NULL; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard string.c /ext/standard/tests/strings bug22224.phpt
moriyoshi Fri Feb 14 13:42:36 2003 EDT Added files: /php4/ext/standard/tests/stringsbug4.phpt Modified files: /php4/ext/standard string.c Log: Fixed bug #4 (implode changes object references in array) Added test case for the bug Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.356 php4/ext/standard/string.c:1.357 --- php4/ext/standard/string.c:1.356Tue Feb 11 17:47:25 2003 +++ php4/ext/standard/string.c Fri Feb 14 13:42:36 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.356 2003/02/11 22:47:25 iliaa Exp $ */ +/* $Id: string.c,v 1.357 2003/02/14 18:42:36 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -835,7 +835,8 @@ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(arr), pos); while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **) tmp, pos) == SUCCESS) { - convert_to_string_ex(tmp); + SEPARATE_ZVAL(tmp); + convert_to_string(*tmp); smart_str_appendl(implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); if (++i != numelems) { Index: php4/ext/standard/tests/strings/bug4.phpt +++ php4/ext/standard/tests/strings/bug4.phpt --TEST-- Bug #4 (implode changes object references in array) --INI-- error_reporting=0 --FILE-- ?php class foo { } $a = new foo(); $arr = array(0=$a, 1=$a); var_dump(implode(,,$arr)); var_dump($arr) ? --EXPECT-- string(13) Object,Object array(2) { [0]= object(foo)(0) { } [1]= object(foo)(0) { } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c /ext/standard/tests/strings bug22224.phpt
moriyoshi Fri Feb 14 13:44:51 2003 EDT Added files: (Branch: PHP_4_3) /php4/ext/standard/tests/stringsbug4.phpt Modified files: /php4/ext/standard string.c Log: MFH(r1.357): Fixed bug #4 MFH: Added test case for the bug Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.12 php4/ext/standard/string.c:1.333.2.13 --- php4/ext/standard/string.c:1.333.2.12 Mon Feb 10 14:37:27 2003 +++ php4/ext/standard/string.c Fri Feb 14 13:44:50 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333.2.12 2003/02/10 19:37:27 pollita Exp $ */ +/* $Id: string.c,v 1.333.2.13 2003/02/14 18:44:50 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -836,7 +836,8 @@ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **) tmp, pos) == SUCCESS) { - convert_to_string_ex(tmp); + SEPARATE_ZVAL(tmp); + convert_to_string(tmp); smart_str_appendl(implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); if (++i != numelems) { Index: php4/ext/standard/tests/strings/bug4.phpt +++ php4/ext/standard/tests/strings/bug4.phpt --TEST-- Bug #4 (implode changes object references in array) --INI-- error_reporting=0 --FILE-- ?php class foo { } $a = new foo(); $arr = array(0=$a, 1=$a); var_dump(implode(,,$arr)); var_dump($arr) ? --EXPECT-- string(13) Object,Object array(2) { [0]= object(foo)(0) { } [1]= object(foo)(0) { } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard string.c
moriyoshi Fri Feb 14 13:59:51 2003 EDT Modified files: /php4/ext/standard string.c Log: Fixed a str_replace() bug similar to bug #4 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.357 php4/ext/standard/string.c:1.358 --- php4/ext/standard/string.c:1.357Fri Feb 14 13:42:36 2003 +++ php4/ext/standard/string.c Fri Feb 14 13:59:50 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.357 2003/02/14 18:42:36 moriyoshi Exp $ */ +/* $Id: string.c,v 1.358 2003/02/14 18:59:50 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2865,7 +2865,8 @@ /* For each entry in the search array, get the entry */ while (zend_hash_get_current_data(Z_ARRVAL_P(search), (void **) search_entry) == SUCCESS) { /* Make sure we're dealing with strings. */ - convert_to_string_ex(search_entry); + SEPARATE_ZVAL(search_entry); + convert_to_string(*search_entry); if (Z_STRLEN_PP(search_entry) == 0) { zend_hash_move_forward(Z_ARRVAL_P(search)); continue; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c
moriyoshi Fri Feb 14 14:00:44 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard string.c Log: MFH(r1.358): Fixed a str_replace() bug similar to bug #4 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.13 php4/ext/standard/string.c:1.333.2.14 --- php4/ext/standard/string.c:1.333.2.13 Fri Feb 14 13:44:50 2003 +++ php4/ext/standard/string.c Fri Feb 14 14:00:43 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333.2.13 2003/02/14 18:44:50 moriyoshi Exp $ */ +/* $Id: string.c,v 1.333.2.14 2003/02/14 19:00:43 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2621,7 +2621,8 @@ /* For each entry in the search array, get the entry */ while (zend_hash_get_current_data(Z_ARRVAL_P(search), (void **) search_entry) == SUCCESS) { /* Make sure we're dealing with strings. */ - convert_to_string_ex(search_entry); + SEPARATE_ZVAL(search_entry); + convert_to_string(*search_entry); if (Z_STRLEN_PP(search_entry) == 0) { zend_hash_move_forward(Z_ARRVAL_P(search)); continue; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard string.c
moriyoshi Fri Feb 14 14:07:38 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard string.c Log: Fixed wrong commit: s//*/ Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.333.2.14 php4/ext/standard/string.c:1.333.2.15 --- php4/ext/standard/string.c:1.333.2.14 Fri Feb 14 14:00:43 2003 +++ php4/ext/standard/string.c Fri Feb 14 14:07:38 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.333.2.14 2003/02/14 19:00:43 moriyoshi Exp $ */ +/* $Id: string.c,v 1.333.2.15 2003/02/14 19:07:38 moriyoshi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -837,7 +837,7 @@ (void **) tmp, pos) == SUCCESS) { SEPARATE_ZVAL(tmp); - convert_to_string(tmp); + convert_to_string(*tmp); smart_str_appendl(implstr, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); if (++i != numelems) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard image.c
helly Fri Feb 14 14:43:07 2003 EDT Modified files: /php4/ext/standard image.c Log: a little bit slower but somewhat tricky and more flexible and it does not allocate static buffers anymore Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.90 php4/ext/standard/image.c:1.91 --- php4/ext/standard/image.c:1.90 Thu Feb 13 02:02:53 2003 +++ php4/ext/standard/image.c Fri Feb 14 14:43:06 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.90 2003/02/13 07:02:53 sniper Exp $ */ +/* $Id: image.c,v 1.91 2003/02/14 19:43:06 helly Exp $ */ #include php.h #include stdio.h @@ -956,11 +956,10 @@ /* {{{ php_get_xbm */ -#define MAX_XBM_LINE_SIZE 255 static int php_get_xbm(php_stream *stream, struct gfxinfo **result TSRMLS_DC) { -char fline[MAX_XBM_LINE_SIZE]; -char iname[MAX_XBM_LINE_SIZE]; +char *fline; +char *iname; char *type; int value; unsigned int width = 0, height = 0; @@ -971,12 +970,8 @@ if (php_stream_rewind(stream)) { return 0; } - while (php_stream_gets(stream, fline, MAX_XBM_LINE_SIZE)) { - fline[MAX_XBM_LINE_SIZE-1] = '\0'; - if (strlen(fline) == MAX_XBM_LINE_SIZE-1) { - return 0; - } - + while ((fline=php_stream_gets(stream, NULL, 0)) != NULL) { + iname = estrdup(fline); /* simple way to get necessary buffer of +required size */ if (sscanf(fline, #define %s %d, iname, value) == 2) { if (!(type = strrchr(iname, '_'))) { type = iname; @@ -987,16 +982,23 @@ if (!strcmp(width, type)) { width = (unsigned int) value; if (height) { + efree(iname); break; } } if (!strcmp(height, type)) { height = (unsigned int) value; if (width) { + efree(iname); break; } } } + efree(fline); + efree(iname); + } + if (fline) { + efree(fline); } if (width height) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
moriyoshi Fri Feb 14 14:44:03 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: BFN Index: php4/NEWS diff -u php4/NEWS:1.1247.2.86 php4/NEWS:1.1247.2.87 --- php4/NEWS:1.1247.2.86 Thu Feb 13 15:08:52 2003 +++ php4/NEWS Fri Feb 14 14:44:02 2003 @@ -20,6 +20,7 @@ - Added improved JPEG 2000 support for getimagesize(). (Marcus, Adam Wright) - Added XBM and WBMP support for getimagesize(). (Marcus) - Fixed several errors in hwapi extension. Objects weren't handled properly. (Uwe) +- Fixed bug #4 (implode() changes object references in array). (Moriyoshi) - Fixed bug #22207 (e notation in *printf would be missing a 0 when there is no exponent). (Ilia) - Fixed bug #22191 (frontbase build broken with old version of frontbase). (Ilia) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard image.c
helly Fri Feb 14 14:46:21 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard image.c Log: MFH: xbm improvements Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.72.2.9 php4/ext/standard/image.c:1.72.2.10 --- php4/ext/standard/image.c:1.72.2.9 Thu Feb 13 02:16:55 2003 +++ php4/ext/standard/image.c Fri Feb 14 14:46:21 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.72.2.9 2003/02/13 07:16:55 sniper Exp $ */ +/* $Id: image.c,v 1.72.2.10 2003/02/14 19:46:21 helly Exp $ */ #include php.h #include stdio.h @@ -956,11 +956,10 @@ /* {{{ php_get_xbm */ -#define MAX_XBM_LINE_SIZE 255 static int php_get_xbm(php_stream *stream, struct gfxinfo **result TSRMLS_DC) { -char fline[MAX_XBM_LINE_SIZE]; -char iname[MAX_XBM_LINE_SIZE]; +char *fline; +char *iname; char *type; int value; unsigned int width = 0, height = 0; @@ -971,12 +970,8 @@ if (php_stream_rewind(stream)) { return 0; } - while (php_stream_gets(stream, fline, MAX_XBM_LINE_SIZE)) { - fline[MAX_XBM_LINE_SIZE-1] = '\0'; - if (strlen(fline) == MAX_XBM_LINE_SIZE-1) { - return 0; - } - + while ((fline=php_stream_gets(stream, NULL, 0)) != NULL) { + iname = estrdup(fline); /* simple way to get necessary buffer of +required size */ if (sscanf(fline, #define %s %d, iname, value) == 2) { if (!(type = strrchr(iname, '_'))) { type = iname; @@ -987,16 +982,23 @@ if (!strcmp(width, type)) { width = (unsigned int) value; if (height) { + efree(iname); break; } } if (!strcmp(height, type)) { height = (unsigned int) value; if (width) { + efree(iname); break; } } } + efree(fline); + efree(iname); + } + if (fline) { + efree(fline); } if (width height) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
moriyoshi Fri Feb 14 14:48:57 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: Slight fix for consistency Index: php4/NEWS diff -u php4/NEWS:1.1247.2.87 php4/NEWS:1.1247.2.88 --- php4/NEWS:1.1247.2.87 Fri Feb 14 14:44:02 2003 +++ php4/NEWS Fri Feb 14 14:48:57 2003 @@ -12,7 +12,7 @@ - Added man page for CLI version of PHP. (Marcus) - Added --clean option into phpize. (Jani) - Added --ldflags option into php-config. (Jani) -- Added zlib_get_coding_type() function. Returns the coding type used for +- Added zlib_get_coding_type() function which returns the coding type used for output compression. (Moriyoshi) - Added OCIPasswordChange() which allows renewing expired Oracle users. (Maxim) - Added memory_get_usage(). Only available when PHP is configured with -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli/tests 045.phpt
georg Fri Feb 14 14:49:35 2003 EDT Added files: /php4/ext/mysqli/tests 045.phpt Log: test for bind_result with show Index: php4/ext/mysqli/tests/045.phpt +++ php4/ext/mysqli/tests/045.phpt --TEST-- mysqli_bind_result (SHOW) --FILE-- ?php include connect.inc; /*** test mysqli_connect 127.0.0.1 ***/ $link = mysqli_connect(localhost, $user, $passwd); $stmt = mysqli_prepare($link, SHOW VARIABLES LIKE 'port'); mysqli_execute($stmt); mysqli_bind_result($stmt, $c1, $c2); mysqli_fetch($stmt); mysqli_stmt_close($stmt); $test = array ($c1,$c2); var_dump($test); mysqli_close($link); ? --EXPECT-- array(2) { [0]= string(4) port [1]= string(4) 3306 } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli mysqli.c mysqli_api.c
iliaa Fri Feb 14 15:14:44 2003 EDT Modified files: /php4/ext/mysqlimysqli.c mysqli_api.c Log: Fixed compile warnings. Index: php4/ext/mysqli/mysqli.c diff -u php4/ext/mysqli/mysqli.c:1.3 php4/ext/mysqli/mysqli.c:1.4 --- php4/ext/mysqli/mysqli.c:1.3Fri Feb 14 11:49:09 2003 +++ php4/ext/mysqli/mysqli.cFri Feb 14 15:14:44 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.3 2003/02/14 16:49:09 iliaa Exp $ + $Id: mysqli.c,v 1.4 2003/02/14 20:14:44 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -340,7 +340,8 @@ MYSQL_RES *result; zval *mysql_result; int fetchtype; - int copyflag, i; + int copyflag; + unsigned int i; MYSQL_FIELD *fields; MYSQL_ROW row; unsigned long *field_len; Index: php4/ext/mysqli/mysqli_api.c diff -u php4/ext/mysqli/mysqli_api.c:1.8 php4/ext/mysqli/mysqli_api.c:1.9 --- php4/ext/mysqli/mysqli_api.c:1.8Fri Feb 14 13:35:30 2003 +++ php4/ext/mysqli/mysqli_api.cFri Feb 14 15:14:44 2003 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.8 2003/02/14 18:35:30 iliaa Exp $ + $Id: mysqli_api.c,v 1.9 2003/02/14 20:14:44 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -60,7 +60,7 @@ } MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link); - RETURN_BOOL(mysql_autocommit(mysql, automode)); + RETURN_BOOL((long) mysql_autocommit(mysql, automode)); } /* }}} */ @@ -440,7 +440,7 @@ } mysql_debug(debug); - return; + RETURN_TRUE; } /* }}} */ @@ -455,7 +455,8 @@ return; } MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link); - return (mysql_disable_reads_from_master(mysql)); + mysql_disable_reads_from_master(mysql); + RETURN_TRUE; } /* }}} */ @@ -470,7 +471,8 @@ return; } MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link); - return (mysql_disable_rpl_parse(mysql)); + mysql_disable_rpl_parse(mysql); + RETURN_TRUE; } /* }}} */ @@ -505,7 +507,8 @@ } MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link); - return (mysql_enable_reads_from_master(mysql)); + mysql_enable_reads_from_master(mysql); + RETURN_TRUE; } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/mysqli php_mysqli.h
iliaa Fri Feb 14 16:27:13 2003 EDT Modified files: /php4/ext/mysqliphp_mysqli.h Log: Allow mysqli to be built when imap (c-client) is used. Index: php4/ext/mysqli/php_mysqli.h diff -u php4/ext/mysqli/php_mysqli.h:1.5 php4/ext/mysqli/php_mysqli.h:1.6 --- php4/ext/mysqli/php_mysqli.h:1.5Fri Feb 14 11:49:09 2003 +++ php4/ext/mysqli/php_mysqli.hFri Feb 14 16:27:13 2003 @@ -15,8 +15,15 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: php_mysqli.h,v 1.5 2003/02/14 16:49:09 iliaa Exp $ + $Id: php_mysqli.h,v 1.6 2003/02/14 21:27:13 iliaa Exp $ */ + +/* A little hack to prevent build break, when mysql is used together with + * c-client, which also defines LIST. + */ +#ifdef LIST +#undef LIST +#endif #include mysql.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) /sapi/apache2handler .cvsignore CREDITS README apache_config.c config.m4 php.sym php4apache2.dsp php_apache.h php_functions.c sapi_apache2.c
ianhSat Feb 15 00:49:31 2003 EDT Added files: (Branch: PHP_4_3) /php4/sapi/apache2handler .cvsignore CREDITS README apache_config.c config.m4 php.sym php4apache2.dsp php_apache.h php_functions.c sapi_apache2.c Log: alternate apache2 SAPI. Index: php4/sapi/apache2handler/.cvsignore +++ php4/sapi/apache2handler/.cvsignore libphp4.module *.la *.lo deps *.plg *.opt *.ncb Release Release_inline Debug Release_TS Release_TSDbg Release_TS_inline Debug_TS Index: php4/sapi/apache2handler/apache_config.c +++ php4/sapi/apache2handler/apache_config.c /* +--+ | PHP Version 4| +--+ | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| | available at through the world-wide-web at | | http://www.php.net/license/2_02.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 | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ | Author: Sascha Schumann [EMAIL PROTECTED] | +--+ */ /* $Id: apache_config.c,v 1.1 2003/02/11 17:40:11 ianh Exp $ */ #include php.h #include php_ini.h #include php_apache.h #include apr_strings.h #include ap_config.h #include util_filter.h #include httpd.h #include http_config.h #include http_request.h #include http_core.h #include http_protocol.h #include http_log.h #include http_main.h #include util_script.h #include http_core.h #ifdef PHP_AP_DEBUG #define phpapdebug(a) fprintf a #else #define phpapdebug(a) #endif typedef struct { HashTable config; } php_conf_rec; typedef struct { char *value; size_t value_len; char status; } php_dir_entry; static const char *real_value_hnd(cmd_parms *cmd, void *dummy, const char *name, const char *value, int status) { php_conf_rec *d = dummy; php_dir_entry e; phpapdebug((stderr, Getting %s=%s for %p (%d)\n, name, value, dummy, zend_hash_num_elements(d-config))); if (!strncasecmp(value, none, sizeof(none))) { value = ; } e.value = apr_pstrdup(cmd-pool, value); e.value_len = strlen(value); e.status = status; zend_hash_update(d-config, (char *) name, strlen(name) + 1, e, sizeof(e), NULL); return NULL; } static const char *php_apache_value_handler(cmd_parms *cmd, void *dummy, const char *name, const char *value) { return real_value_hnd(cmd, dummy, name, value, PHP_INI_PERDIR); } static const char *php_apache_admin_value_handler(cmd_parms *cmd, void *dummy, const char *name, const char *value) { return real_value_hnd(cmd, dummy, name, value, PHP_INI_SYSTEM); } static const char *real_flag_hnd(cmd_parms *cmd, void *dummy, const char *arg1, const char *arg2, int status) { char bool_val[2]; if (!strcasecmp(arg2, On) || (arg2[0] == '1' arg2[1] == '\0')) { bool_val[0] = '1'; } else { bool_val[0] = '0'; } bool_val[1] = 0; return real_value_hnd(cmd, dummy, arg1, bool_val, status); } static const char *php_apache_flag_handler(cmd_parms *cmd, void *dummy, const char *name, const char *value) { return real_flag_hnd(cmd, dummy, name, value, PHP_INI_PERDIR); } static const char *php_apache_admin_flag_handler(cmd_parms *cmd, void *dummy, const char *name, const char *value) { return real_flag_hnd(cmd, dummy, name, value, PHP_INI_SYSTEM); } static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig, const char *arg) { if (apache2_php_ini_path_override) { return Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored; } apache2_php_ini_path_override = ap_server_root_relative(cmd-pool, arg); return NULL; } void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf) { php_conf_rec *d = base_conf, *e = new_conf;
[PHP-CVS] cvs: php4 /ext/mysqli/tests .cvsignore
sebastian Sat Feb 15 02:12:09 2003 EDT Added files: /php4/ext/mysqli/tests .cvsignore Log: Add .cvsignore for tests. Index: php4/ext/mysqli/tests/.cvsignore +++ php4/ext/mysqli/tests/.cvsignore phpt.* *.diff *.log *.exp *.out *.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php