[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Oct 26 01:31:02 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2494r2=1.2495diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2494 php-src/ChangeLog:1.2495 --- php-src/ChangeLog:1.2494Wed Oct 25 01:31:00 2006 +++ php-src/ChangeLog Thu Oct 26 01:31:01 2006 @@ -1,3 +1,65 @@ +2006-10-25 Andrei Zmievski [EMAIL PROTECTED] + +* ext/standard/basic_functions.c: + -** empty log message *** + +* ext/standard/basic_functions.c: + Unicode support for get(server|proto)by(name|number) family of funcs. + +* ext/standard/basic_functions.c: + Unicode support for is_uploaded_file()/move_uploaded_file(). + +* ext/standard/file.c: + Unicode support for fnmatch(). + +2006-10-25 Pierre-Alain Joye [EMAIL PROTECTED] + +* ext/filter/package.xml + ext/filter/tests/callback_non_modified_var.phpt: + - add test for callback with non modified var + - update changelog + +2006-10-25 Ilia Alshanetsky [EMAIL PROTECTED] + +* sapi/cgi/cgi_main.c: + Fixed build + +2006-10-25 Hannes Magnusson [EMAIL PROTECTED] + +* (PHP_5_2) + README.UPDATE_5_2: + More curl constants + +* (PHP_5_2) + README.UPDATE_5_2: + Add a note reffering to the new feature section (lukas) + +* ext/date/php_date.c: + Add oneliner descriptions + +* ext/zip/php_zip.c: + Missing RETURN_TRUE inside the PHP_ZIP_SET_FILE_COMMENT macro + +* ext/zip/php_zip.c: + Fix protos + +* (PHP_5_2) + README.UPDATE_5_2: + New extensions + - json + - filter + - zip + New classes + - DateTime + - DateTimeZone + New functions + - image_type_to_extension + - gmp_nextprime + - xmlwriter_full_end_element + - xmlwriter_write_raw + - timezone_identifiers_list + Added error message (objects without casting handler) caught by rasmus + 2006-10-24 Hannes Magnusson [EMAIL PROTECTED] * (PHP_5_2)
[PHP-CVS] cvs: CVSROOT / avail
mj Wed Oct 25 08:09:24 2006 UTC Modified files: /CVSROOTavail Log: * HTML_Page2 karma for Ian Warner. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1199r2=1.1200diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1199 CVSROOT/avail:1.1200 --- CVSROOT/avail:1.1199Fri Oct 20 16:43:05 2006 +++ CVSROOT/avail Wed Oct 25 08:09:23 2006 @@ -359,6 +359,7 @@ avail|kouichi66|pear/PHP_Annotation,peardoc avail|itrebal|pear/Net_MPD,peardoc avail|mic|pear/Text_Wiki,peardoc +avail|iwarner|pear/HTML_Page2,peardoc # php windows installer avail|jmertic|php-src/win32/installer -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c /sapi/cgi cgi_main.c
Hi Ilia, CGI is even doesn't compile after you patch. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Monday, October 23, 2006 11:18 PM To: php-cvs@lists.php.net Subject: [PHP-CVS] cvs: php-src /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c /sapi/cgi cgi_main.c iliaa Mon Oct 23 19:17:51 2006 UTC Modified files: /php-src/sapi/apache mod_php5.c /php-src/sapi/apache2filter sapi_apache2.c /php-src/sapi/apache2handler sapi_apache2.c /php-src/sapi/cgi cgi_main.c Log: Added filter support for $_SERVER in cgi/apache2 sapis Make sure PHP_SELF if filtered in Apache 1 sapi http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r 1=1.39r2=1.40diff_format=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.39 php-src/sapi/apache/mod_php5.c:1.40 --- php-src/sapi/apache/mod_php5.c:1.39 Thu Oct 12 20:13:07 2006 +++ php-src/sapi/apache/mod_php5.cMon Oct 23 19:17:50 2006 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +- -+ */ -/* $Id: mod_php5.c,v 1.39 2006/10/12 20:13:07 bfrance Exp $ */ +/* $Id: mod_php5.c,v 1.40 2006/10/23 19:17:50 iliaa Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -242,10 +242,11 @@ table_entry *elts = (table_entry *) arr-elts; zval **path_translated; HashTable *symbol_table; + int new_val_len; for (i = 0; i arr-nelts; i++) { char *val; - int val_len, new_val_len; + int val_len; if (elts[i].val) { val = elts[i].val; @@ -270,7 +271,9 @@ php_register_variable(PATH_TRANSLATED, Z_STRVAL_PP(path_translated), track_vars_array TSRMLS_CC); } - php_register_variable(PHP_SELF, ((request_rec *) SG(server_context))-uri, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, ((request_rec *) SG(server_context))-uri, strlen(((request_rec *) SG(server_context))-uri), new_val_len TSRMLS_CC)) { + php_register_variable(PHP_SELF, ((request_rec *) SG(server_context))-uri, track_vars_array TSRMLS_CC); + } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/sapi_ apache2.c?r1=1.141r2=1.142diff_format=u Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.141 php-src/sapi/apache2filter/sapi_apache2.c:1.142 --- php-src/sapi/apache2filter/sapi_apache2.c:1.141 Tue Jul 25 13:41:08 2006 +++ php-src/sapi/apache2filter/sapi_apache2.c Mon Oct 23 19:17:50 2006 @@ -18,7 +18,7 @@ +- -+ */ -/* $Id: sapi_apache2.c,v 1.141 2006/07/25 13:41:08 dmitry Exp $ */ +/* $Id: sapi_apache2.c,v 1.142 2006/10/23 19:17:50 iliaa Exp $ */ #include fcntl.h @@ -220,11 +220,18 @@ char *key, *val; APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = ; - php_register_variable(key, val, track_vars_array TSRMLS_CC); + if (!val) { + val = ; + } + if (sapi_module.input_filter(PARSE_SERVER, key, val, strlen(val), new_val_len TSRMLS_CC)) { + php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC); + } APR_ARRAY_FOREACH_CLOSE() php_register_variable(PHP_SELF, ctx-r-uri, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, ctx-r-uri, strlen(ctx-r-uri), new_val_len TSRMLS_CC)) { + php_register_variable_safe(PHP_SELF, ctx-r-uri, new_val_len, track_vars_array TSRMLS_CC); + } } static void http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/sapi _apache2.c?r1=1.74r2=1.75diff_format=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.74 php-src/sapi/apache2handler/sapi_apache2.c:1.75 --- php-src/sapi/apache2handler/sapi_apache2.c:1.74 Thu Aug 10 13:43:59 2006 +++ php-src/sapi/apache2handler/sapi_apache2.cMon Oct 23 19:17:51 2006 @@ -18,7 +18,7 @@ +- -+ */ -/* $Id: sapi_apache2.c,v 1.74 2006/08/10 13:43:59 tony2001 Exp $ */ +/* $Id: sapi_apache2.c,v 1.75 2006/10/23 19:17:51 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -232,13 +232,20 @@ php_struct *ctx = SG(server_context); const apr_array_header_t *arr = apr_table_elts(ctx-r-subprocess_env); char *key, *val; + int new_val_len;
[PHP-CVS] cvs: php-src(PHP_5_2) / README.UPDATE_5_2
bjori Wed Oct 25 12:19:13 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcREADME.UPDATE_5_2 Log: New extensions - json - filter - zip New classes - DateTime - DateTimeZone New functions - image_type_to_extension - gmp_nextprime - xmlwriter_full_end_element - xmlwriter_write_raw - timezone_identifiers_list Added error message (objects without casting handler) caught by rasmus http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.22r2=1.1.2.23diff_format=u Index: php-src/README.UPDATE_5_2 diff -u php-src/README.UPDATE_5_2:1.1.2.22 php-src/README.UPDATE_5_2:1.1.2.23 --- php-src/README.UPDATE_5_2:1.1.2.22 Tue Oct 24 21:51:15 2006 +++ php-src/README.UPDATE_5_2 Wed Oct 25 12:19:13 2006 @@ -359,10 +359,181 @@ } ? +?php +class foo { +} +$foo = new foo; +/* PHP Catchable fatal error: Object of class foo could not be converted to string in /usr/src/php/examples/convert.object.to.type.php on line 6 */ +print $foo; +? + + NEW FEATURES +New extensions: + JSON +string json_encode(mixed parameter) + - Takes a object or an array and return JSON encoded string +mixed json_decode(string json[, boolean assoc=0]) + - Decodes JSON string into PHP object/associatie array + + Zip +Class constants: + ZipArchive::CREATE + ZipArchive::EXCL + ZipArchive::CHECKCONS + ZipArchive::OVERWRITE + ZipArchive::FL_NOCASE + ZipArchive::EXCL + ZipArchive::CHECKCONS + ZipArchive::OVERWRITE + ZipArchive::FL_NOCASE + ZipArchive::FL_NODIR + ZipArchive::FL_COMPRESSED + ZipArchive::FL_UNCHANGED + ZipArchive::CM_DEFAULT + ZipArchive::CM_STORE + ZipArchive::CM_SHRINK + ZipArchive::CM_REDUCE_1 + ZipArchive::CM_REDUCE_2 + ZipArchive::CM_REDUCE_3 + ZipArchive::CM_REDUCE_4 + ZipArchive::CM_IMPLODE + ZipArchive::CM_DEFLATE + ZipArchive::CM_DEFLATE64 + ZipArchive::CM_PKWARE_IMPLODE + ZipArchive::ER_OK + ZipArchive::FL_NOCASE + ZipArchive::FL_NODIR + ZipArchive::FL_COMPRESSED + ZipArchive::FL_UNCHANGED + ZipArchive::CM_DEFAULT + ZipArchive::CM_STORE + ZipArchive::CM_SHRINK + ZipArchive::CM_REDUCE_1 + ZipArchive::CM_REDUCE_2 + ZipArchive::CM_REDUCE_3 + ZipArchive::CM_REDUCE_4 + ZipArchive::CM_IMPLODE + ZipArchive::CM_DEFLATE + ZipArchive::CM_DEFLATE64 + ZipArchive::CM_PKWARE_IMPLODE + ZipArchive::ER_OK + ZipArchive::ER_MULTIDISK + ZipArchive::ER_RENAME + ZipArchive::ER_CLOSE + ZipArchive::ER_SEEK + ZipArchive::ER_READ + ZipArchive::ER_WRITE + ZipArchive::ER_CRC + ZipArchive::ER_ZIPCLOSED + ZipArchive::ER_NOENT + ZipArchive::ER_EXISTS + ZipArchive::ER_OPEN + ZipArchive::ER_TMPOPEN + ZipArchive::ER_ZLIB + ZipArchive::ER_MEMORY + ZipArchive::ER_CHANGED + ZipArchive::ER_COMPNOTSUPP + ZipArchive::ER_EOF + ZipArchive::ER_INVAL + ZipArchive::ER_NOZIP + ZipArchive::ER_INTERNAL + ZipArchive::ER_INCONS + ZipArchive::ER_REMOVE + ZipArchive::ER_DELETED +Methods: + resource zip_open(string filename) +- Create new zip using source uri for output + void zip_close(resource zip) +- Close a Zip archive + resource zip_read(resource zip) +- Returns the next file in the archive + bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode]) +- Open a Zip File, pointed by the resource entry + void zip_entry_close(resource zip_ent) +- Close a zip entry + mixed zip_entry_read(resource zip_entry [, int len]) +- Read from an open directory entry + string zip_entry_name(resource zip_entry) +- Return the name given a ZZip entry + int zip_entry_compressedsize(resource zip_entry) +- Return the compressed size of a ZZip entry + int zip_entry_filesize(resource zip_entry) +- Return the actual filesize of a ZZip entry + string zip_entry_compressionmethod(resource zip_entry) +- Return a string containing the compression method used on a particular entry + mixed ZipArchive::open(string source [, int flags]) +- Create new zip using source uri for output, return TRUE on success or the error code + void ZipArchive::close() +- close the zip archive + bool ZipArchive::addFile(string filepath[, string entryname[, int start [, int length]]]) +- Add a file in a Zip archive using its path and the name to use + bool ZipArchive::addFromString(string name, string content) +- Add a file using content and the entry name + array ZipArchive::statName(string filename[, int flags]) +- Returns the information about a the zip entry filename + array ZipArchive::statIndex(int index[,
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
bjori Wed Oct 25 12:31:12 2006 UTC Modified files: /php-src/ext/zipphp_zip.c Log: Fix protos http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.18r2=1.19diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.18 php-src/ext/zip/php_zip.c:1.19 --- php-src/ext/zip/php_zip.c:1.18 Sun Oct 22 00:43:23 2006 +++ php-src/ext/zip/php_zip.c Wed Oct 25 12:31:12 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.18 2006/10/22 00:43:23 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.19 2006/10/25 12:31:12 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -902,7 +902,7 @@ } /* }}} */ -/* {{{ proto resource close() +/* {{{ proto bool close() close the zip archive */ ZIPARCHIVE_METHOD(close) { @@ -999,7 +999,7 @@ } /* }}} */ -/* {{{ proto resource addFromString(string name, string content) +/* {{{ proto bool addFromString(string name, string content) Add a file using content and the entry name */ ZIPARCHIVE_METHOD(addFromString) { @@ -1064,7 +1064,7 @@ } /* }}} */ -/* {{{ proto resource statName(string filename[, int flags]) +/* {{{ proto array statName(string filename[, int flags]) Returns the information about a the zip entry filename */ ZIPARCHIVE_METHOD(statName) { @@ -1120,7 +1120,7 @@ } /* }}} */ -/* {{{ proto resource locateName(string filename[, int flags]) +/* {{{ proto int locateName(string filename[, int flags]) Returns the index of the entry named filename in the archive */ ZIPARCHIVE_METHOD(locateName) { @@ -1160,7 +1160,7 @@ } /* }}} */ -/* {{{ proto resource getNameIndex(int index [, int flags]) +/* {{{ proto string getNameIndex(int index [, int flags]) Returns the name of the file at position index */ ZIPARCHIVE_METHOD(getNameIndex) { @@ -1190,7 +1190,7 @@ } /* }}} */ -/* {{{ proto resource setArchiveComment(string name, string comment) +/* {{{ proto bool setArchiveComment(string name, string comment) Set or remove (NULL/'') the comment of the archive */ ZIPARCHIVE_METHOD(setArchiveComment) { @@ -1216,7 +1216,7 @@ } /* }}} */ -/* {{{ proto resource getArchiveComment() +/* {{{ proto string getArchiveComment() Returns the comment of an entry using its index */ ZIPARCHIVE_METHOD(getArchiveComment) { @@ -1241,7 +1241,7 @@ } /* }}} */ -/* {{{ proto resource setCommentName(string name, string comment) +/* {{{ proto bool setCommentName(string name, string comment) Set or remove (NULL/'') the comment of an entry using its Name */ ZIPARCHIVE_METHOD(setCommentName) { @@ -1268,7 +1268,7 @@ } /* }}} */ -/* {{{ proto resource setCommentIndex(int index, string comment) +/* {{{ proto bool setCommentIndex(int index, string comment) Set or remove (NULL/'') the comment of an entry using its index */ ZIPARCHIVE_METHOD(setCommentIndex) { @@ -1295,7 +1295,7 @@ } /* }}} */ -/* {{{ proto resource getCommentName(string name) +/* {{{ proto string getCommentName(string name) Returns the comment of an entry using its name */ ZIPARCHIVE_METHOD(getCommentName) { @@ -1325,7 +1325,7 @@ } /* }}} */ -/* {{{ proto resource getCommentIndex(int index) +/* {{{ proto string getCommentIndex(int index) Returns the comment of an entry using its index */ ZIPARCHIVE_METHOD(getCommentIndex) { @@ -1353,7 +1353,7 @@ } /* }}} */ -/* {{{ proto resource deleteIndex(int index) +/* {{{ proto bool deleteIndex(int index) Delete a file using its index */ ZIPARCHIVE_METHOD(deleteIndex) { @@ -1383,7 +1383,7 @@ } /* }}} */ -/* {{{ proto resource deleteName(string name) +/* {{{ proto bool deleteName(string name) Delete a file using its index */ ZIPARCHIVE_METHOD(deleteName) { @@ -1414,7 +1414,7 @@ } /* }}} */ -/* {{{ proto resource renameIndex(int index, string new_name) +/* {{{ proto bool renameIndex(int index, string new_name) Rename an entry selected by its index to new_name */ ZIPARCHIVE_METHOD(renameIndex) { @@ -1450,7 +1450,7 @@ } /* }}} */ -/* {{{ proto resource renameName(string name, string new_name) +/* {{{ proto bool renameName(string name, string new_name) Rename an entry selected by its name to new_name */ ZIPARCHIVE_METHOD(renameName) { @@ -1484,7 +1484,7 @@ } /* }}} */ -/* {{{ proto resource unchangeIndex(int index) +/* {{{ proto bool unchangeIndex(int index) Changes to the file at position index are reverted */ ZIPARCHIVE_METHOD(unchangeIndex) { @@ -1514,7 +1514,7 @@ } /* }}} */ -/* {{{ proto resource unchangeName(string name) +/* {{{ proto bool unchangeName(string name) Changes to the file named 'name' are reverted */ ZIPARCHIVE_METHOD(unchangeName) { @@ -1548,7 +1548,7 @@ } /* }}} */ -/* {{{ proto resource unchangeAll() +/* {{{ proto bool unchangeAll() All changes to files and global information in archive are reverted */ ZIPARCHIVE_METHOD(unchangeAll) { @@ -1569,7 +1569,7 @@ } /* }}} */ -/* {{{ proto resource unchangeAll() +/* {{{ proto bool
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
bjori Wed Oct 25 12:32:11 2006 UTC Modified files: /php-src/ext/zipphp_zip.c Log: Missing RETURN_TRUE inside the PHP_ZIP_SET_FILE_COMMENT macro http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.19r2=1.20diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.19 php-src/ext/zip/php_zip.c:1.20 --- php-src/ext/zip/php_zip.c:1.19 Wed Oct 25 12:31:12 2006 +++ php-src/ext/zip/php_zip.c Wed Oct 25 12:32:10 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.19 2006/10/25 12:31:12 bjori Exp $ */ +/* $Id: php_zip.c,v 1.20 2006/10/25 12:32:10 bjori Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -65,7 +65,8 @@ } \ } else if (zip_set_file_comment(intern, index, comment, comment_len) 0) { \ RETURN_FALSE; \ - } + } \ + RETURN_TRUE; /* }}} */ @@ -1936,7 +1937,7 @@ php_info_print_table_start(); php_info_print_table_row(2, Zip, enabled); - php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.19 2006/10/25 12:31:12 bjori Exp $); + php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.20 2006/10/25 12:32:10 bjori Exp $); php_info_print_table_row(2, Zip version, 2.0.0); php_info_print_table_row(2, Libzip version, 0.7.1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/date php_date.c
bjori Wed Oct 25 12:35:16 2006 UTC Modified files: /php-src/ext/date php_date.c Log: Add oneliner descriptions http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.123r2=1.124diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.123 php-src/ext/date/php_date.c:1.124 --- php-src/ext/date/php_date.c:1.123 Sun Oct 8 13:34:21 2006 +++ php-src/ext/date/php_date.c Wed Oct 25 12:35:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.123 2006/10/08 13:34:21 bjori Exp $ */ +/* $Id: php_date.c,v 1.124 2006/10/25 12:35:16 bjori Exp $ */ #include php.h #include php_streams.h @@ -1781,6 +1781,7 @@ } /* {{{ proto DateTime date_create([string time[, DateTimeZone object]]) + Returns new DateTime object */ PHP_FUNCTION(date_create) { @@ -1798,6 +1799,7 @@ /* }}} */ /* {{{ proto DateTime::__construct([string time[, DateTimeZone object]]) + Creates new DateTime object */ PHP_METHOD(DateTime, __construct) { @@ -1814,6 +1816,7 @@ /* }}} */ /* {{{ proto array date_parse(string date) + Returns associative array with detailed info about given date */ PHP_FUNCTION(date_parse) { @@ -1912,6 +1915,7 @@ /* }}} */ /* {{{ proto string date_format(DateTime object, string format) + Returns date formatted according to given format */ PHP_FUNCTION(date_format) { @@ -1958,6 +1962,7 @@ /* }}} */ /* {{{ proto void date_modify(DateTime object, string modify) + Alters the timestamp. */ PHP_FUNCTION(date_modify) { @@ -1992,6 +1997,7 @@ /* }}} */ /* {{{ proto DateTimeZone date_timezone_get(DateTime object) + Return new DateTimeZone object relative to give DateTime */ PHP_FUNCTION(date_timezone_get) { @@ -2015,6 +2021,7 @@ /* }}} */ /* {{{ proto void date_timezone_set(DateTime object, DateTimeZone object) + Sets the timezone for the DateTime object. */ PHP_FUNCTION(date_timezone_set) { @@ -2038,6 +2045,7 @@ /* }}} */ /* {{{ proto long date_offset_get(DateTime object) + Returns the DST offset. */ PHP_FUNCTION(date_offset_get) { @@ -2062,6 +2070,7 @@ /* }}} */ /* {{{ proto void date_time_set(DateTime object, long hour, long minute[, long second]) + Sets the time. */ PHP_FUNCTION(date_time_set) { @@ -2082,6 +2091,7 @@ /* }}} */ /* {{{ proto void date_date_set(DateTime object, long year, long month, long day) + Sets the date. */ PHP_FUNCTION(date_date_set) { @@ -2102,6 +2112,7 @@ /* }}} */ /* {{{ proto void date_isodate_set(DateTime object, long year, long week[, long day]) + Sets the ISO date. */ PHP_FUNCTION(date_isodate_set) { @@ -2145,6 +2156,7 @@ } /* {{{ proto DateTimeZone timezone_open(string timezone) + Returns new DateTimeZone object */ PHP_FUNCTION(timezone_open) { @@ -2163,6 +2175,7 @@ /* }}} */ /* {{{ proto DateTimeZone::__construct(string timezone) + Creates new DateTimeZone object. */ PHP_METHOD(DateTimeZone, __construct) { @@ -2181,6 +2194,7 @@ /* }}} */ /* {{{ proto string timezone_name_get(DateTimeZone object) + Returns the name of the timezone. */ PHP_FUNCTION(timezone_name_get) { @@ -2198,6 +2212,7 @@ /* }}} */ /* {{{ proto string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]]) + Returns the timezone name from abbrevation */ PHP_FUNCTION(timezone_name_from_abbr) { @@ -2221,6 +2236,7 @@ /* }}} */ /* {{{ proto long timezone_offset_get(DateTimeZone object, DateTime object) + Returns the timezone offset. */ PHP_FUNCTION(timezone_offset_get) { @@ -2244,6 +2260,7 @@ /* }}} */ /* {{{ proto array timezone_transitions_get(DateTimeZone object) + Returns numeracilly indexed array containing associative array for all transitions for the timezone. */ PHP_FUNCTION(timezone_transitions_get) { @@ -2273,6 +2290,7 @@ /* }}} */ /* {{{ proto array timezone_identifiers_list() + Returns numerically index array with all timezone identifiers. */ PHP_FUNCTION(timezone_identifiers_list) { @@ -2292,7 +2310,8 @@ } /* }}} */ -/* proto {{{ array timezone_abbreviations_list() +/* {{{ proto array timezone_abbreviations_list() + Returns associative array containing dst, offset and the timezone name */ PHP_FUNCTION(timezone_abbreviations_list) { -- 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) / README.UPDATE_5_2
bjori Wed Oct 25 12:40:23 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcREADME.UPDATE_5_2 Log: Add a note reffering to the new feature section (lukas) http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.23r2=1.1.2.24diff_format=u Index: php-src/README.UPDATE_5_2 diff -u php-src/README.UPDATE_5_2:1.1.2.23 php-src/README.UPDATE_5_2:1.1.2.24 --- php-src/README.UPDATE_5_2:1.1.2.23 Wed Oct 25 12:19:13 2006 +++ php-src/README.UPDATE_5_2 Wed Oct 25 12:40:23 2006 @@ -124,7 +124,7 @@ The Zip extension enables you to transparently read or write ZIP compressed archives and the files inside them. - Please refer to the PHP Manual for details. + Please refer to the 'NEW FEATURES' below or the PHP Manual for details. - Improved memory manager and increased default memory limit (Dmitry) -- 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) / README.UPDATE_5_2
bjori Wed Oct 25 12:58:46 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcREADME.UPDATE_5_2 Log: More curl constants http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.24r2=1.1.2.25diff_format=u Index: php-src/README.UPDATE_5_2 diff -u php-src/README.UPDATE_5_2:1.1.2.24 php-src/README.UPDATE_5_2:1.1.2.25 --- php-src/README.UPDATE_5_2:1.1.2.24 Wed Oct 25 12:40:23 2006 +++ php-src/README.UPDATE_5_2 Wed Oct 25 12:58:46 2006 @@ -810,6 +810,13 @@ New global constants: = ext/curl +- CURLE_LDAP_INVALID_URL +- CURLE_FILESIZE_EXCEEDED +- CURLE_FTP_SSL_FAILED +- CURLOPT_FTPSSLAUTH +- CURLFTPAUTH_DEFAULT +- CURLFTPAUTH_SSL +- CURLFTPAUTH_TLS - CURLOPT_FTP_SSL - CURLFTPSSL_NONE - CURLFTPSSL_TRY -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c
iliaa Wed Oct 25 14:04:49 2006 UTC Modified files: /php-src/sapi/cgi cgi_main.c Log: Fixed build http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.301r2=1.302diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.301 php-src/sapi/cgi/cgi_main.c:1.302 --- php-src/sapi/cgi/cgi_main.c:1.301 Mon Oct 23 19:17:51 2006 +++ php-src/sapi/cgi/cgi_main.c Wed Oct 25 14:04:48 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: cgi_main.c,v 1.301 2006/10/23 19:17:51 iliaa Exp $ */ +/* $Id: cgi_main.c,v 1.302 2006/10/25 14:04:48 iliaa Exp $ */ #include php.h #include php_globals.h @@ -485,7 +485,7 @@ php_import_environment_variables(track_vars_array TSRMLS_CC); /* Build the special-case PHP_SELF variable for the CGI version */ if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, val, strlen(val), new_val_len TSRMLS_CC)) { - php_register_variable_safe(PHP_SELF, var, new_val_len, track_vars_array TSRMLS_CC); + php_register_variable_safe(PHP_SELF, val, new_val_len, track_vars_array TSRMLS_CC); } } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c /sapi/cgi cgi_main.c
Fixed, thanks for the info. On 25-Oct-06, at 5:06 AM, Dmitry Stogov wrote: Hi Ilia, CGI is even doesn't compile after you patch. Dmitry. -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Monday, October 23, 2006 11:18 PM To: php-cvs@lists.php.net Subject: [PHP-CVS] cvs: php-src /sapi/apache mod_php5.c /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c /sapi/cgi cgi_main.c iliaa Mon Oct 23 19:17:51 2006 UTC Modified files: /php-src/sapi/apachemod_php5.c /php-src/sapi/apache2filter sapi_apache2.c /php-src/sapi/apache2handlersapi_apache2.c /php-src/sapi/cgi cgi_main.c Log: Added filter support for $_SERVER in cgi/apache2 sapis Make sure PHP_SELF if filtered in Apache 1 sapi http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r 1=1.39r2=1.40diff_format=u Index: php-src/sapi/apache/mod_php5.c diff -u php-src/sapi/apache/mod_php5.c:1.39 php-src/sapi/apache/mod_php5.c:1.40 --- php-src/sapi/apache/mod_php5.c:1.39 Thu Oct 12 20:13:07 2006 +++ php-src/sapi/apache/mod_php5.c Mon Oct 23 19:17:50 2006 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED] | +- -+ */ -/* $Id: mod_php5.c,v 1.39 2006/10/12 20:13:07 bfrance Exp $ */ +/* $Id: mod_php5.c,v 1.40 2006/10/23 19:17:50 iliaa Exp $ */ #include php_apache_http.h #include http_conf_globals.h @@ -242,10 +242,11 @@ table_entry *elts = (table_entry *) arr-elts; zval **path_translated; HashTable *symbol_table; + int new_val_len; for (i = 0; i arr-nelts; i++) { char *val; - int val_len, new_val_len; + int val_len; if (elts[i].val) { val = elts[i].val; @@ -270,7 +271,9 @@ php_register_variable(PATH_TRANSLATED, Z_STRVAL_PP(path_translated), track_vars_array TSRMLS_CC); } - php_register_variable(PHP_SELF, ((request_rec *) SG(server_context))-uri, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, ((request_rec *) SG(server_context))-uri, strlen(((request_rec *) SG(server_context))-uri), new_val_len TSRMLS_CC)) { + php_register_variable(PHP_SELF, ((request_rec *) SG(server_context))-uri, track_vars_array TSRMLS_CC); + } } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/sapi_ apache2.c?r1=1.141r2=1.142diff_format=u Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.141 php-src/sapi/apache2filter/sapi_apache2.c:1.142 --- php-src/sapi/apache2filter/sapi_apache2.c:1.141 Tue Jul 25 13:41:08 2006 +++ php-src/sapi/apache2filter/sapi_apache2.c Mon Oct 23 19:17:50 2006 @@ -18,7 +18,7 @@ +- -+ */ -/* $Id: sapi_apache2.c,v 1.141 2006/07/25 13:41:08 dmitry Exp $ */ +/* $Id: sapi_apache2.c,v 1.142 2006/10/23 19:17:50 iliaa Exp $ */ #include fcntl.h @@ -220,11 +220,18 @@ char *key, *val; APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = ; - php_register_variable(key, val, track_vars_array TSRMLS_CC); + if (!val) { + val = ; + } + if (sapi_module.input_filter(PARSE_SERVER, key, val, strlen(val), new_val_len TSRMLS_CC)) { + php_register_variable_safe(key, val, new_val_len, track_vars_array TSRMLS_CC); + } APR_ARRAY_FOREACH_CLOSE() php_register_variable(PHP_SELF, ctx-r-uri, track_vars_array TSRMLS_CC); + if (sapi_module.input_filter(PARSE_SERVER, PHP_SELF, ctx-r-uri, strlen(ctx-r-uri), new_val_len TSRMLS_CC)) { + php_register_variable_safe(PHP_SELF, ctx-r-uri, new_val_len, track_vars_array TSRMLS_CC); + } } static void http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/sapi _apache2.c?r1=1.74r2=1.75diff_format=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.74 php-src/sapi/apache2handler/sapi_apache2.c:1.75 --- php-src/sapi/apache2handler/sapi_apache2.c:1.74 Thu Aug 10 13:43:59 2006 +++ php-src/sapi/apache2handler/sapi_apache2.c Mon Oct 23 19:17:51 2006 @@ -18,7 +18,7 @@ +- -+ */ -/* $Id: sapi_apache2.c,v 1.74 2006/08/10 13:43:59 tony2001 Exp $ */ +/* $Id: sapi_apache2.c,v 1.75 2006/10/23 19:17:51 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -232,13 +232,20 @@ php_struct *ctx = SG(server_context); const apr_array_header_t *arr = apr_table_elts(ctx-r-subprocess_env); char *key, *val; + int new_val_len; APR_ARRAY_FOREACH_OPEN(arr, key, val) - if (!val) val = ; -
[PHP-CVS] cvs: php-src /ext/standard file.c
andrei Wed Oct 25 17:28:21 2006 UTC Modified files: /php-src/ext/standard file.c Log: Unicode support for fnmatch(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.464r2=1.465diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.464 php-src/ext/standard/file.c:1.465 --- php-src/ext/standard/file.c:1.464 Fri Oct 13 01:44:42 2006 +++ php-src/ext/standard/file.c Wed Oct 25 17:28:20 2006 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: file.c,v 1.464 2006/10/13 01:44:42 iliaa Exp $ */ +/* $Id: file.c,v 1.465 2006/10/25 17:28:20 andrei Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2562,22 +2562,36 @@ /* }}} */ #ifdef HAVE_FNMATCH -/* {{{ proto bool fnmatch(string pattern, string filename [, int flags]) +/* {{{ proto bool fnmatch(string pattern, string filename [, int flags]) U Match filename against pattern */ PHP_FUNCTION(fnmatch) { - char *pattern, *filename; + zstr pattern, filename; int pattern_len, filename_len; + char *pattern_utf8, *filename_utf8; + int pattern_utf8_len, filename_utf8_len; + zend_uchar type; long flags = 0; + UErrorCode status = U_ZERO_ERROR; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|l, - pattern, pattern_len, - filename, filename_len, - flags) - == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, TT|l, pattern, + pattern_len, type, filename, filename_len, type, flags) == FAILURE) { return; + } + + if (type == IS_UNICODE) { + zend_unicode_to_string_ex(UG(utf8_conv), pattern_utf8, pattern_utf8_len, pattern.u, pattern_len, status); + zend_unicode_to_string_ex(UG(utf8_conv), filename_utf8, filename_utf8_len, filename.u, filename_len, status); + pattern.s = pattern_utf8; + filename.s = filename_utf8; + } + + RETVAL_BOOL( ! fnmatch( pattern.s, filename.s, flags )); - RETURN_BOOL( ! fnmatch( pattern, filename, flags )); + if (type == IS_UNICODE) { + efree(pattern_utf8); + efree(filename_utf8); + } } /* }}} */ #endif -- 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
andrei Wed Oct 25 18:03:45 2006 UTC Modified files: /php-src/ext/standard basic_functions.c Log: Unicode support for is_uploaded_file()/move_uploaded_file(). http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.817r2=1.818diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.817 php-src/ext/standard/basic_functions.c:1.818 --- php-src/ext/standard/basic_functions.c:1.817Wed Oct 18 16:34:25 2006 +++ php-src/ext/standard/basic_functions.c Wed Oct 25 18:03:45 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.817 2006/10/18 16:34:25 johannes Exp $ */ +/* $Id: basic_functions.c,v 1.818 2006/10/25 18:03:45 andrei Exp $ */ #include php.h #include php_streams.h @@ -5972,23 +5972,27 @@ } /* }}} */ -/* {{{ proto bool is_uploaded_file(string path) +/* {{{ proto bool is_uploaded_file(string path) U Check if file was created by rfc1867 upload */ PHP_FUNCTION(is_uploaded_file) { - zval **path; + zstr path; + int path_len; + zend_uchar type; if (!SG(rfc1867_uploaded_files)) { RETURN_FALSE; } - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, path) != SUCCESS) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t, path, path_len, type) == FAILURE) { + return; } - convert_to_string_ex(path); - - if (zend_hash_exists(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1)) { + /* +* The filenames are stored as IS_UNICODE or IS_STRING in the hash, not +* using filesytem_encoding. +*/ + if (zend_u_hash_exists(SG(rfc1867_uploaded_files), type, path, path_len+1)) { RETURN_TRUE; } else { RETURN_FALSE; @@ -5996,43 +6000,59 @@ } /* }}} */ -/* {{{ proto bool move_uploaded_file(string path, string new_path) +/* {{{ proto bool move_uploaded_file(string path, string new_path) U Move a file if and only if it was created by an upload */ PHP_FUNCTION(move_uploaded_file) { - zval **path, **new_path; + zstr path; + char *old_path, *new_path; + int path_len, old_path_len, new_path_len; + zend_uchar type; + zval **pp_new_path; zend_bool successful = 0; if (!SG(rfc1867_uploaded_files)) { RETURN_FALSE; } - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, path, new_path) != SUCCESS) { - ZEND_WRONG_PARAM_COUNT(); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, tZ, path, path_len, type, pp_new_path) == FAILURE || + php_stream_path_param_encode(pp_new_path, new_path, new_path_len, REPORT_ERRORS, FG(default_context)) == FAILURE) { + return; } - convert_to_string_ex(path); - convert_to_string_ex(new_path); - if (!zend_hash_exists(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1)) { + if (!zend_u_hash_exists(SG(rfc1867_uploaded_files), type, path, path_len+1)) { RETURN_FALSE; } - if (php_check_open_basedir(Z_STRVAL_PP(new_path) TSRMLS_CC)) { + if (php_check_open_basedir(new_path TSRMLS_CC)) { RETURN_FALSE; } - VCWD_UNLINK(Z_STRVAL_PP(new_path)); - if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) { + if (type == IS_UNICODE) { + if (FAILURE == php_stream_path_encode(NULL, old_path, old_path_len, path.u, path_len, REPORT_ERRORS, FG(default_context))) { + RETURN_FALSE; + } + } else { + old_path = path.s; + old_path_len = path_len; + } + + VCWD_UNLINK(new_path); + if (rename(old_path, new_path) == 0) { successful = 1; - } else if (php_copy_file_ex(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path), STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { - VCWD_UNLINK(Z_STRVAL_PP(path)); + } else if (php_copy_file_ex(old_path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { + VCWD_UNLINK(old_path); successful = 1; } if (successful) { - zend_hash_del(SG(rfc1867_uploaded_files), Z_STRVAL_PP(path), Z_STRLEN_PP(path)+1); + zend_u_hash_del(SG(rfc1867_uploaded_files), type, path, path_len+1); } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to move '%s' to '%s', Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to move '%s' to '%s', old_path, new_path); + } + + if (type == IS_UNICODE) { + efree(old_path); }
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
andrei Wed Oct 25 20:09:22 2006 UTC Modified files: /php-src/ext/standard basic_functions.c Log: Unicode support for get(server|proto)by(name|number) family of funcs. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.818r2=1.819diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.818 php-src/ext/standard/basic_functions.c:1.819 --- php-src/ext/standard/basic_functions.c:1.818Wed Oct 25 18:03:45 2006 +++ php-src/ext/standard/basic_functions.c Wed Oct 25 20:09:21 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.818 2006/10/25 18:03:45 andrei Exp $ */ +/* $Id: basic_functions.c,v 1.819 2006/10/25 20:09:21 andrei Exp $ */ #include php.h #include php_streams.h @@ -5801,20 +5801,20 @@ /* }}} */ #if HAVE_GETSERVBYNAME -/* {{{ proto int getservbyname(string service, string protocol) +/* {{{ proto int getservbyname(string service, string protocol) U Returns port associated with service. Protocol must be tcp or udp */ PHP_FUNCTION(getservbyname) { - zval **name, **proto; + char *name, *proto; + int name_len, proto_len; struct servent *serv; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, name, proto) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, name, name_len, + UG(ascii_conv), proto, proto_len, UG(ascii_conv)) == FAILURE) { + return; } - convert_to_string_ex(name); - convert_to_string_ex(proto); - serv = getservbyname(Z_STRVAL_PP(name), Z_STRVAL_PP(proto)); + serv = getservbyname(name, proto); if (serv == NULL) { RETURN_FALSE; @@ -5826,50 +5826,48 @@ #endif #if HAVE_GETSERVBYPORT -/* {{{ proto string getservbyport(int port, string protocol) +/* {{{ proto string getservbyport(int port, string protocol) U Returns service name associated with port. Protocol must be tcp or udp */ PHP_FUNCTION(getservbyport) { - zval **port, **proto; + char *proto; + int proto_len; + long port; struct servent *serv; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, port, proto) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ls, port, proto, + proto_len, UG(ascii_conv)) == FAILURE) { + return; } - convert_to_long_ex(port); - convert_to_string_ex(proto); - serv = getservbyport(htons((unsigned short) Z_LVAL_PP(port)), Z_STRVAL_PP(proto)); + serv = getservbyport(htons((unsigned short) port), proto); if (serv == NULL) { RETURN_FALSE; } - RETURN_STRING(serv-s_name, 1); + RETURN_ASCII_STRING(serv-s_name, 1); } /* }}} */ #endif #if HAVE_GETPROTOBYNAME -/* {{{ proto int getprotobyname(string name) +/* {{{ proto int getprotobyname(string name) U Returns protocol number associated with name as per /etc/protocols */ PHP_FUNCTION(getprotobyname) { - zval **name; + char *name; + int name_len; struct protoent *ent; - if (ZEND_NUM_ARGS() != 1 - || zend_get_parameters_ex(1, name) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, name, name_len, + UG(ascii_conv)) == FAILURE) { + return; } - convert_to_string_ex(name); - - ent = getprotobyname(Z_STRVAL_PP(name)); + ent = getprotobyname(name); if (ent == NULL) { - Z_LVAL_P(return_value) = -1; - Z_TYPE_P(return_value) = IS_LONG; RETURN_FALSE; } @@ -5879,26 +5877,24 @@ #endif #if HAVE_GETPROTOBYNUMBER -/* {{{ proto string getprotobynumber(int proto) +/* {{{ proto string getprotobynumber(int proto) U Returns protocol name associated with protocol number proto */ PHP_FUNCTION(getprotobynumber) { - zval **proto; + long proto; struct protoent *ent; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, proto) == FAILURE) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, l, proto) == FAILURE) { + return; } - convert_to_long_ex(proto); - - ent = getprotobynumber(Z_LVAL_PP(proto)); + ent = getprotobynumber(proto); if (ent == NULL) { RETURN_FALSE; } - RETURN_STRING(ent-p_name, 1); + RETURN_ASCII_STRING(ent-p_name, 1); } /* }}} */ #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe,
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
andrei Wed Oct 25 20:30:51 2006 UTC Modified files: /php-src/ext/standard basic_functions.c Log: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.819r2=1.820diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.819 php-src/ext/standard/basic_functions.c:1.820 --- php-src/ext/standard/basic_functions.c:1.819Wed Oct 25 20:09:21 2006 +++ php-src/ext/standard/basic_functions.c Wed Oct 25 20:30:51 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.819 2006/10/25 20:09:21 andrei Exp $ */ +/* $Id: basic_functions.c,v 1.820 2006/10/25 20:30:51 andrei Exp $ */ #include php.h #include php_streams.h @@ -5306,7 +5306,7 @@ zend_end_try(); } -/* {{{ proto void register_shutdown_function(string function_name) +/* {{{ proto void register_shutdown_function(string function_name) U Register a user-level function to be called on request termination */ PHP_FUNCTION(register_shutdown_function) { @@ -5771,31 +5771,24 @@ } /* }}} */ -/* {{{ proto int ignore_user_abort([string value]) +/* {{{ proto int ignore_user_abort([string value]) U Set whether we want to ignore a user abort event or not */ PHP_FUNCTION(ignore_user_abort) { - zval **arg; + char *arg = NULL; + int arg_len; int old_setting; old_setting = PG(ignore_user_abort); - switch (ZEND_NUM_ARGS()) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, arg, arg_len, + UG(ascii_conv)) == FAILURE) { + return; + } - case 0: - break; - - case 1: - if (zend_get_parameters_ex(1, arg) == FAILURE) { - RETURN_FALSE; - } - convert_to_string_ex(arg); - zend_alter_ini_entry(ignore_user_abort, sizeof(ignore_user_abort), Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), PHP_INI_USER, PHP_INI_STAGE_RUNTIME); - break; - - default: - WRONG_PARAM_COUNT; - break; + if (arg) { + zend_alter_ini_entry(ignore_user_abort, sizeof(ignore_user_abort), arg, arg_len, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); } + RETURN_LONG(old_setting); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
wez Thu Oct 26 00:47:44 2006 UTC Modified files: /CVSROOTavail Log: no more acl on pdo_odbc, IBM are doing their own thing. http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1200r2=1.1201diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1200 CVSROOT/avail:1.1201 --- CVSROOT/avail:1.1200Wed Oct 25 08:09:23 2006 +++ CVSROOT/avail Thu Oct 26 00:47:44 2006 @@ -367,11 +367,11 @@ # Curl modules avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www -# DB2, SDO, IDS and PDO_ODBC have tighter restrictions, so that IBM are not overly +# DB2, SDO, IDS have tighter restrictions, so that IBM are not overly # legally encumbered. If you have contributions for these two extensions, # please contact the lead developers. This is a temporary measure until # we can put in place a more general process. -unavail||pecl/ibm_db2,pecl/pdo_odbc,php-src/ext/pdo_odbc,pecl/sdo,pecl/pdo_ids,pecl/pdo_informix +unavail||pecl/ibm_db2,pecl/sdo,pecl/pdo_ids,pecl/pdo_informix avail|dbs,skoduru,kraman,kfbombar,tessus|pecl/ibm_db2 avail|wez,dbs|pecl/pdo_odbc,php-src/ext/pdo_odbc avail|gcc,cem,mfp,ansriniv,slaws|pecl/sdo -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php