[PHP-CVS] cvs: php4 /ext/standard dir.c
elixer Mon Apr 9 13:56:49 2001 EDT Modified files: /php4/ext/standard dir.c Log: Stop SIGSEGV on Apache startup. Patch from [EMAIL PROTECTED] Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.59 php4/ext/standard/dir.c:1.60 --- php4/ext/standard/dir.c:1.59Sun Apr 8 14:57:13 2001 +++ php4/ext/standard/dir.c Mon Apr 9 13:56:49 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dir.c,v 1.59 2001/04/08 21:57:13 ssb Exp $ */ +/* $Id: dir.c,v 1.60 2001/04/09 20:56:49 elixer Exp $ */ /* {{{ includes/startup/misc */ @@ -141,7 +141,7 @@ #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; -REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, 0); +REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_PERSISTENT); return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard dir.c
elixer Mon Apr 9 14:12:54 2001 EDT Modified files: /php4/ext/standard dir.c Log: Constand should be case sensitive. # Thanks Sterling Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.61 php4/ext/standard/dir.c:1.62 --- php4/ext/standard/dir.c:1.61Mon Apr 9 14:08:47 2001 +++ php4/ext/standard/dir.c Mon Apr 9 14:12:54 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dir.c,v 1.61 2001/04/09 21:08:47 jon Exp $ */ +/* $Id: dir.c,v 1.62 2001/04/09 21:12:54 elixer Exp $ */ /* {{{ includes/startup/misc */ @@ -141,7 +141,7 @@ #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; - REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("DIRECTORY_SEPARATOR", tmpstr, +CONST_CS|CONST_PERSISTENT); return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/skeleton skeleton.c
elixer Fri Apr 6 07:42:07 2001 EDT Modified files: /php4/ext/skeleton skeleton.c Log: Fixed possible overflow. Index: php4/ext/skeleton/skeleton.c diff -u php4/ext/skeleton/skeleton.c:1.11 php4/ext/skeleton/skeleton.c:1.12 --- php4/ext/skeleton/skeleton.c:1.11 Fri Dec 1 06:56:30 2000 +++ php4/ext/skeleton/skeleton.cFri Apr 6 07:42:06 2001 @@ -97,7 +97,7 @@ convert_to_string_ex(arg); - len = sprintf(string, "Congratulations, you have successfully modified ext/extname/config.m4, module %s is compiled into PHP", Z_STRVAL_PP(arg)); + len = sprintf(string, "Congratulations, you have successfully modified +ext/%.80s/config.m4, module %.80s is compiled into PHP", "extname", Z_STRVAL_PP(arg)); RETURN_STRINGL(string, len, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/skeleton skeleton.c
elixer Fri Apr 6 10:48:34 2001 EDT Modified files: /php4/ext/skeleton skeleton.c Log: Fixed possible overflow again. # Heh... Index: php4/ext/skeleton/skeleton.c diff -u php4/ext/skeleton/skeleton.c:1.13 php4/ext/skeleton/skeleton.c:1.14 --- php4/ext/skeleton/skeleton.c:1.13 Fri Apr 6 09:04:25 2001 +++ php4/ext/skeleton/skeleton.cFri Apr 6 10:48:34 2001 @@ -97,7 +97,7 @@ convert_to_string_ex(arg); - len = sprintf(string, "Congratulations! You have successfully modified ext/%.80s/config.m4. Module %.80s is now compiled into PHP.", "extname", Z_STRVAL_PP(arg)); + len = sprintf(string, "Congratulations! You have successfully modified +ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "extname", +Z_STRVAL_PP(arg)); RETURN_STRINGL(string, len, 1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c
elixer Thu Mar 22 06:43:50 2001 EDT Modified files: /php4/ext/standard basic_functions.c Log: Fixed prototype. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.319 php4/ext/standard/basic_functions.c:1.320 --- php4/ext/standard/basic_functions.c:1.319 Wed Mar 21 05:53:38 2001 +++ php4/ext/standard/basic_functions.c Thu Mar 22 06:43:48 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.319 2001/03/21 13:53:38 elixer Exp $ */ +/* $Id: basic_functions.c,v 1.320 2001/03/22 14:43:48 elixer Exp $ */ #include "php.h" #include "php_main.h" @@ -919,7 +919,7 @@ /* }}} */ -/* {{{ proto int ip2long(string ip_address) +/* {{{ proto string ip2long(string ip_address) Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */ PHP_FUNCTION(ip2long) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h
You may want to remove the C++ comments "//" and replace with with "/* */" comments. ""Marc Boeren"" [EMAIL PROTECTED] wrote in message cvsmboeren985259224@cvsserver">news:cvsmboeren985259224@cvsserver... mboeren Thu Mar 22 03:07:04 2001 EDT Added files: /php4/ext/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h Log: Added dbx module (database abstraction) to the repositorty (/ext/dbx). Compiles under Linux (--enable-dbx) and Windows. Supports MySQL and ODBC modules (more to be added later). @ Added dbx module (database abstraction) to the repository. (Marc) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard basic_functions.c
elixer Wed Mar 21 05:53:39 2001 EDT Modified files: /php4/ext/standard basic_functions.c Log: Fix for bug #9698. # Anyone that can think of a way to fix long2ip(), feel free. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.318 php4/ext/standard/basic_functions.c:1.319 --- php4/ext/standard/basic_functions.c:1.318 Mon Mar 19 13:20:02 2001 +++ php4/ext/standard/basic_functions.c Wed Mar 21 05:53:38 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.318 2001/03/19 21:20:02 andrei Exp $ */ +/* $Id: basic_functions.c,v 1.319 2001/03/21 13:53:38 elixer Exp $ */ #include "php.h" #include "php_main.h" @@ -924,6 +924,7 @@ PHP_FUNCTION(ip2long) { zval **str; + char tmp_buff[16]; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, str) == FAILURE) { WRONG_PARAM_COUNT; @@ -931,7 +932,9 @@ convert_to_string_ex(str); - RETURN_LONG(ntohl(inet_addr(Z_STRVAL_PP(str; + sprintf(tmp_buff, "%u", ntohl(inet_addr(Z_STRVAL_PP(str; + + RETURN_STRING(tmp_buff,1); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
elixer Mon Mar 12 07:14:38 2001 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Fixed prototype. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.72 php4/ext/mysql/php_mysql.c:1.73 --- php4/ext/mysql/php_mysql.c:1.72 Sun Feb 25 22:07:04 2001 +++ php4/ext/mysql/php_mysql.c Mon Mar 12 07:14:38 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.72 2001/02/26 06:07:04 andi Exp $ */ +/* $Id: php_mysql.c,v 1.73 2001/03/12 15:14:38 elixer Exp $ */ /* TODO: @@ -705,7 +705,7 @@ #ifdef HAVE_GETINFO_FUNCS -/* {{{ proto string mysql_get_client_info([int link_identifier]) +/* {{{ proto string mysql_get_client_info(void) Returns a string that represents the client library version */ PHP_FUNCTION(mysql_get_client_info) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard file.c
elixer Mon Mar 5 20:34:06 2001 EDT Modified files: /php4/ext/standard file.c Log: get_meta_tags now allows attributes that are not quoted as well as those that are. It follows the HTML 4.01 specification for attribute values outlined here - http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.145 php4/ext/standard/file.c:1.146 --- php4/ext/standard/file.c:1.145 Sun Mar 4 16:20:41 2001 +++ php4/ext/standard/file.cMon Mar 5 20:34:05 2001 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: file.c,v 1.145 2001/03/05 00:20:41 elixer Exp $ */ +/* $Id: file.c,v 1.146 2001/03/06 04:34:05 elixer Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -253,6 +253,9 @@ } /* }}} */ + +#define PHP_META_UNSAFE ".\\+*?[^]$() " + /* {{{ proto array get_meta_tags(string filename [, int use_include_path]) Extracts all meta tag content attributes from a file and returns an array */ @@ -319,6 +322,31 @@ /* We are done here! */ done = 1; } + } else if (tok_last == TOK_EQUAL looking_for_val) { + + if (!num_parts) { + /* This is a single word attribute */ + temp = name = estrndup(token_data,token_len); + + while (temp *temp) { + if (strchr(PHP_META_UNSAFE, *temp)) { + *temp = '_'; + } + temp++; + } + num_parts++; + } else { + if (PG(magic_quotes_runtime)) { + value = +php_addslashes(token_data,0,token_len,0); + } else { + value = estrndup(token_data,token_len); + } + + /* Insert the value into the array */ + add_assoc_string(return_value, name, value, 0); + num_parts = 0; + } + looking_for_val = 0; } else { if (in_meta_tag) { if (strcasecmp("name",token_data) == 0 || strcasecmp("content",token_data) == 0) { @@ -333,7 +361,7 @@ /* First, get the name value and store it */ temp = name = estrndup(token_data,token_len); while (temp *temp) { - if (strchr(".\\+*?[^]$() ",*temp)) { + if (strchr(PHP_META_UNSAFE, *temp)) { *temp = '_'; } temp++; @@ -2096,6 +2124,9 @@ return len; } +/* See http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 */ +#define PHP_META_HTML402_CHARS "-_.:" + /* Tokenizes an HTML file for get_meta_tags */ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *use_last_char, int *last_char, char **data, int *datalen) { int ch, compliment; @@ -2150,10 +2181,13 @@ return TOK_SPACE; break; default: -if (isalpha(ch)) { +if (isalnum(ch)) { *datalen = 0; buff[(*datalen)++] = ch; - while (!FP_FEOF(socketd,fp,issock) (ch = FP_FGETC(socketd,fp,issock)) (isalpha(ch) || ch == '-')) { + while (!FP_FEOF(socketd,fp,issock) + (ch = FP_FGETC(socketd,fp,issock)) + (isalnum(ch) || +strchr(PHP_META_HTML402_CHARS,ch))) { + buff[(*datalen)++] = ch; if (*datalen == META_DEF_BUFSIZE) @@ -2186,3 +2220,5 @@ * c-basic-offset: 4 * End: */ + + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard file.c
elixer Sun Mar 4 16:20:41 2001 EDT Modified files: /php4/ext/standard file.c Log: get_meta_tags now handles single quoted attributes as well as those that are double quoted. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.144 php4/ext/standard/file.c:1.145 --- php4/ext/standard/file.c:1.144 Sun Feb 25 22:07:17 2001 +++ php4/ext/standard/file.cSun Mar 4 16:20:41 2001 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: file.c,v 1.144 2001/02/26 06:07:17 andi Exp $ */ +/* $Id: file.c,v 1.145 2001/03/05 00:20:41 elixer Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2098,7 +2098,7 @@ /* Tokenizes an HTML file for get_meta_tags */ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *use_last_char, int *last_char, char **data, int *datalen) { - int ch; + int ch, compliment; char buff[META_DEF_BUFSIZE + 1]; memset((void *)buff,0,META_DEF_BUFSIZE + 1); @@ -2126,9 +2126,11 @@ case '/': return TOK_SLASH; break; +case '\'': case '"': +compliment = ch; *datalen = 0; -while (!FP_FEOF(socketd,fp,issock) (ch = FP_FGETC(socketd,fp,issock)) ch != '"') { +while (!FP_FEOF(socketd,fp,issock) (ch = FP_FGETC(socketd,fp,issock)) + ch != compliment) { buff[(*datalen)++] = ch; if (*datalen == META_DEF_BUFSIZE) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / NEWS
elixer Sun Feb 11 06:38:25 2001 EDT Modified files: /php4 NEWS Log: Added note about get_meta_tags bugfix Index: php4/NEWS diff -u php4/NEWS:1.586 php4/NEWS:1.587 --- php4/NEWS:1.586 Wed Feb 7 06:10:13 2001 +++ php4/NEWS Sun Feb 11 06:38:25 2001 @@ -2,6 +2,7 @@ ||| ?? ??? 200?, Version 4.0.5 +- Fixed get_meta_tags() multiline bug #4556 (Sean) - Prefer random() over *rand48() (JimJag) - Sped up WDDX serialization 2x. (Andrei) - Added a new parameter to mail() which appends aditional command line -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard file.c file.h
elixer Sat Feb 10 18:38:40 2001 EDT Modified files: /php4/ext/standard file.c file.h Log: Fix for bug #4556 # This is pretty much a total rewrite of get_meta_tags using a simple # handwritten tokenizer. It might be overkill, but it works. Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.138 php4/ext/standard/file.c:1.139 --- php4/ext/standard/file.c:1.138 Fri Feb 9 07:28:23 2001 +++ php4/ext/standard/file.cSat Feb 10 18:38:40 2001 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: file.c,v 1.138 2001/02/09 15:28:23 rasmus Exp $ */ +/* $Id: file.c,v 1.139 2001/02/11 02:38:40 elixer Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -260,12 +260,13 @@ { pval **filename, **arg2; FILE *fp; - char buf[8192]; - char buf_lcase[8192]; int use_include_path = 0; int issock=0, socketd=0; - int len, var_namelen; - char var_name[50],*val=NULL,*tmp,*end,*slashed; + int in_tag=0, in_meta_tag=0, looking_for_val=0, done=0, ulc=0; + int num_parts=0, lc=0; + int token_len=0; + char *token_data=NULL, *name=NULL, *value=NULL, *temp=NULL; + php_meta_tags_token tok, tok_last; PLS_FETCH(); /* check args */ @@ -306,83 +307,78 @@ } RETURN_FALSE; } - /* Now loop through the file and do the magic quotes thing if needed */ - memset(buf, 0, 8191); - while((FP_FGETS(buf,8191,socketd,fp,issock) != NULL)) { - memcpy(buf_lcase, buf, 8191); - php_strtolower(buf_lcase, 8191); - if (php_memnstr(buf_lcase, "/head", sizeof("/head")-1, buf_lcase + 8191)) - break; - if(php_memnstr(buf_lcase, "meta", sizeof("meta")-1, buf_lcase + 8191)) { + tok_last = TOK_EOF; - memset(var_name,0,50); - /* get the variable name from the name attribute of the meta tag */ - tmp = php_memnstr(buf_lcase, "name=\"", sizeof("name=\"")-1, buf_lcase + 8191); - if(tmp) { - tmp = buf[tmp - buf_lcase]; - tmp+=6; - end=strstr(tmp,"\""); - if(end) { - unsigned char *c; - *end='\0'; - snprintf(var_name,50,"%s",tmp); - *end='"'; - - c = (unsigned char*)var_name; - while (*c) { - switch(*c) { - case '.': - case '\\': - case '+': - case '*': - case '?': - case '[': - case '^': - case ']': - case '$': - case '(': - case ')': - case ' ': - *c++ ='_'; - break; - default: - *c++ = tolower((unsigned char)*c); - } - } - var_namelen=strlen(var_name); + while (!done (tok = +php_next_meta_token(fp,socketd,issock,ulc,lc,token_data,token_len)) != TOK_EOF) { + if (tok == TOK_ID) { + if (tok_last == TOK_OPENTAG) { + in_meta_tag = !strcasecmp("meta",token_data); + } else if (tok_last == TOK_SLASH in_tag) { + if (strcasecmp("head",token_data) == 0) { + /* We are done here! */ + done = 1; } - - /* get the variable value from the content attribute of the meta tag */ - tmp = php_memnstr(buf_lcase, "content=\"", sizeof("content=\"")-1, buf_lcase + 8191); - val = NULL; -
[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c php_mysql.h
elixer Wed Jan 31 14:04:30 2001 EDT Modified files: /php4/ext/mysql php_mysql.c php_mysql.h Log: Added the mysql_get_*_info() functions. # If anyone knows of a version of mysql lower then 3.20.32 that implements # all 3 of these functions, please change the conditionals. @- Added mysql_get_client_info(), mysql_get_server_info(), @ mysql_get_proto_info(), and mysql_get_host_info() functions. (Sean) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.66 php4/ext/mysql/php_mysql.c:1.67 --- php4/ext/mysql/php_mysql.c:1.66 Wed Jan 31 13:53:29 2001 +++ php4/ext/mysql/php_mysql.c Wed Jan 31 14:04:30 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.66 2001/01/31 21:53:29 andi Exp $ */ +/* $Id: php_mysql.c,v 1.67 2001/01/31 22:04:30 elixer Exp $ */ /* TODO: @@ -73,6 +73,10 @@ # endif #endif +#if MYSQL_VERSION_ID = 32032 +#define HAVE_GETINFO_FUNCS +#endif + #if MYSQL_VERSION_ID 32133 || defined(FIELD_TYPE_TINY) #define MYSQL_HAS_TINY #endif @@ -132,6 +136,12 @@ PHP_FE(mysql_field_type, NULL) PHP_FE(mysql_field_flags, NULL) PHP_FE(mysql_escape_string, NULL) +#ifdef HAVE_GETINFO_FUNCS + PHP_FE(mysql_get_client_info, + NULL) + PHP_FE(mysql_get_host_info, + NULL) + PHP_FE(mysql_get_proto_info, + NULL) + PHP_FE(mysql_get_server_info, + NULL) +#endif /* for downwards compatability */ PHP_FALIAS(mysql, mysql_db_query, NULL) @@ -689,6 +699,115 @@ } /* }}} */ +#ifdef HAVE_GETINFO_FUNCS + +/* {{{ proto string mysql_get_client_info([int link_identifier]) + Returns a string that represents the client library version */ +PHP_FUNCTION(mysql_get_client_info) +{ + if (ZEND_NUM_ARGS() != 0) { + WRONG_PARAM_COUNT; + } + + RETURN_STRING(mysql_get_client_info(),1); +} +/* }}} */ + +/* {{{ proto string mysql_get_host_info([int link_identifier]) + Returns a string describing the type of connection in use, including the + server host name */ +PHP_FUNCTION(mysql_get_host_info) +{ + zval **mysql_link; + int id; + MYSQL *mysql; + MySLS_FETCH(); + + switch(ZEND_NUM_ARGS()) { + case 0: + id = +php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MySLS_CC); + CHECK_LINK(id); + break; + case 1: + if (zend_get_parameters_ex(1,mysql_link)==FAILURE) { + RETURN_FALSE; + } + id = -1; + break; + default: + WRONG_PARAM_COUNT; + break; + } + + ZEND_FETCH_RESOURCE2(mysql, MYSQL *, mysql_link, id, "MySQL-Link", le_link, +le_plink); + + RETURN_STRING(mysql_get_host_info(mysql),1); +} +/* }}} */ + +/* {{{ proto int mysql_get_proto_info([int link_identifier]) + Returns the protocol version used by current connection */ +PHP_FUNCTION(mysql_get_proto_info) +{ + zval **mysql_link; + int id; + MYSQL *mysql; + MySLS_FETCH(); + + switch(ZEND_NUM_ARGS()) { + case 0: + id = +php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MySLS_CC); + CHECK_LINK(id); + break; + case 1: + if (zend_get_parameters_ex(1,mysql_link)==FAILURE) { + RETURN_FALSE; + } + id = -1; + break; + default: + WRONG_PARAM_COUNT; + break; + } + + ZEND_FETCH_RESOURCE2(mysql, MYSQL *, mysql_link, id, "MySQL-Link", le_link, +le_plink); + + RETURN_LONG(mysql_get_proto_info(mysql)); +} +/* }}} */ + +/* {{{ proto string mysql_get_server_info([int link_identifier]) + Returns a string that represents the server version number */ +PHP_FUNCTION(mysql_get_server_info) +{ + zval **mysql_link; + int id; + MYSQL *mysql; + MySLS_FETCH(); + + switch(ZEND_NUM_ARGS()) { + case 0: + id = +php_mysql_get_default_link(INTERNAL_FUNCTION_PARAM_PASSTHRU MySLS_CC); + CHECK_LINK(id); + break; + case 1: + if
[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
elixer Tue Jan 30 16:55:29 2001 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Fix for bug #8991. mysql_field_type() now returns "year" for columns of type YEAR. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.63 php4/ext/mysql/php_mysql.c:1.64 --- php4/ext/mysql/php_mysql.c:1.63 Sun Jan 14 01:30:17 2001 +++ php4/ext/mysql/php_mysql.c Tue Jan 30 16:55:28 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.63 2001/01/14 09:30:17 zeev Exp $ */ +/* $Id: php_mysql.c,v 1.64 2001/01/31 00:55:28 elixer Exp $ */ /* TODO: @@ -77,6 +77,10 @@ #define MYSQL_HAS_TINY #endif +#if MYSQL_VERSION_ID 32200 +#define MYSQL_HAS_YEAR +#endif + #define MYSQL_ASSOC10 #define MYSQL_NUM 11 #define MYSQL_BOTH (MYSQL_ASSOC|MYSQL_NUM) @@ -1549,6 +1553,11 @@ case FIELD_TYPE_TIMESTAMP: return "timestamp"; break; +#ifdef MYSQL_HAS_YEAR + case FIELD_TYPE_YEAR: + return "year"; + break; +#endif case FIELD_TYPE_DATE: return "date"; break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c
elixer Tue Jan 30 17:14:55 2001 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Fixed conditional. # Woops! Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.64 php4/ext/mysql/php_mysql.c:1.65 --- php4/ext/mysql/php_mysql.c:1.64 Tue Jan 30 16:55:28 2001 +++ php4/ext/mysql/php_mysql.c Tue Jan 30 17:14:54 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mysql.c,v 1.64 2001/01/31 00:55:28 elixer Exp $ */ +/* $Id: php_mysql.c,v 1.65 2001/01/31 01:14:54 elixer Exp $ */ /* TODO: @@ -77,7 +77,7 @@ #define MYSQL_HAS_TINY #endif -#if MYSQL_VERSION_ID 32200 +#if MYSQL_VERSION_ID = 32200 #define MYSQL_HAS_YEAR #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / configure.in
elixer Tue Jan 16 17:15:11 2001 EDT Modified files: /php4 configure.in Log: Updated configure.in to look for strcoll() # Woopsie. Index: php4/configure.in diff -u php4/configure.in:1.211 php4/configure.in:1.212 --- php4/configure.in:1.211 Sun Jan 14 08:36:29 2001 +++ php4/configure.in Tue Jan 16 17:15:11 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.211 2001/01/14 16:36:29 elixer Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.212 2001/01/17 01:15:11 elixer Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -391,6 +391,7 @@ statvfs \ std_syslog \ strcasecmp \ +strcoll \ strdup \ strerror \ strftime \ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 / configure.in /ext/standard basic_functions.c php_string.h string.c /main config.w32.h
elixer Sun Jan 14 08:36:31 2001 EDT Modified files: /php4 configure.in /php4/ext/standard basic_functions.c php_string.h string.c /php4/main config.w32.h Log: Added localeconv() function. Operates similarly to localeconv() defined in locale.h. Should work well under non-ZTS as well as ZTS. Index: php4/configure.in diff -u php4/configure.in:1.210 php4/configure.in:1.211 --- php4/configure.in:1.210 Sat Jan 13 03:48:47 2001 +++ php4/configure.in Sun Jan 14 08:36:29 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.210 2001/01/13 11:48:47 venaas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.211 2001/01/14 16:36:29 elixer Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -379,6 +379,7 @@ regcomp \ setitimer \ setlocale \ +localeconv \ setsockopt \ setvbuf \ shutdown \ Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.296 php4/ext/standard/basic_functions.c:1.297 --- php4/ext/standard/basic_functions.c:1.296 Sat Jan 13 15:49:44 2001 +++ php4/ext/standard/basic_functions.c Sun Jan 14 08:36:30 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.296 2001/01/13 23:49:44 zeev Exp $ */ +/* $Id: basic_functions.c,v 1.297 2001/01/14 16:36:30 elixer Exp $ */ #include "php.h" #include "php_main.h" @@ -182,6 +182,7 @@ PHP_FE(explode, NULL) PHP_FE(implode, NULL) PHP_FE(setlocale, NULL) + PHP_FE(localeconv, + NULL) PHP_FE(soundex, NULL) PHP_FE(levenshtein, NULL) PHP_FE(chr, NULL) @@ -713,6 +714,9 @@ PHP_MINIT(pack)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(browscap)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(lcg)(INIT_FUNC_ARGS_PASSTHRU); +#ifdef ZTS + PHP_MINIT(localeconv)(INIT_FUNC_ARGS_PASSTHRU); +#endif #if HAVE_CRYPT PHP_MINIT(crypt)(INIT_FUNC_ARGS_PASSTHRU); @@ -769,6 +773,9 @@ PHP_MSHUTDOWN(url_scanner_ex)(SHUTDOWN_FUNC_ARGS_PASSTHRU); #endif PHP_MSHUTDOWN(file)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#ifdef ZTS + PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU); +#endif return SUCCESS; } Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.31 php4/ext/standard/php_string.h:1.32 --- php4/ext/standard/php_string.h:1.31 Tue Jan 9 07:11:23 2001 +++ php4/ext/standard/php_string.h Sun Jan 14 08:36:30 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.31 2001/01/09 15:11:23 hirokawa Exp $ */ +/* $Id: php_string.h,v 1.32 2001/01/14 16:36:30 elixer Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -65,6 +65,7 @@ PHP_FUNCTION(ord); PHP_FUNCTION(nl2br); PHP_FUNCTION(setlocale); +PHP_FUNCTION(localeconv); PHP_FUNCTION(stristr); PHP_FUNCTION(chunk_split); PHP_FUNCTION(parse_str); Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.182 php4/ext/standard/string.c:1.183 --- php4/ext/standard/string.c:1.182Tue Jan 9 07:11:23 2001 +++ php4/ext/standard/string.c Sun Jan 14 08:36:30 2001 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.182 2001/01/09 15:11:23 hirokawa Exp $ */ +/* $Id: string.c,v 1.183 2001/01/14 16:36:30 elixer Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -36,6 +36,9 @@ #include "php_globals.h" #include "basic_functions.h" #include "php_smart_str.h" +#ifdef ZTS +#include "TSRM.h" +#endif #define STR_PAD_LEFT 0 #define STR_PAD_RIGHT 1 @@ -53,6 +56,17 @@ REGISTER_LONG_CONSTANT("PATHINFO_BASENAME", PHP_PATHINFO_BASENAME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PATHINFO_EXTENSION", PHP_PATHINFO_EXTENSION, CONST_CS | CONST_PERSISTENT); +#ifdef HAVE_LOCALECONV + /* If last members of struct lconv equal CHAR_MAX, no grouping is done */ + + +/* This is bad, but since we are going to be hardcoding in the POSIX stuff anyway... +*/ +# ifndef HAVE_LIMITS_H +# define CHAR_MAX 127 +# endif + + REGISTER_LONG_CONSTANT("CHAR_MAX", CHAR_MAX, CONST_CS | CONST_PERSISTENT); +#endif + #ifdef HAVE_LOCALE_H REGISTER_LONG_CONSTANT("LC_CTYPE", LC_CTYPE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LC_NUMERIC", LC_NUMERIC,