[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Wed May 31 05:31:52 2006 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewcvs.cgi/php-src/ChangeLog?r1=1.2361r2=1.2362diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2361 php-src/ChangeLog:1.2362 --- php-src/ChangeLog:1.2361Tue May 30 05:31:51 2006 +++ php-src/ChangeLog Wed May 31 05:31:51 2006 @@ -1,3 +1,127 @@ +2006-05-30 Marcus Boerger [EMAIL PROTECTED] + +* (PHP_5_2) + tests/classes/inheritance_003.phpt + tests/classes/inheritance_004.phpt: + - Add new tests + +* tests/classes/inheritance_003.phpt + tests/classes/inheritance_003.phpt + tests/classes/inheritance_004.phpt + tests/classes/inheritance_004.phpt: + + - Add new tests + +* ZendEngine2/zend_compile.c: + - Fix test logic + +* (PHP_5_2) + ZendEngine2/zend_compile.c: + - Switch back to old severities and still keep bugfix for + +2006-05-30 Antony Dovgal [EMAIL PROTECTED] + +* ext/oci8/oci8_collection.c: + fix compilation on some b0rked systems that must have collections support + but they don't + +2006-05-30 Marcus Boerger [EMAIL PROTECTED] + +* ZendEngine2/zend_compile.c: + - WS + +2006-05-30 Sara Golemon [EMAIL PROTECTED] + +* ext/standard/tests/file/mkdir-004.phpt + ext/standard/tests/file/mkdir-005.phpt: + Minor fixes (bjori) + +2006-05-30 Michael Wallner [EMAIL PROTECTED] + +* ext/pcntl/pcntl.c: + MFB: fix bug 37635 (argument to pcntl signal handler is trashed) + +* (PHP_5_2) + NEWS + ext/pcntl/pcntl.c: + - fix bug #37635 (parameter of pcntl signal handler is trashed) + +2006-05-30 Seiji Masugata [EMAIL PROTECTED] + +* (PHP_5_2) + ext/mbstring/mbstring.c + ext/mbstring/mbstring.h: + added mb_stristr( ), mb_strrichr( ). + +* (PHP_5_2) + ext/mbstring/mbstring.c + ext/mbstring/mbstring.h: + added mb_strstr( ), mb_strrchr( ). + +* (PHP_5_2) + ext/mbstring/mbstring.c + ext/mbstring/mbstring.h: + added mb_stripos( ), mb_strripos( ). + +* (PHP_5_2) + ext/mbstring/mbstring.c + ext/mbstring/mbstring.h: + added mb_list_encodings_alias_names( ), mb_list_mime_names( ). + +* (PHP_5_2) + ext/mbstring/mbstring.c: + added option parameter mb_list_encodings( ). + +2006-05-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/standard/basic_functions.c + ext/standard/php_var.h + ext/standard/var.c: + MFB: Added memory_get_peak_usage() function for retrieving peak memory + usage of a PHP script. + +* (PHP_5_2) + NEWS + ext/standard/basic_functions.c + ext/standard/php_var.h + ext/standard/var.c: + Added memory_get_peak_usage() function for retrieving peak memory usage of + a PHP script. + +2006-05-30 Antony Dovgal [EMAIL PROTECTED] + +* (PHP_4_4) + ext/oci8/config.m4: + merge the last change in 4.4 and allow ext/oci8 to be built against basic + lite package + (as Derick requested) + +* (PHP_5_2) + ext/oci8/config.m4: + MFH: don't require libociei, this allows us to build ext/oci8 against + basiclite OIC package + +* ext/oci8/config.m4: + don't require libociei, this allows us to build ext/oci8 against basiclite + OIC package + +2006-05-30 Derick Rethans [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS: + - MFH: Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Patch + by +Hannes Magnusson) + +2006-05-30 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/wddx/wddx.c: + MFB: Convert E_ERROR to E_RECOVERABLE_ERROR + +* (PHP_5_2) + ext/wddx/wddx.c: + Convert E_ERROR to E_RECOVERABLE_ERROR + 2006-05-29 Antony Dovgal [EMAIL PROTECTED] * ext/pcre/php_pcre.c:
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Wed May 31 05:31:57 2006 UTC Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/viewcvs.cgi/ZendEngine2/ChangeLog?r1=1.925r2=1.926diff_format=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.925 ZendEngine2/ChangeLog:1.926 --- ZendEngine2/ChangeLog:1.925 Tue May 30 05:31:57 2006 +++ ZendEngine2/ChangeLog Wed May 31 05:31:57 2006 @@ -1,3 +1,15 @@ +2006-05-30 Marcus Boerger [EMAIL PROTECTED] + +* zend_compile.c: + - Fix test logic + +* (PHP_5_2) + zend_compile.c: + - Switch back to old severities and still keep bugfix for + +* zend_compile.c: + - WS + 2006-05-29 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2) @@ -13814,7 +13826,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.925 2006/05/30 05:31:57 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.926 2006/05/31 05:31:57 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -15538,7 +15550,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.925 2006/05/30 05:31:57 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.926 2006/05/31 05:31:57 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/pdo pdo_stmt.c
tony2001Tue May 30 09:46:01 2006 UTC Modified files: /php-src/ext/pdopdo_stmt.c Log: need to call zend_is_callable() if callable is known to be invalid http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.158r2=1.159diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.158 php-src/ext/pdo/pdo_stmt.c:1.159 --- php-src/ext/pdo/pdo_stmt.c:1.158Sat Apr 22 19:10:40 2006 +++ php-src/ext/pdo/pdo_stmt.c Tue May 30 09:46:01 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pdo_stmt.c,v 1.158 2006/04/22 19:10:40 tony2001 Exp $ */ +/* $Id: pdo_stmt.c,v 1.159 2006/05/30 09:46:01 tony2001 Exp $ */ /* The PDO Statement Handle Class */ @@ -651,7 +651,7 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args TSRMLS_DC) /* {{{ */ { - zval **object = NULL, **method; + zval **object = NULL, **method = NULL; zend_class_entry * ce = NULL, **pce; zend_function *function_handler; zstr lcname; @@ -688,7 +688,7 @@ method = callable; } - if (!zend_is_callable(callable, 0, NULL)) { + if (!method || !zend_is_callable(callable, 0, NULL)) { pdo_raise_impl_error(stmt-dbh, stmt, HY000, user-supplied function must be a valid callback TSRMLS_CC); return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo pdo_stmt.c
tony2001Tue May 30 09:46:59 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdopdo_stmt.c Log: no need to call zend_is_callable() if callable is known to be invalid free fname on failure and plug possible leak http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.1r2=1.118.2.38.2.2diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.1 php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.2 --- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.1 Thu May 11 22:43:44 2006 +++ php-src/ext/pdo/pdo_stmt.c Tue May 30 09:46:59 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: pdo_stmt.c,v 1.118.2.38.2.1 2006/05/11 22:43:44 helly Exp $ */ +/* $Id: pdo_stmt.c,v 1.118.2.38.2.2 2006/05/30 09:46:59 tony2001 Exp $ */ /* The PDO Statement Handle Class */ @@ -703,8 +703,8 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args TSRMLS_DC) /* {{{ */ { - zval **object = NULL, **method; - char *fname, *cname; + zval **object = NULL, **method = NULL; + char *fname = NULL, *cname; zend_class_entry * ce = NULL, **pce; zend_function *function_handler; @@ -739,8 +739,11 @@ method = callable; } - if (!zend_is_callable(callable, 0, fname)) { + if (!method || !zend_is_callable(callable, 0, fname)) { pdo_raise_impl_error(stmt-dbh, stmt, HY000, user-supplied function must be a valid callback TSRMLS_CC); + if (fname) { + efree(fname); + } return 0; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
pajoye Tue May 30 11:40:42 2006 UTC Modified files: /CVSROOTavail Log: - pear karma for Jan Kneschke http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1134r2=1.1135diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1134 CVSROOT/avail:1.1135 --- CVSROOT/avail:1.1134Wed May 17 08:34:16 2006 +++ CVSROOT/avail Tue May 30 11:40:42 2006 @@ -59,7 +59,7 @@ # The PEAR Team has access to the full PEAR tree, the PEAR portion of # the PHP tree, the PEAR website, and the PEAR documentation. -avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,! darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant,hirose31,amistry,thesee,jausions|pear,peardoc +avail|andrew,moh,sterling,jon,jlp,sebastian,troels,urs,jpm,adaniel,tuupola,mj,metallic,richard,aj,andre,zimt,uw,bjoern,chregu,tfromm,subjective,cox,jmcastagnetto,kaltoft,jccann,amiller,mansion,zyprexia,alexmerz,yavo,clambert,vblavet,bernd,nohn,mog,mfischer,kvn,jan,eru,murahachibu,hayk,cain,nhoizey,aditus,ludoo,imajes,graeme,eriksson,jasonlotito,dallen,lsmith,timmyg,artka,tal,kk,cmv,rashid,alexios,baba,reywob,ekilfoil,antonio,sagi,jrust,mehl,dickmann,alan_k,fab,thku,busterb,miked,pgc,ctrlsoft,tychay,dexter,sachat,svenasse,mw21st,arahn,matthias,dias,jfbus,derick,chief,sigi,tony,olivier,nepto,voyteck,cnb,dams,peterk,ernani,edink,quipo,egnited,arnaud,mcmontero,mbretter,nicos,philip,xnoguer,sjr,meebey,jellybob,darkelder,max,dcowgill,daggilli,kuboa,ncowham,sklar,krausbn,ordnas,avb,polone,datenpunk,inorm,llucax,davey,moosh,et,mscifo,yunosh,thesaur,hburbach,ohill,cellog,hlellelid,rmcclain,vincent,heino,neufeind,didou,schst,alain,mrcool,mroch,mike,vgoebbels,mixtli,farell,pmjones,jw,! darknoise,tarjei,toby,danielc,ieure,metz,gurugeek,rich_y,asnagy,muesli,hcebay,khassani,zamana,aidan,dufuz,sergiosgc,kouber,enemerson,iridium,ortega,guillaume,koyama,scottmattocks,eric,wenz,goetsch,tacker,aph,bolk,cweiske,amt,jinxidoru,cbleek,nosey,abaker,jayeshsh,fredericpoeydome,sean,toggg,navin,pfischer,davidc,markus,cross,crafics,roychri,kore,troehr,sfrausch,bdunlap,drewish,firman,epte,timj,taak,ssuceveanu,bate,anant,hirose31,amistry,thesee,jausions,ostborn|pear,peardoc # PEAR bits in the main php-src module avail|cox,mj,vblavet,dickmann,tal,jmcastagnetto,alexmerz,cellog,pajoye,timj|php-src/pear,pear-core @@ -195,7 +195,7 @@ avail|steinm,uw|php-src/ext/pdf avail|jdonagher,david|php-src/ext/pfpro,pecl/pfpro avail|jah,chriskl|php-src/ext/pgsql,phpdoc/en/reference/pgsql,php-src/NEWS,php-src/ext/pdo_pgsql -avail|ostborn|php-src/ext/phpdoc,pecl/phpdoc,pecl/soap,pear/Image_GIS +avail|ostborn|php-src/ext/phpdoc,pecl/phpdoc,pecl/soap avail|delatbabel,justinpatrin|pear/Text_Wiki avail|clay|pear/VersionControl,pear/XML_RSS avail|mfonda|pear/Crypt_HMAC -- 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 /ext/date/tests bug37616.phpt date_constants.phpt
derick Tue May 30 13:08:00 2006 UTC Added files: /php-src/ext/date/tests bug37616.phpt date_constants.phpt Modified files: /php-src/ext/date php_date.c Log: - Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Patch by Hannes Magnusson) http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.93r2=1.94diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.93 php-src/ext/date/php_date.c:1.94 --- php-src/ext/date/php_date.c:1.93Sun May 14 17:30:26 2006 +++ php-src/ext/date/php_date.c Tue May 30 13:08:00 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.93 2006/05/14 17:30:26 derick Exp $ */ +/* $Id: php_date.c,v 1.94 2006/05/30 13:08:00 derick Exp $ */ #include php.h #include php_streams.h @@ -243,11 +243,87 @@ #define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db() +/* + * RFC822, Section 5.1: http://www.ietf.org/rfc/rfc822.txt + * date-time = [ day , ] date time; dd mm yy hh:mm:ss zzz + * day = Mon / Tue / Wed / Thu / Fri / Sat / Sun + * date= 1*2DIGIT month 2DIGIT; day month year e.g. 20 Jun 82 + * month = Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec + * time= hour zone; ANSI and Military + * hour= 2DIGIT : 2DIGIT [: 2DIGIT] ; 00:00:00 - 23:59:59 + * zone= UT / GMT / EST / EDT / CST / CDT / MST / MDT / PST / PDT / 1ALPHA / ( (+ / -) 4DIGIT ) + */ +#define DATE_FORMAT_RFC822 D, d M y H:i:s O + +/* + * RFC850, Section 2.1.4: http://www.ietf.org/rfc/rfc850.txt + * Format must be acceptable both to the ARPANET and to the getdate routine. + * One format that is acceptable to both is Weekday, DD-Mon-YY HH:MM:SS TIMEZONE + * TIMEZONE can be any timezone name (3 or more letters) + */ +#define DATE_FORMAT_RFC850 l, d-M-y H:i:s T + +/* + * RFC1036, Section 2.1.2: http://www.ietf.org/rfc/rfc1036.txt + * Its format must be acceptable both in RFC-822 and to the getdate(3) + * Wdy, DD Mon YY HH:MM:SS TIMEZONE + * There is no hope of having a complete list of timezones. Universal + * Time (GMT), the North American timezones (PST, PDT, MST, MDT, CST, + * CDT, EST, EDT) and the +/-hhmm offset specifed in RFC-822 should be supported. + */ +#define DATE_FORMAT_RFC1036 D, d M y H:i:s O + +/* + * RFC1123, Section 5.2.14: http://www.ietf.org/rfc/rfc1123.txt + * RFC-822 Date and Time Specification: RFC-822 Section 5 + * The syntax for the date is hereby changed to: date = 1*2DIGIT month 2*4DIGIT + */ +#define DATE_FORMAT_RFC1123 D, d M Y H:i:s O + +/* + * RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt + * FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space + * CFWS= *([FWS] comment) (([FWS] comment) / FWS) + * + * date-time = [ day-of-week , ] date FWS time [CFWS] + * day-of-week = ([FWS] day-name) + * day-name= Mon / Tue / Wed / Thu / Fri / Sat / Sun + * date= day month year + * year= 4*DIGIT + * month = (FWS month-name FWS) + * month-name = Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec + * day = ([FWS] 1*2DIGIT) + * time= time-of-day FWS zone + * time-of-day = hour : minute [ : second ] + * hour= 2DIGIT + * minute = 2DIGIT + * second = 2DIGIT + * zone= (( + / - ) 4DIGIT) + */ +#define DATE_FORMAT_RFC2822 D, d M Y H:i:s O +/* + * RFC3339, Section 5.6: http://www.ietf.org/rfc/rfc3339.txt + * date-fullyear = 4DIGIT + * date-month = 2DIGIT ; 01-12 + * date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year + * + * time-hour = 2DIGIT ; 00-23 + * time-minute = 2DIGIT ; 00-59 + * time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap second rules + * + * time-secfrac= . 1*DIGIT + * time-numoffset = (+ / -) time-hour : time-minute + * time-offset = Z / time-numoffset + * + * partial-time= time-hour : time-minute : time-second [time-secfrac] + * full-date = date-fullyear - date-month - date-mday + * full-time = partial-time time-offset + * + * date-time = full-date T full-time + */ #define DATE_FORMAT_RFC3339 Y-m-d\\TH:i:sP + #define DATE_FORMAT_ISO8601 Y-m-d\\TH:i:sO -#define DATE_FORMAT_RFC1036 l, d-M-y H:i:s T -#define DATE_FORMAT_RFC1123 D, d M Y H:i:s T -#define DATE_FORMAT_RFC2822 D, d M Y H:i:s O #define DATE_TZ_ERRMSG \ It is not safe to rely on the system's timezone settings. Please use \ @@ -272,8 +348,8 @@ REGISTER_STRING_CONSTANT(DATE_ATOM,
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/date php_date.c /ext/date/tests bug37616.phpt date_constants.phpt
derick Tue May 30 13:12:21 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/date/tests bug37616.phpt date_constants.phpt Modified files: /php-srcNEWS /php-src/ext/date php_date.c Log: - MFH: Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Patch by Hannes Magnusson) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.63r2=1.2027.2.547.2.64diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.63 php-src/NEWS:1.2027.2.547.2.64 --- php-src/NEWS:1.2027.2.547.2.63 Mon May 29 20:07:39 2006 +++ php-src/NEWSTue May 30 13:12:21 2006 @@ -48,6 +48,8 @@ - Fixed memory leaks in openssl streams context options (Pierre) - Fixed handling of extremely long paths inside tempnam() function. (Ilia) - Fixed bug #37632 (Protected method access problem). (Marcus) +- Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Hannes + Magnusson, Derick) - Fixed bug #37620 (mysqli_ssl_set validation is innappropriate). (Georg) - Fixed bug #37614 (Class name lowercased in error message). (Johannes) - Fixed bug #37587 (var without attribute causes segfault). (Marcus) http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.3r2=1.43.2.45.2.4diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.3 php-src/ext/date/php_date.c:1.43.2.45.2.4 --- php-src/ext/date/php_date.c:1.43.2.45.2.3 Sun May 14 17:35:56 2006 +++ php-src/ext/date/php_date.c Tue May 30 13:12:21 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.3 2006/05/14 17:35:56 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.4 2006/05/30 13:12:21 derick Exp $ */ #include php.h #include php_streams.h @@ -237,11 +237,87 @@ #define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db() +/* + * RFC822, Section 5.1: http://www.ietf.org/rfc/rfc822.txt + * date-time = [ day , ] date time; dd mm yy hh:mm:ss zzz + * day = Mon / Tue / Wed / Thu / Fri / Sat / Sun + * date= 1*2DIGIT month 2DIGIT; day month year e.g. 20 Jun 82 + * month = Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec + * time= hour zone; ANSI and Military + * hour= 2DIGIT : 2DIGIT [: 2DIGIT] ; 00:00:00 - 23:59:59 + * zone= UT / GMT / EST / EDT / CST / CDT / MST / MDT / PST / PDT / 1ALPHA / ( (+ / -) 4DIGIT ) + */ +#define DATE_FORMAT_RFC822 D, d M y H:i:s O + +/* + * RFC850, Section 2.1.4: http://www.ietf.org/rfc/rfc850.txt + * Format must be acceptable both to the ARPANET and to the getdate routine. + * One format that is acceptable to both is Weekday, DD-Mon-YY HH:MM:SS TIMEZONE + * TIMEZONE can be any timezone name (3 or more letters) + */ +#define DATE_FORMAT_RFC850 l, d-M-y H:i:s T + +/* + * RFC1036, Section 2.1.2: http://www.ietf.org/rfc/rfc1036.txt + * Its format must be acceptable both in RFC-822 and to the getdate(3) + * Wdy, DD Mon YY HH:MM:SS TIMEZONE + * There is no hope of having a complete list of timezones. Universal + * Time (GMT), the North American timezones (PST, PDT, MST, MDT, CST, + * CDT, EST, EDT) and the +/-hhmm offset specifed in RFC-822 should be supported. + */ +#define DATE_FORMAT_RFC1036 D, d M y H:i:s O + +/* + * RFC1123, Section 5.2.14: http://www.ietf.org/rfc/rfc1123.txt + * RFC-822 Date and Time Specification: RFC-822 Section 5 + * The syntax for the date is hereby changed to: date = 1*2DIGIT month 2*4DIGIT + */ +#define DATE_FORMAT_RFC1123 D, d M Y H:i:s O + +/* + * RFC2822, Section 3.3: http://www.ietf.org/rfc/rfc2822.txt + * FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space + * CFWS= *([FWS] comment) (([FWS] comment) / FWS) + * + * date-time = [ day-of-week , ] date FWS time [CFWS] + * day-of-week = ([FWS] day-name) + * day-name= Mon / Tue / Wed / Thu / Fri / Sat / Sun + * date= day month year + * year= 4*DIGIT + * month = (FWS month-name FWS) + * month-name = Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec + * day = ([FWS] 1*2DIGIT) + * time= time-of-day FWS zone + * time-of-day = hour : minute [ : second ] + * hour= 2DIGIT + * minute = 2DIGIT + * second = 2DIGIT + * zone= (( + / - ) 4DIGIT) + */ +#define DATE_FORMAT_RFC2822 D, d M Y H:i:s O +/* + * RFC3339, Section 5.6: http://www.ietf.org/rfc/rfc3339.txt + * date-fullyear = 4DIGIT + * date-month = 2DIGIT ; 01-12 + * date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on month/year + * + *
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests bug37616.phpt date_constants.phpt
derick Tue May 30 13:14:51 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date/tests bug37616.phpt date_constants.phpt Log: - Now as text and not HTML. http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/bug37616.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/date/tests/bug37616.phpt diff -u php-src/ext/date/tests/bug37616.phpt:1.1.2.2 php-src/ext/date/tests/bug37616.phpt:1.1.2.3 --- php-src/ext/date/tests/bug37616.phpt:1.1.2.2Tue May 30 13:12:21 2006 +++ php-src/ext/date/tests/bug37616.phptTue May 30 13:14:51 2006 @@ -1,3 +1,9 @@ -codespan style=color: #00 ---TEST--br /Bugnbsp;#37616nbsp;(DATE_RFC822nbsp;doesnbsp;notnbsp;productnbsp;RFCnbsp;822nbsp;dates)br /--FILE--br /span style=color: #BBlt;?phpbr /nbsp;nbsp;nbsp;nbsp;date_default_timezone_set/spanspan style=color: #007700(/spanspan style=color: #DDEurope/Oslo/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BBDATE_RFC822/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD1nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200/spanspan style=color: #007700)));br //spanspan style=color: #BB?gt;br //span--EXPECT--br /string(29)nbsp;Sat,nbsp;01nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200br //span -/code \ No newline at end of file +--TEST-- +Bug #37616 (DATE_RFC822 does not product RFC 822 dates) +--FILE-- +?php +date_default_timezone_set(Europe/Oslo); +var_dump(date(DATE_RFC822, strtotime(1 Jul 06 14:27:30 +0200))); +? +--EXPECT-- +string(29) Sat, 01 Jul 06 14:27:30 +0200 http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.1.2.2 php-src/ext/date/tests/date_constants.phpt:1.1.2.3 --- php-src/ext/date/tests/date_constants.phpt:1.1.2.2 Tue May 30 13:12:21 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 13:14:51 2006 @@ -1,3 +1,44 @@ -codespan style=color: #00 ---TEST--br /Datenbsp;constantsbr /--FILE--br /span style=color: #BBlt;?phpbr /nbsp;nbsp;nbsp;nbsp;date_default_timezone_set/spanspan style=color: #007700(/spanspan style=color: #DDEurope/Oslo/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BB$constantsnbsp;/spanspan style=color: #007700=nbsp;array(br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_ATOM/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_COOKIE/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_ISO8601/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC822/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;! nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC850/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC1036/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC1123/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC2822/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RSS/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_W3Cbr /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;br /nbsp;nbsp;nbsp;nbsp;foreach(/spanspan style=color: #BB$constantsnbsp;/spanspan style=color: #007700asnbsp;/spa! nspan style=color: #BB$const/spanspan style=color: #00770 0)nbsp;{br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BB$const/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD1nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200/spanspan style=color: #007700)));br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BB$const/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD2006-05-30T14:32:13+02:00/spanspan style=color: #007700! )));br /nbsp;nbsp;nbsp;nbsp;}br //spanspan style=color: #BB?gt;br //span--EXPECT--br
[PHP-CVS] cvs: php-src /ext/date/tests bug37616.phpt date_constants.phpt
derick Tue May 30 13:15:10 2006 UTC Modified files: /php-src/ext/date/tests bug37616.phpt date_constants.phpt Log: - Now as text and not HTML. http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/bug37616.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/bug37616.phpt diff -u php-src/ext/date/tests/bug37616.phpt:1.1 php-src/ext/date/tests/bug37616.phpt:1.2 --- php-src/ext/date/tests/bug37616.phpt:1.1Tue May 30 13:08:00 2006 +++ php-src/ext/date/tests/bug37616.phptTue May 30 13:15:10 2006 @@ -1,3 +1,9 @@ -codespan style=color: #00 ---TEST--br /Bugnbsp;#37616nbsp;(DATE_RFC822nbsp;doesnbsp;notnbsp;productnbsp;RFCnbsp;822nbsp;dates)br /--FILE--br /span style=color: #BBlt;?phpbr /nbsp;nbsp;nbsp;nbsp;date_default_timezone_set/spanspan style=color: #007700(/spanspan style=color: #DDEurope/Oslo/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BBDATE_RFC822/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD1nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200/spanspan style=color: #007700)));br //spanspan style=color: #BB?gt;br //span--EXPECT--br /string(29)nbsp;Sat,nbsp;01nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200br //span -/code \ No newline at end of file +--TEST-- +Bug #37616 (DATE_RFC822 does not product RFC 822 dates) +--FILE-- +?php +date_default_timezone_set(Europe/Oslo); +var_dump(date(DATE_RFC822, strtotime(1 Jul 06 14:27:30 +0200))); +? +--EXPECT-- +string(29) Sat, 01 Jul 06 14:27:30 +0200 http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.1 php-src/ext/date/tests/date_constants.phpt:1.2 --- php-src/ext/date/tests/date_constants.phpt:1.1 Tue May 30 13:08:00 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 13:15:10 2006 @@ -1,3 +1,44 @@ -codespan style=color: #00 ---TEST--br /Datenbsp;constantsbr /--FILE--br /span style=color: #BBlt;?phpbr /nbsp;nbsp;nbsp;nbsp;date_default_timezone_set/spanspan style=color: #007700(/spanspan style=color: #DDEurope/Oslo/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BB$constantsnbsp;/spanspan style=color: #007700=nbsp;array(br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_ATOM/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_COOKIE/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_ISO8601/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC822/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;! nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC850/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC1036/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC1123/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RFC2822/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_RSS/spanspan style=color: #007700,br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBDATE_W3Cbr /nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #007700);br /nbsp;nbsp;nbsp;nbsp;br /nbsp;nbsp;nbsp;nbsp;foreach(/spanspan style=color: #BB$constantsnbsp;/spanspan style=color: #007700asnbsp;/spa! nspan style=color: #BB$const/spanspan style=color: #00770 0)nbsp;{br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BB$const/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD1nbsp;Julnbsp;06nbsp;14:27:30nbsp;+0200/spanspan style=color: #007700)));br /nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/spanspan style=color: #BBvar_dump/spanspan style=color: #007700(/spanspan style=color: #BBdate/spanspan style=color: #007700(/spanspan style=color: #BB$const/spanspan style=color: #007700,nbsp;/spanspan style=color: #BBstrtotime/spanspan style=color: #007700(/spanspan style=color: #DD2006-05-30T14:32:13+02:00/spanspan style=color: #007700! )));br /nbsp;nbsp;nbsp;nbsp;}br //spanspan style=color: #BB?gt;br //span--EXPECT--br /string(25)nbsp;2006-07-01T14:27:30+02:00br
[PHP-CVS] cvs: php-src /ext/oci8 config.m4
tony2001Tue May 30 13:16:38 2006 UTC Modified files: /php-src/ext/oci8 config.m4 Log: don't require libociei, this allows us to build ext/oci8 against basiclite OIC package http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/config.m4?r1=1.60r2=1.61diff_format=u Index: php-src/ext/oci8/config.m4 diff -u php-src/ext/oci8/config.m4:1.60 php-src/ext/oci8/config.m4:1.61 --- php-src/ext/oci8/config.m4:1.60 Mon May 29 18:12:39 2006 +++ php-src/ext/oci8/config.m4 Tue May 30 13:16:38 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.60 2006/05/29 18:12:39 tony2001 Exp $ +dnl $Id: config.m4,v 1.61 2006/05/30 13:16:38 tony2001 Exp $ dnl if test -z $SED; then @@ -50,7 +50,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client version]) - if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz10.$SHLIB_SUFFIX_NAME; then if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found]) -- 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) /ext/oci8 config.m4
tony2001Tue May 30 13:16:48 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 config.m4 Log: MFH: don't require libociei, this allows us to build ext/oci8 against basiclite OIC package http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/config.m4?r1=1.55.2.3.2.1r2=1.55.2.3.2.2diff_format=u Index: php-src/ext/oci8/config.m4 diff -u php-src/ext/oci8/config.m4:1.55.2.3.2.1 php-src/ext/oci8/config.m4:1.55.2.3.2.2 --- php-src/ext/oci8/config.m4:1.55.2.3.2.1 Mon May 29 18:12:55 2006 +++ php-src/ext/oci8/config.m4 Tue May 30 13:16:48 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.55.2.3.2.1 2006/05/29 18:12:55 tony2001 Exp $ +dnl $Id: config.m4,v 1.55.2.3.2.2 2006/05/30 13:16:48 tony2001 Exp $ dnl if test -z $SED; then @@ -50,7 +50,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client version]) - if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz10.$SHLIB_SUFFIX_NAME; then if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
derick Tue May 30 13:26:29 2006 UTC Modified files: /CVSROOTavail Log: - Give Magnus access to ext/date http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1135r2=1.1136diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1135 CVSROOT/avail:1.1136 --- CVSROOT/avail:1.1135Tue May 30 11:40:42 2006 +++ CVSROOT/avail Tue May 30 13:26:29 2006 @@ -244,7 +244,7 @@ avail|mbretter,philippe|pecl/radius,pecl/mqseries avail|mcmontero,blade106|pecl/imagick avail|schst,lucamariano|pear/Net_Server -avail|bjori|pear/Net_FTP,pear/Validate +avail|bjori|pear/Net_FTP,pear/Validate,php-src/ext/date avail|cyberscribe|pear/Net_Monitor avail|mroch|pear/XML_RPC avail|olivierg|peardoc,pear/XML_Indexing,pear/Structures_DataGrid -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_4) /ext/oci8 config.m4
tony2001Tue May 30 13:50:28 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/oci8 config.m4 Log: merge the last change in 4.4 and allow ext/oci8 to be built against basic lite package (as Derick requested) http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/config.m4?r1=1.37.2.12r2=1.37.2.12.2.1diff_format=u Index: php-src/ext/oci8/config.m4 diff -u php-src/ext/oci8/config.m4:1.37.2.12 php-src/ext/oci8/config.m4:1.37.2.12.2.1 --- php-src/ext/oci8/config.m4:1.37.2.12Fri Feb 25 11:33:24 2005 +++ php-src/ext/oci8/config.m4 Tue May 30 13:50:28 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.37.2.12 2005/02/25 11:33:24 tony2001 Exp $ +dnl $Id: config.m4,v 1.37.2.12.2.1 2006/05/30 13:50:28 tony2001 Exp $ dnl AC_DEFUN([PHP_OCI_IF_DEFINED],[ @@ -45,7 +45,7 @@ AC_DEFUN([AC_OCI8IC_VERSION],[ AC_MSG_CHECKING([Oracle Instant Client version]) - if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then + if test -f $PHP_OCI8_INSTANT_CLIENT/libnnz10.$SHLIB_SUFFIX_NAME; then if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found]) -- 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 /ext/date/tests date_constants.phpt
bjori Tue May 30 14:45:16 2006 UTC Modified files: /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: Fixed DATE_COOKIE DATE_RSS Fixed tests Add comments # My first php-src/ commit! :) http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.94r2=1.95diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.94 php-src/ext/date/php_date.c:1.95 --- php-src/ext/date/php_date.c:1.94Tue May 30 13:08:00 2006 +++ php-src/ext/date/php_date.c Tue May 30 14:45:16 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.94 2006/05/30 13:08:00 derick Exp $ */ +/* $Id: php_date.c,v 1.95 2006/05/30 14:45:16 bjori Exp $ */ #include php.h #include php_streams.h @@ -345,8 +345,21 @@ date_register_classes(TSRMLS_C); +/* + * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt + * A Date construct is an element whose content MUST conform to the + * date-time production in [RFC3339]. In addition, an uppercase T + * character MUST be used to separate date and time, and an uppercase + * Z character MUST be present in the absence of a numeric time zone offset. + */ REGISTER_STRING_CONSTANT(DATE_ATOM,DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT(DATE_COOKIE, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); +/* + * Preliminary specification: http://wp.netscape.com/newsref/std/cookie_spec.html + * This is based on RFC 822, RFC 850, RFC 1036, and RFC 1123, + * with the variations that the only legal time zone is GMT + * and the separators between the elements of the date must be dashes. + */ + REGISTER_STRING_CONSTANT(DATE_COOKIE, DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_ISO8601, DATE_FORMAT_ISO8601, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC822, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC850, DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT); @@ -354,7 +367,11 @@ REGISTER_STRING_CONSTANT(DATE_RFC1123, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC2822, DATE_FORMAT_RFC2822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC3339, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); +/* + * RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss + * All date-times in RSS conform to the Date and Time Specification of RFC 822 + */ + REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_W3C, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); @@ -1413,7 +1430,7 @@ zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); REGISTER_DATE_CLASS_CONST_STRING(ATOM,DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING(COOKIE, DATE_FORMAT_RFC1123); + REGISTER_DATE_CLASS_CONST_STRING(COOKIE, DATE_FORMAT_RFC850); REGISTER_DATE_CLASS_CONST_STRING(ISO8601, DATE_FORMAT_ISO8601); REGISTER_DATE_CLASS_CONST_STRING(RFC822, DATE_FORMAT_RFC822); REGISTER_DATE_CLASS_CONST_STRING(RFC850, DATE_FORMAT_RFC850); @@ -1421,7 +1438,7 @@ REGISTER_DATE_CLASS_CONST_STRING(RFC1123, DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING(RFC2822, DATE_FORMAT_RFC2822); REGISTER_DATE_CLASS_CONST_STRING(RFC3339, DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC1123); + REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC822); REGISTER_DATE_CLASS_CONST_STRING(W3C, DATE_FORMAT_RFC3339); http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.2 php-src/ext/date/tests/date_constants.phpt:1.3 --- php-src/ext/date/tests/date_constants.phpt:1.2 Tue May 30 13:15:10 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 14:45:16 2006 @@ -24,8 +24,8 @@ --EXPECT-- string(25) 2006-07-01T14:27:30+02:00 string(25) 2006-05-30T14:32:13+02:00 -string(31) Sat, 01 Jul 2006 14:27:30 +0200 -string(31) Tue, 30 May 2006 14:32:13 +0200 +string(33) Saturday, 01-Jul-06 14:27:30 CEST +string(32) Tuesday, 30-May-06 14:32:13 CEST string(24) 2006-07-01T14:27:30+0200 string(24) 2006-05-30T14:32:13+0200 string(29) Sat, 01 Jul 06 14:27:30 +0200 @@ -38,7 +38,7 @@ string(31) Tue, 30 May 2006 14:32:13 +0200 string(31) Sat, 01 Jul 2006
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c /ext/date/tests date_constants.phpt
bjori Tue May 30 14:46:46 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: MFH: Fixed DATE_COOKIE, DATE_RSS tests http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.4r2=1.43.2.45.2.5diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.4 php-src/ext/date/php_date.c:1.43.2.45.2.5 --- php-src/ext/date/php_date.c:1.43.2.45.2.4 Tue May 30 13:12:21 2006 +++ php-src/ext/date/php_date.c Tue May 30 14:46:45 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.4 2006/05/30 13:12:21 derick Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.5 2006/05/30 14:46:45 bjori Exp $ */ #include php.h #include php_streams.h @@ -339,8 +339,21 @@ #ifdef EXPERIMENTAL_DATE_SUPPORT date_register_classes(TSRMLS_C); #endif +/* + * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt + * A Date construct is an element whose content MUST conform to the + * date-time production in [RFC3339]. In addition, an uppercase T + * character MUST be used to separate date and time, and an uppercase + * Z character MUST be present in the absence of a numeric time zone offset. + */ REGISTER_STRING_CONSTANT(DATE_ATOM,DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT(DATE_COOKIE, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); +/* + * Preliminary specification: http://wp.netscape.com/newsref/std/cookie_spec.html + * This is based on RFC 822, RFC 850, RFC 1036, and RFC 1123, + * with the variations that the only legal time zone is GMT + * and the separators between the elements of the date must be dashes. + */ + REGISTER_STRING_CONSTANT(DATE_COOKIE, DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_ISO8601, DATE_FORMAT_ISO8601, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC822, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC850, DATE_FORMAT_RFC850, CONST_CS | CONST_PERSISTENT); @@ -348,7 +361,11 @@ REGISTER_STRING_CONSTANT(DATE_RFC1123, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC2822, DATE_FORMAT_RFC2822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_RFC3339, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); +/* + * RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss + * All date-times in RSS conform to the Date and Time Specification of RFC 822 + */ + REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_W3C, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); @@ -1285,7 +1302,7 @@ zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC); REGISTER_DATE_CLASS_CONST_STRING(ATOM,DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING(COOKIE, DATE_FORMAT_RFC1123); + REGISTER_DATE_CLASS_CONST_STRING(COOKIE, DATE_FORMAT_RFC850); REGISTER_DATE_CLASS_CONST_STRING(ISO8601, DATE_FORMAT_ISO8601); REGISTER_DATE_CLASS_CONST_STRING(RFC822, DATE_FORMAT_RFC822); REGISTER_DATE_CLASS_CONST_STRING(RFC850, DATE_FORMAT_RFC850); @@ -1293,7 +1310,7 @@ REGISTER_DATE_CLASS_CONST_STRING(RFC1123, DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING(RFC2822, DATE_FORMAT_RFC2822); REGISTER_DATE_CLASS_CONST_STRING(RFC3339, DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC1123); + REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC822); REGISTER_DATE_CLASS_CONST_STRING(W3C, DATE_FORMAT_RFC3339); http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.1.2.3 php-src/ext/date/tests/date_constants.phpt:1.1.2.4 --- php-src/ext/date/tests/date_constants.phpt:1.1.2.3 Tue May 30 13:14:51 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 14:46:46 2006 @@ -24,8 +24,8 @@ --EXPECT-- string(25) 2006-07-01T14:27:30+02:00 string(25) 2006-05-30T14:32:13+02:00 -string(31) Sat, 01 Jul 2006 14:27:30 +0200 -string(31) Tue, 30 May 2006 14:32:13 +0200 +string(33) Saturday, 01-Jul-06 14:27:30 CEST +string(32) Tuesday, 30-May-06 14:32:13 CEST string(24) 2006-07-01T14:27:30+0200 string(24) 2006-05-30T14:32:13+0200 string(29) Sat, 01 Jul 06 14:27:30 +0200 @@ -38,7
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c php_var.h var.c
iliaa Tue May 30 14:51:21 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard var.c php_var.h basic_functions.c /php-srcNEWS Log: Added memory_get_peak_usage() function for retrieving peak memory usage of a PHP script. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var.c?r1=1.203.2.7r2=1.203.2.7.2.1diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.203.2.7 php-src/ext/standard/var.c:1.203.2.7.2.1 --- php-src/ext/standard/var.c:1.203.2.7Wed Apr 5 02:28:06 2006 +++ php-src/ext/standard/var.c Tue May 30 14:51:20 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var.c,v 1.203.2.7 2006/04/05 02:28:06 iliaa Exp $ */ +/* $Id: var.c,v 1.203.2.7.2.1 2006/05/30 14:51:20 iliaa Exp $ */ @@ -918,6 +918,12 @@ RETURN_LONG(AG(allocated_memory)); } /* }}} */ +/* {{{ proto int memory_get_peak_usage() +Returns the peak allocated by PHP memory */ +PHP_FUNCTION(memory_get_peak_usage) { + RETURN_LONG(AG(allocated_memory_peak)); +} +/* }}} */ #endif /* http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_var.h?r1=1.30.2.1r2=1.30.2.1.2.1diff_format=u Index: php-src/ext/standard/php_var.h diff -u php-src/ext/standard/php_var.h:1.30.2.1 php-src/ext/standard/php_var.h:1.30.2.1.2.1 --- php-src/ext/standard/php_var.h:1.30.2.1 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/php_var.h Tue May 30 14:51:20 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_var.h,v 1.30.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: php_var.h,v 1.30.2.1.2.1 2006/05/30 14:51:20 iliaa Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -30,6 +30,7 @@ PHP_FUNCTION(unserialize); #if MEMORY_LIMIT PHP_FUNCTION(memory_get_usage); +PHP_FUNCTION(memory_get_peak_usage); #endif PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.4r2=1.725.2.31.2.5diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.4 php-src/ext/standard/basic_functions.c:1.725.2.31.2.5 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.4 Wed May 24 23:14:08 2006 +++ php-src/ext/standard/basic_functions.c Tue May 30 14:51:20 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.4 2006/05/24 23:14:08 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.5 2006/05/30 14:51:20 iliaa Exp $ */ #include php.h #include php_streams.h @@ -466,6 +466,7 @@ PHP_FE(print_r, NULL) #if MEMORY_LIMIT PHP_FE(memory_get_usage, NULL) + PHP_FE(memory_get_peak_usage, NULL) #endif PHP_FE(register_shutdown_function, NULL) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.64r2=1.2027.2.547.2.65diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.64 php-src/NEWS:1.2027.2.547.2.65 --- php-src/NEWS:1.2027.2.547.2.64 Tue May 30 13:12:21 2006 +++ php-src/NEWSTue May 30 14:51:20 2006 @@ -1,6 +1,8 @@ PHPNEWS ||| ?? ??? 2006, PHP 5.2.0 +- Added memory_get_peak_usage() function for retrieving peak memory usage of + a PHP script. (Ilia) - Changed Apache 2 Handler SAPI to call ap_set_content_type() once only. (Mike) - Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus) - Added control character checks for cURL extension's open_basedir/safe_mode -- 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 php_var.h var.c
iliaa Tue May 30 14:51:54 2006 UTC Modified files: /php-src/ext/standard var.c php_var.h basic_functions.c Log: MFB: Added memory_get_peak_usage() function for retrieving peak memory usage of a PHP script. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/var.c?r1=1.230r2=1.231diff_format=u Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.230 php-src/ext/standard/var.c:1.231 --- php-src/ext/standard/var.c:1.230Wed Apr 5 02:28:39 2006 +++ php-src/ext/standard/var.c Tue May 30 14:51:54 2006 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: var.c,v 1.230 2006/04/05 02:28:39 iliaa Exp $ */ +/* $Id: var.c,v 1.231 2006/05/30 14:51:54 iliaa Exp $ */ @@ -1154,6 +1154,12 @@ RETURN_LONG(AG(allocated_memory)); } /* }}} */ +/* {{{ proto int memory_get_peak_usage() +Returns the peak allocated by PHP memory */ +PHP_FUNCTION(memory_get_peak_usage) { + RETURN_LONG(AG(allocated_memory_peak)); +} +/* }}} */ #endif /* http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/php_var.h?r1=1.32r2=1.33diff_format=u Index: php-src/ext/standard/php_var.h diff -u php-src/ext/standard/php_var.h:1.32 php-src/ext/standard/php_var.h:1.33 --- php-src/ext/standard/php_var.h:1.32 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/php_var.h Tue May 30 14:51:54 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_var.h,v 1.32 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: php_var.h,v 1.33 2006/05/30 14:51:54 iliaa Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -31,6 +31,7 @@ PHP_FUNCTION(unserialize); #if MEMORY_LIMIT PHP_FUNCTION(memory_get_usage); +PHP_FUNCTION(memory_get_peak_usage); #endif PHPAPI void php_var_dump(zval **struc, int level, int verbose TSRMLS_DC); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.774r2=1.775diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.774 php-src/ext/standard/basic_functions.c:1.775 --- php-src/ext/standard/basic_functions.c:1.774Wed May 24 23:14:36 2006 +++ php-src/ext/standard/basic_functions.c Tue May 30 14:51:54 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.774 2006/05/24 23:14:36 iliaa Exp $ */ +/* $Id: basic_functions.c,v 1.775 2006/05/30 14:51:54 iliaa Exp $ */ #include php.h #include php_streams.h @@ -464,6 +464,7 @@ PHP_FE(print_r, NULL) #if MEMORY_LIMIT PHP_FE(memory_get_usage, NULL) + PHP_FE(memory_get_peak_usage, NULL) #endif PHP_FE(register_shutdown_function, NULL) -- 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) /ext/mbstring mbstring.c
masugataTue May 30 15:38:23 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c Log: added option parameter mb_list_encodings( ). http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.1r2=1.224.2.22.2.2diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.1 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.2 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.1 Thu May 11 14:42:12 2006 +++ php-src/ext/mbstring/mbstring.c Tue May 30 15:38:22 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.1 2006/05/11 14:42:12 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.2 2006/05/30 15:38:22 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -2325,19 +2325,41 @@ } /* }}} */ -/* {{{ proto array mb_list_encodings() - Returns an array of all supported encodings */ +/* {{{ proto mixed mb_list_encodings([string alias_encoding]) + Returns an array of all supported entity encodings or Returns the entity encoding as a string */ PHP_FUNCTION(mb_list_encodings) { const mbfl_encoding **encodings; const mbfl_encoding *encoding; + enum mbfl_no_encoding no_encoding; int i; + char *name = NULL; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, name, name_len) == FAILURE) { + RETURN_FALSE; + } - array_init(return_value); - i = 0; - encodings = mbfl_get_supported_encodings(); - while ((encoding = encodings[i++]) != NULL) { - add_next_index_string(return_value, (char *) encoding-name, 1); + if (name == NULL) { + array_init(return_value); + i = 0; + encodings = mbfl_get_supported_encodings(); + while ((encoding = encodings[i++]) != NULL) { + add_next_index_string(return_value, (char *) encoding-name, 1); + } + } else { + no_encoding = mbfl_name2no_encoding(name); + if (no_encoding == mbfl_no_encoding_invalid) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding \%s\, name); + RETURN_FALSE; + } + + name = (char *)mbfl_no_encoding2name(no_encoding); + if (name != NULL) { + RETURN_STRING(name, 1); + } else { + RETURN_FALSE; + } } } /* }}} */ -- 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) /ext/mbstring mbstring.c mbstring.h
masugataTue May 30 15:40:39 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c mbstring.h Log: added mb_list_encodings_alias_names( ), mb_list_mime_names( ). http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.2r2=1.224.2.22.2.3diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.2 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.3 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.2 Tue May 30 15:38:22 2006 +++ php-src/ext/mbstring/mbstring.c Tue May 30 15:40:39 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.2 2006/05/30 15:38:22 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.3 2006/05/30 15:40:39 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -212,6 +212,8 @@ PHP_FE(mb_convert_encoding, NULL) PHP_FE(mb_detect_encoding, NULL) PHP_FE(mb_list_encodings, NULL) + PHP_FE(mb_list_encodings_alias_names, NULL) + PHP_FE(mb_list_mime_names, NULL) PHP_FE(mb_convert_kana, NULL) PHP_FE(mb_encode_mimeheader,NULL) PHP_FE(mb_decode_mimeheader,NULL) @@ -2364,6 +2366,122 @@ } /* }}} */ +/* {{{ proto array mb_list_encodings_alias_names([string encoding]) + Returns an array of all supported alias encodings */ +PHP_FUNCTION(mb_list_encodings_alias_names) +{ + const mbfl_encoding **encodings; + const mbfl_encoding *encoding; + enum mbfl_no_encoding no_encoding; + int i, j; + zval *row; + char *name = NULL; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, name, name_len) == FAILURE) { + RETURN_FALSE; + } + + if (name == NULL) { + array_init(return_value); + i = 0; + encodings = mbfl_get_supported_encodings(); + while ((encoding = encodings[i++]) != NULL) { + MAKE_STD_ZVAL(row); + array_init(row); + if (encoding-aliases != NULL) { + j = 0; + while ((*encoding-aliases)[j] != NULL) { + add_next_index_string(row, (char *)(*encoding-aliases)[j], 1); + j++; + } + } + add_assoc_zval(return_value, (char *) encoding-name, row); + } + } else { + no_encoding = mbfl_name2no_encoding(name); + if (no_encoding == mbfl_no_encoding_invalid) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding \%s\, name); + RETURN_FALSE; + } + + name = (char *)mbfl_no_encoding2name(no_encoding); + if (name != NULL) { + i = 0; + encodings = mbfl_get_supported_encodings(); + while ((encoding = encodings[i++]) != NULL) { + if (strcmp(encoding-name, name) != 0){ continue; } + + array_init(return_value); + if (encoding-aliases != NULL) { + j = 0; + while ((*encoding-aliases)[j] != NULL) { + add_next_index_string(return_value, (char *)(*encoding-aliases)[j], 1); + j++; + } + } + + break; + } + } else { + RETURN_FALSE; + } + } +} +/* }}} */ + +/* {{{ proto mixed mb_list_mime_names([string encoding]) + Returns an array or string of all supported mime names */ +PHP_FUNCTION(mb_list_mime_names) +{ + const mbfl_encoding **encodings; + const mbfl_encoding *encoding; + enum mbfl_no_encoding no_encoding; + int i; + char *name = NULL; + int name_len; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |s, name, name_len) == FAILURE) { + RETURN_FALSE; + } + + if (name == NULL) { + array_init(return_value); + i = 0; + encodings = mbfl_get_supported_encodings(); + while ((encoding = encodings[i++]) != NULL) { + if(encoding-mime_name != NULL) { + add_assoc_string(return_value, (char *) encoding-name, (char *) encoding-mime_name, 1); + } else{ +
[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests date_constants.phpt
bjori Tue May 30 15:13:36 2006 UTC Modified files: /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: Lets play nice and use 4digit years with DATE_RSS http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.95r2=1.96diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.95 php-src/ext/date/php_date.c:1.96 --- php-src/ext/date/php_date.c:1.95Tue May 30 14:45:16 2006 +++ php-src/ext/date/php_date.c Tue May 30 15:13:35 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.95 2006/05/30 14:45:16 bjori Exp $ */ +/* $Id: php_date.c,v 1.96 2006/05/30 15:13:35 bjori Exp $ */ #include php.h #include php_streams.h @@ -347,10 +347,10 @@ /* * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt - * A Date construct is an element whose content MUST conform to the - * date-time production in [RFC3339]. In addition, an uppercase T - * character MUST be used to separate date and time, and an uppercase - * Z character MUST be present in the absence of a numeric time zone offset. + * A Date construct is an element whose content MUST conform to the + * date-time production in [RFC3339]. In addition, an uppercase T + * character MUST be used to separate date and time, and an uppercase + * Z character MUST be present in the absence of a numeric time zone offset. */ REGISTER_STRING_CONSTANT(DATE_ATOM,DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* @@ -369,9 +369,10 @@ REGISTER_STRING_CONSTANT(DATE_RFC3339, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* * RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss - * All date-times in RSS conform to the Date and Time Specification of RFC 822 + * All date-times in RSS conform to the Date and Time Specification of RFC 822, + * with the exception that the year may be expressed with two characters or four characters (four preferred) */ - REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_W3C, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); @@ -1438,7 +1439,7 @@ REGISTER_DATE_CLASS_CONST_STRING(RFC1123, DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING(RFC2822, DATE_FORMAT_RFC2822); REGISTER_DATE_CLASS_CONST_STRING(RFC3339, DATE_FORMAT_RFC3339); - REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC822); + REGISTER_DATE_CLASS_CONST_STRING(RSS, DATE_FORMAT_RFC1123); REGISTER_DATE_CLASS_CONST_STRING(W3C, DATE_FORMAT_RFC3339); http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.3 php-src/ext/date/tests/date_constants.phpt:1.4 --- php-src/ext/date/tests/date_constants.phpt:1.3 Tue May 30 14:45:16 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 15:13:36 2006 @@ -38,7 +38,7 @@ string(31) Tue, 30 May 2006 14:32:13 +0200 string(31) Sat, 01 Jul 2006 14:27:30 +0200 string(31) Tue, 30 May 2006 14:32:13 +0200 -string(29) Sat, 01 Jul 06 14:27:30 +0200 -string(29) Tue, 30 May 06 14:32:13 +0200 +string(31) Sat, 01 Jul 2006 14:27:30 +0200 +string(31) Tue, 30 May 2006 14:32:13 +0200 string(25) 2006-07-01T14:27:30+02:00 string(25) 2006-05-30T14:32:13+02:00 -- 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) /ext/date php_date.c /ext/date/tests date_constants.phpt
bjori Tue May 30 15:14:22 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/date php_date.c /php-src/ext/date/tests date_constants.phpt Log: MFH: Play nice, use 4digit years in DATE_RSS http://cvs.php.net/viewcvs.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.5r2=1.43.2.45.2.6diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.43.2.45.2.5 php-src/ext/date/php_date.c:1.43.2.45.2.6 --- php-src/ext/date/php_date.c:1.43.2.45.2.5 Tue May 30 14:46:45 2006 +++ php-src/ext/date/php_date.c Tue May 30 15:14:22 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_date.c,v 1.43.2.45.2.5 2006/05/30 14:46:45 bjori Exp $ */ +/* $Id: php_date.c,v 1.43.2.45.2.6 2006/05/30 15:14:22 bjori Exp $ */ #include php.h #include php_streams.h @@ -341,10 +341,10 @@ #endif /* * RFC4287, Section 3.3: http://www.ietf.org/rfc/rfc4287.txt - * A Date construct is an element whose content MUST conform to the - * date-time production in [RFC3339]. In addition, an uppercase T - * character MUST be used to separate date and time, and an uppercase - * Z character MUST be present in the absence of a numeric time zone offset. + * A Date construct is an element whose content MUST conform to the + * date-time production in [RFC3339]. In addition, an uppercase T + * character MUST be used to separate date and time, and an uppercase + * Z character MUST be present in the absence of a numeric time zone offset. */ REGISTER_STRING_CONSTANT(DATE_ATOM,DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* @@ -363,9 +363,10 @@ REGISTER_STRING_CONSTANT(DATE_RFC3339, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); /* * RSS 2.0 Specification: http://blogs.law.harvard.edu/tech/rss - * All date-times in RSS conform to the Date and Time Specification of RFC 822 + * All date-times in RSS conform to the Date and Time Specification of RFC 822, + * with the exception that the year may be expressed with two characters or four characters (four preferred) */ - REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC822, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT(DATE_RSS, DATE_FORMAT_RFC1123, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT(DATE_W3C, DATE_FORMAT_RFC3339, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_TIMESTAMP, CONST_CS | CONST_PERSISTENT); http://cvs.php.net/viewcvs.cgi/php-src/ext/date/tests/date_constants.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u Index: php-src/ext/date/tests/date_constants.phpt diff -u php-src/ext/date/tests/date_constants.phpt:1.1.2.4 php-src/ext/date/tests/date_constants.phpt:1.1.2.5 --- php-src/ext/date/tests/date_constants.phpt:1.1.2.4 Tue May 30 14:46:46 2006 +++ php-src/ext/date/tests/date_constants.phpt Tue May 30 15:14:22 2006 @@ -38,7 +38,7 @@ string(31) Tue, 30 May 2006 14:32:13 +0200 string(31) Sat, 01 Jul 2006 14:27:30 +0200 string(31) Tue, 30 May 2006 14:32:13 +0200 -string(29) Sat, 01 Jul 06 14:27:30 +0200 -string(29) Tue, 30 May 06 14:32:13 +0200 +string(31) Sat, 01 Jul 2006 14:27:30 +0200 +string(31) Tue, 30 May 2006 14:32:13 +0200 string(25) 2006-07-01T14:27:30+02:00 string(25) 2006-05-30T14:32:13+02:00 -- 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) /ext/mbstring mbstring.c mbstring.h
masugataTue May 30 15:43:09 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c mbstring.h Log: added mb_stripos( ), mb_strripos( ). http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.3r2=1.224.2.22.2.4diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.3 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.4 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.3 Tue May 30 15:40:39 2006 +++ php-src/ext/mbstring/mbstring.c Tue May 30 15:43:09 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.3 2006/05/30 15:40:39 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.4 2006/05/30 15:43:09 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -172,6 +172,8 @@ {MB_OVERLOAD_STRING, strlen, mb_strlen, mb_orig_strlen}, {MB_OVERLOAD_STRING, strpos, mb_strpos, mb_orig_strpos}, {MB_OVERLOAD_STRING, strrpos, mb_strrpos, mb_orig_strrpos}, + {MB_OVERLOAD_STRING, stripos, mb_stripos, mb_orig_stripos}, + {MB_OVERLOAD_STRING, strripos, mb_strripos, mb_orig_stripos}, {MB_OVERLOAD_STRING, substr, mb_substr, mb_orig_substr}, {MB_OVERLOAD_STRING, strtolower, mb_strtolower, mb_orig_strtolower}, {MB_OVERLOAD_STRING, strtoupper, mb_strtoupper, mb_orig_strtoupper}, @@ -204,6 +206,8 @@ PHP_FE(mb_strlen, NULL) PHP_FE(mb_strpos, NULL) PHP_FE(mb_strrpos, NULL) + PHP_FE(mb_stripos, NULL) + PHP_FE(mb_strripos, NULL) PHP_FE(mb_substr_count, NULL) PHP_FE(mb_substr, NULL) PHP_FE(mb_strcut, NULL) @@ -1677,6 +1681,58 @@ } /* }}} */ +/* {{{ proto int mb_stripos(string haystack, string needle [, int offset [, string encoding]]) + Finds position of first occurrence of a string within another, case insensitive */ +PHP_FUNCTION(mb_stripos) +{ + int n; + long offset; + char *old_haystack, *old_needle; + char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + int old_haystack_len, old_needle_len, from_encoding_len; + n = -1; + offset = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ls, old_haystack, old_haystack_len, old_needle, old_needle_len, offset, from_encoding, from_encoding_len ) == FAILURE) { + RETURN_FALSE; + } + + n = php_mb_stripos(0, old_haystack, old_haystack_len, old_needle, old_needle_len, offset, from_encoding TSRMLS_CC); + + if (n = 0) { + RETVAL_LONG(n); + } else { + RETVAL_FALSE; + } +} +/* }}} */ + +/* {{{ proto int mb_strripos(string haystack, string needle [, int offset [, string encoding]]) + Finds position of last occurrence of a string within another, case insensitive */ +PHP_FUNCTION(mb_strripos) +{ + int n; + long offset; + char *old_haystack, *old_needle; + char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + int old_haystack_len, old_needle_len, from_encoding_len; + n = -1; + offset = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|ls, old_haystack, old_haystack_len, old_needle, old_needle_len, offset, from_encoding, from_encoding_len ) == FAILURE) { + RETURN_FALSE; + } + + n = php_mb_stripos(1, old_haystack, old_haystack_len, old_needle, old_needle_len, offset, from_encoding TSRMLS_CC); + + if (n = 0) { + RETVAL_LONG(n); + } else { + RETVAL_FALSE; + } +} +/* }}} */ + /* {{{ proto int mb_substr_count(string haystack, string needle [, string encoding]) Count the number of substring occurrences */ PHP_FUNCTION(mb_substr_count) @@ -3997,6 +4053,71 @@ } /* }}} */ +/* {{{ MBSTRING_API int php_mb_stripos() + */ + +MBSTRING_API int php_mb_stripos(int mode, char *old_haystack, int old_haystack_len, char *old_needle, int old_needle_len, long offset, char *from_encoding TSRMLS_DC) +{ + int n; + mbfl_string haystack, needle; + n = -1; + + mbfl_string_init(haystack); + mbfl_string_init(needle); + haystack.no_language = MBSTRG(current_language); + haystack.no_encoding = MBSTRG(current_internal_encoding); + needle.no_language = MBSTRG(current_language); + needle.no_encoding = MBSTRG(current_internal_encoding); + + do { + haystack.val = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, old_haystack, (size_t) old_haystack_len, haystack.len, from_encoding TSRMLS_CC); + + if
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring mbstring.c mbstring.h
masugataTue May 30 15:45:35 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c mbstring.h Log: added mb_strstr( ), mb_strrchr( ). http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.4r2=1.224.2.22.2.5diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.4 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.5 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.4 Tue May 30 15:43:09 2006 +++ php-src/ext/mbstring/mbstring.c Tue May 30 15:45:35 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.4 2006/05/30 15:43:09 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.5 2006/05/30 15:45:35 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -174,6 +174,8 @@ {MB_OVERLOAD_STRING, strrpos, mb_strrpos, mb_orig_strrpos}, {MB_OVERLOAD_STRING, stripos, mb_stripos, mb_orig_stripos}, {MB_OVERLOAD_STRING, strripos, mb_strripos, mb_orig_stripos}, + {MB_OVERLOAD_STRING, strstr, mb_strstr, mb_orig_strstr}, + {MB_OVERLOAD_STRING, strrchr, mb_strrchr, mb_orig_strrchr}, {MB_OVERLOAD_STRING, substr, mb_substr, mb_orig_substr}, {MB_OVERLOAD_STRING, strtolower, mb_strtolower, mb_orig_strtolower}, {MB_OVERLOAD_STRING, strtoupper, mb_strtoupper, mb_orig_strtoupper}, @@ -208,6 +210,8 @@ PHP_FE(mb_strrpos, NULL) PHP_FE(mb_stripos, NULL) PHP_FE(mb_strripos, NULL) + PHP_FE(mb_strstr, NULL) + PHP_FE(mb_strrchr, NULL) PHP_FE(mb_substr_count, NULL) PHP_FE(mb_substr, NULL) PHP_FE(mb_strcut, NULL) @@ -1733,6 +1737,130 @@ } /* }}} */ +/* {{{ proto string mb_strstr(string haystack, string needle[, bool part[, string encoding]]) + Finds first occurrence of a string within another */ +PHP_FUNCTION(mb_strstr) +{ + int n, len, mblen; + mbfl_string haystack, needle, result, *ret = NULL; + char *enc_name = NULL; + int enc_name_len; + zend_bool part = 0; + + mbfl_string_init(haystack); + mbfl_string_init(needle); + haystack.no_language = MBSTRG(current_language); + haystack.no_encoding = MBSTRG(current_internal_encoding); + needle.no_language = MBSTRG(current_language); + needle.no_encoding = MBSTRG(current_internal_encoding); + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|bs, (char **)haystack.val, haystack.len, (char **)needle.val, needle.len, part, enc_name, enc_name_len) == FAILURE) { + RETURN_FALSE; + } + + if (enc_name != NULL) { + haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(enc_name); + if (haystack.no_encoding == mbfl_no_encoding_invalid) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding \%s\, enc_name); + RETURN_FALSE; + } + } + + if (haystack.len = 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Empty haystack); + RETURN_FALSE; + } + if (needle.len = 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING,Empty needle); + RETURN_FALSE; + } + n = mbfl_strpos(haystack, needle, 0, 0); + if (n = 0) { + mblen = mbfl_strlen(haystack); + if (part) { + ret = mbfl_substr(haystack, result, 0, n); + if (ret != NULL) { + RETVAL_STRINGL((char *)ret-val, ret-len, 0); + } else { + RETVAL_FALSE; + } + } else { + len = (mblen - n); + ret = mbfl_substr(haystack, result, n, len); + if (ret != NULL) { + RETVAL_STRINGL((char *)ret-val, ret-len, 0); + } else { + RETVAL_FALSE; + } + } + } else { + RETVAL_FALSE; + } +} +/* }}} */ + +/* {{{ proto string mb_strrchr(string haystack, string needle[, bool part[, string encoding]]) + Finds the last occurrence of a character in a string within another */ +PHP_FUNCTION(mb_strrchr) +{ + int n, len, mblen; + mbfl_string haystack, needle, result, *ret = NULL; + char *enc_name = NULL; + int enc_name_len; + zend_bool part = 0; + + mbfl_string_init(haystack); + mbfl_string_init(needle); + haystack.no_language = MBSTRG(current_language); +
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring mbstring.c mbstring.h
masugataTue May 30 15:47:53 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mbstring mbstring.c mbstring.h Log: added mb_stristr( ), mb_strrichr( ). http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.5r2=1.224.2.22.2.6diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.5 php-src/ext/mbstring/mbstring.c:1.224.2.22.2.6 --- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.5 Tue May 30 15:45:35 2006 +++ php-src/ext/mbstring/mbstring.c Tue May 30 15:47:53 2006 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: mbstring.c,v 1.224.2.22.2.5 2006/05/30 15:45:35 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.22.2.6 2006/05/30 15:47:53 masugata Exp $ */ /* * PHP 4 Multibyte String module mbstring @@ -176,6 +176,7 @@ {MB_OVERLOAD_STRING, strripos, mb_strripos, mb_orig_stripos}, {MB_OVERLOAD_STRING, strstr, mb_strstr, mb_orig_strstr}, {MB_OVERLOAD_STRING, strrchr, mb_strrchr, mb_orig_strrchr}, + {MB_OVERLOAD_STRING, stristr, mb_stristr, mb_orig_stristr}, {MB_OVERLOAD_STRING, substr, mb_substr, mb_orig_substr}, {MB_OVERLOAD_STRING, strtolower, mb_strtolower, mb_orig_strtolower}, {MB_OVERLOAD_STRING, strtoupper, mb_strtoupper, mb_orig_strtoupper}, @@ -212,6 +213,8 @@ PHP_FE(mb_strripos, NULL) PHP_FE(mb_strstr, NULL) PHP_FE(mb_strrchr, NULL) + PHP_FE(mb_stristr, NULL) + PHP_FE(mb_strrichr, NULL) PHP_FE(mb_substr_count, NULL) PHP_FE(mb_substr, NULL) PHP_FE(mb_strcut, NULL) @@ -1861,6 +1864,110 @@ } /* }}} */ +/* {{{ proto string mb_stristr(string haystack, string needle[, bool part[, string encoding]]) + Finds first occurrence of a string within another, case insensitive */ +PHP_FUNCTION(mb_stristr) +{ + zend_bool part = 0; + int n, from_encoding_len, len, mblen; + mbfl_string haystack, needle, result, *ret = NULL; + char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + mbfl_string_init(haystack); + mbfl_string_init(needle); + haystack.no_language = MBSTRG(current_language); + haystack.no_encoding = MBSTRG(current_internal_encoding); + needle.no_language = MBSTRG(current_language); + needle.no_encoding = MBSTRG(current_internal_encoding); + + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|bs, (char **)haystack.val, haystack.len, (char **)needle.val, needle.len, part, from_encoding, from_encoding_len) == FAILURE) { + RETURN_FALSE; + } + + haystack.no_encoding = needle.no_encoding = mbfl_name2no_encoding(from_encoding); + if (haystack.no_encoding == mbfl_no_encoding_invalid) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown encoding \%s\, from_encoding); + RETURN_FALSE; + } + + n = php_mb_stripos(0, haystack.val, haystack.len, needle.val, needle.len, 0, from_encoding TSRMLS_CC); + + if (n 0) { + RETURN_FALSE; + } + + mblen = mbfl_strlen(haystack); + + if (part) { + ret = mbfl_substr(haystack, result, 0, n); + if (ret != NULL) { + RETVAL_STRINGL((char *)ret-val, ret-len, 0); + } else { + RETVAL_FALSE; + } + } else { + len = (mblen - n); + ret = mbfl_substr(haystack, result, n, len); + if (ret != NULL) { + RETVAL_STRINGL((char *)ret-val, ret-len, 0); + } else { + RETVAL_FALSE; + } + } +} + +/* {{{ proto string mb_strrichr(string haystack, string needle[, bool part[, string encoding]]) + Finds the last occurrence of a character in a string within another, case insensitive */ +PHP_FUNCTION(mb_strrichr) +{ + zend_bool part = 0; + int n, from_encoding_len, len, mblen; + mbfl_string haystack, needle, result, *ret = NULL; + char *from_encoding = (char*)mbfl_no2preferred_mime_name(MBSTRG(current_internal_encoding)); + mbfl_string_init(haystack); + mbfl_string_init(needle); + haystack.no_language = MBSTRG(current_language); + haystack.no_encoding = MBSTRG(current_internal_encoding); + needle.no_language = MBSTRG(current_language); + needle.no_encoding = MBSTRG(current_internal_encoding); + + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|bs, (char **)haystack.val, haystack.len, (char **)needle.val, needle.len, part, from_encoding, from_encoding_len) ==
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pcntl pcntl.c
mikeTue May 30 17:40:52 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/pcntl pcntl.c Log: - fix bug #37635 (parameter of pcntl signal handler is trashed) http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.65r2=1.2027.2.547.2.66diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.65 php-src/NEWS:1.2027.2.547.2.66 --- php-src/NEWS:1.2027.2.547.2.65 Tue May 30 14:51:20 2006 +++ php-src/NEWSTue May 30 17:40:52 2006 @@ -49,10 +49,11 @@ - Added RFC2397 (data: stream) support. (Marcus) - Fixed memory leaks in openssl streams context options (Pierre) - Fixed handling of extremely long paths inside tempnam() function. (Ilia) +- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike) - Fixed bug #37632 (Protected method access problem). (Marcus) -- Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Hannes - Magnusson, Derick) - Fixed bug #37620 (mysqli_ssl_set validation is innappropriate). (Georg) +- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates). + (Hannes Magnusson, Derick) - Fixed bug #37614 (Class name lowercased in error message). (Johannes) - Fixed bug #37587 (var without attribute causes segfault). (Marcus) - Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion http://cvs.php.net/viewcvs.cgi/php-src/ext/pcntl/pcntl.c?r1=1.48.2.2r2=1.48.2.2.2.1diff_format=u Index: php-src/ext/pcntl/pcntl.c diff -u php-src/ext/pcntl/pcntl.c:1.48.2.2 php-src/ext/pcntl/pcntl.c:1.48.2.2.2.1 --- php-src/ext/pcntl/pcntl.c:1.48.2.2 Sun Jan 1 12:50:10 2006 +++ php-src/ext/pcntl/pcntl.c Tue May 30 17:40:52 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pcntl.c,v 1.48.2.2 2006/01/01 12:50:10 sniper Exp $ */ +/* $Id: pcntl.c,v 1.48.2.2.2.1 2006/05/30 17:40:52 mike Exp $ */ #define PCNTL_DEBUG 0 @@ -693,16 +693,19 @@ PCNTL_G(head) = NULL; /* simple stores are atomic */ /* Allocate */ - MAKE_STD_ZVAL(param); - MAKE_STD_ZVAL(retval); while (queue) { if (zend_hash_index_find(PCNTL_G(php_signal_table), queue-signo, (void **) handle)==SUCCESS) { + MAKE_STD_ZVAL(retval); + MAKE_STD_ZVAL(param); + ZVAL_NULL(retval); ZVAL_LONG(param, queue-signo); /* Call php signal handler - Note that we do not report errors, and we ignore the return value */ /* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */ call_user_function(EG(function_table), NULL, *handle, retval, 1, param TSRMLS_CC); + zval_ptr_dtor(param); + zval_ptr_dtor(retval); } next = queue-next; @@ -713,10 +716,6 @@ /* Re-enable queue */ PCNTL_G(processing_signal_queue) = 0; - - /* Clean up */ - efree(param); - efree(retval); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/pcntl pcntl.c
mikeTue May 30 17:44:23 2006 UTC Modified files: /php-src/ext/pcntl pcntl.c Log: MFB: fix bug 37635 (argument to pcntl signal handler is trashed) http://cvs.php.net/viewcvs.cgi/php-src/ext/pcntl/pcntl.c?r1=1.53r2=1.54diff_format=u Index: php-src/ext/pcntl/pcntl.c diff -u php-src/ext/pcntl/pcntl.c:1.53 php-src/ext/pcntl/pcntl.c:1.54 --- php-src/ext/pcntl/pcntl.c:1.53 Thu Apr 27 15:28:21 2006 +++ php-src/ext/pcntl/pcntl.c Tue May 30 17:44:23 2006 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: pcntl.c,v 1.53 2006/04/27 15:28:21 andrei Exp $ */ +/* $Id: pcntl.c,v 1.54 2006/05/30 17:44:23 mike Exp $ */ #define PCNTL_DEBUG 0 @@ -693,16 +693,19 @@ PCNTL_G(head) = NULL; /* simple stores are atomic */ /* Allocate */ - MAKE_STD_ZVAL(param); - MAKE_STD_ZVAL(retval); while (queue) { if (zend_hash_index_find(PCNTL_G(php_signal_table), queue-signo, (void **) handle)==SUCCESS) { + MAKE_STD_ZVAL(retval); + MAKE_STD_ZVAL(param); + ZVAL_NULL(retval); ZVAL_LONG(param, queue-signo); /* Call php signal handler - Note that we do not report errors, and we ignore the return value */ /* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */ call_user_function(EG(function_table), NULL, *handle, retval, 1, param TSRMLS_CC); + zval_ptr_dtor(param); + zval_ptr_dtor(retval); } next = queue-next; @@ -713,10 +716,6 @@ /* Re-enable queue */ PCNTL_G(processing_signal_queue) = 0; - - /* Clean up */ - efree(param); - efree(retval); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: patched
Please read the attached file! -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl/tests iterator_041b.phpt /ext/standard/tests/file mkdir-004.phpt mkdir-005.phpt
pollita Tue May 30 19:05:21 2006 UTC Modified files: /php-src/ext/spl/tests iterator_041b.phpt /php-src/ext/standard/tests/filemkdir-004.phpt mkdir-005.phpt Log: Minor fixes (bjori) http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/iterator_041b.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/spl/tests/iterator_041b.phpt diff -u php-src/ext/spl/tests/iterator_041b.phpt:1.2 php-src/ext/spl/tests/iterator_041b.phpt:1.3 --- php-src/ext/spl/tests/iterator_041b.phpt:1.2Wed May 24 23:05:30 2006 +++ php-src/ext/spl/tests/iterator_041b.phptTue May 30 19:05:21 2006 @@ -94,7 +94,7 @@ ? ===DONE=== ?php exit(0); ? ---EXPECT-- +--EXPECTF-- ===iterator_to_array=== State 0: __construct() State 1: __construct() http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/file/mkdir-004.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir-004.phpt diff -u php-src/ext/standard/tests/file/mkdir-004.phpt:1.2 php-src/ext/standard/tests/file/mkdir-004.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir-004.phpt:1.2 Tue May 16 13:07:07 2006 +++ php-src/ext/standard/tests/file/mkdir-004.phpt Tue May 30 19:05:21 2006 @@ -1,7 +1,7 @@ --TEST-- recursive mkdir() tests --SKIPIF-- -? +?php chdir(/); if ([EMAIL PROTECTED](testtmpskipifdir)) { die(skip for root only); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/file/mkdir-005.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/standard/tests/file/mkdir-005.phpt diff -u php-src/ext/standard/tests/file/mkdir-005.phpt:1.2 php-src/ext/standard/tests/file/mkdir-005.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir-005.phpt:1.2 Tue May 16 13:07:07 2006 +++ php-src/ext/standard/tests/file/mkdir-005.phpt Tue May 30 19:05:21 2006 @@ -1,7 +1,7 @@ --TEST-- recursive mkdir() tests --SKIPIF-- -? +?php chdir(/); if ([EMAIL PROTECTED](testtmpskipifdir)) { die(skip for root only); -- 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) /ext/spl/tests iterator_041b.phpt /ext/standard/tests/file mkdir-004.phpt mkdir-005.phpt
pollita Tue May 30 19:06:22 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/spl/tests iterator_041b.phpt /php-src/ext/standard/tests/filemkdir-004.phpt mkdir-005.phpt Log: MFH: Minor fixes (bjori) http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/iterator_041b.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/spl/tests/iterator_041b.phpt diff -u php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.3 php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.4 --- php-src/ext/spl/tests/iterator_041b.phpt:1.1.2.3Wed May 24 23:04:58 2006 +++ php-src/ext/spl/tests/iterator_041b.phptTue May 30 19:06:21 2006 @@ -94,7 +94,7 @@ ? ===DONE=== ?php exit(0); ? ---EXPECT-- +--EXPECTF-- ===iterator_to_array=== State 0: __construct() State 1: __construct() http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/file/mkdir-004.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/mkdir-004.phpt diff -u php-src/ext/standard/tests/file/mkdir-004.phpt:1.1.2.1 php-src/ext/standard/tests/file/mkdir-004.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/mkdir-004.phpt:1.1.2.1 Tue May 16 13:06:06 2006 +++ php-src/ext/standard/tests/file/mkdir-004.phpt Tue May 30 19:06:22 2006 @@ -1,7 +1,7 @@ --TEST-- recursive mkdir() tests --SKIPIF-- -? +?php chdir(/); if ([EMAIL PROTECTED](testtmpskipifdir)) { die(skip for root only); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/file/mkdir-005.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u Index: php-src/ext/standard/tests/file/mkdir-005.phpt diff -u php-src/ext/standard/tests/file/mkdir-005.phpt:1.1.2.1 php-src/ext/standard/tests/file/mkdir-005.phpt:1.1.2.2 --- php-src/ext/standard/tests/file/mkdir-005.phpt:1.1.2.1 Tue May 16 13:06:06 2006 +++ php-src/ext/standard/tests/file/mkdir-005.phpt Tue May 30 19:06:22 2006 @@ -1,7 +1,7 @@ --TEST-- recursive mkdir() tests --SKIPIF-- -? +?php chdir(/); if ([EMAIL PROTECTED](testtmpskipifdir)) { die(skip for root only); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8 oci8_collection.c
tony2001Tue May 30 21:38:01 2006 UTC Modified files: /php-src/ext/oci8 oci8_collection.c Log: fix compilation on some b0rked systems that must have collections support but they don't http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.6r2=1.7diff_format=u Index: php-src/ext/oci8/oci8_collection.c diff -u php-src/ext/oci8/oci8_collection.c:1.6 php-src/ext/oci8/oci8_collection.c:1.7 --- php-src/ext/oci8/oci8_collection.c:1.6 Sun Jan 1 13:09:52 2006 +++ php-src/ext/oci8/oci8_collection.c Tue May 30 21:38:00 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_collection.c,v 1.6 2006/01/01 13:09:52 sniper Exp $ */ +/* $Id: oci8_collection.c,v 1.7 2006/05/30 21:38:00 tony2001 Exp $ */ @@ -37,7 +37,7 @@ #include ext/standard/info.h #include php_ini.h -#if HAVE_OCI8 +#if HAVE_OCI8 PHP_OCI8_HAVE_COLLECTIONS #include php_oci8.h #include php_oci8_int.h -- 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) /ext/oci8 oci8_collection.c
tony2001Tue May 30 21:38:12 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8 oci8_collection.c Log: MFH http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.5.2.3r2=1.5.2.3.2.1diff_format=u Index: php-src/ext/oci8/oci8_collection.c diff -u php-src/ext/oci8/oci8_collection.c:1.5.2.3 php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.1 --- php-src/ext/oci8/oci8_collection.c:1.5.2.3 Sun Jan 1 12:50:10 2006 +++ php-src/ext/oci8/oci8_collection.c Tue May 30 21:38:12 2006 @@ -25,7 +25,7 @@ +--+ */ -/* $Id: oci8_collection.c,v 1.5.2.3 2006/01/01 12:50:10 sniper Exp $ */ +/* $Id: oci8_collection.c,v 1.5.2.3.2.1 2006/05/30 21:38:12 tony2001 Exp $ */ @@ -37,7 +37,7 @@ #include ext/standard/info.h #include php_ini.h -#if HAVE_OCI8 +#if HAVE_OCI8 PHP_OCI8_HAVE_COLLECTIONS #include php_oci8.h #include php_oci8_int.h -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8/tests bind_long.phpt test.txt
tony2001Tue May 30 21:54:17 2006 UTC Added files: /php-src/ext/oci8/tests test.txt Modified files: /php-src/ext/oci8/tests bind_long.phpt Log: fix test http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bind_long.phpt?r1=1.2r2=1.3diff_format=u Index: php-src/ext/oci8/tests/bind_long.phpt diff -u php-src/ext/oci8/tests/bind_long.phpt:1.2 php-src/ext/oci8/tests/bind_long.phpt:1.3 --- php-src/ext/oci8/tests/bind_long.phpt:1.2 Wed Apr 12 19:22:12 2006 +++ php-src/ext/oci8/tests/bind_long.phpt Tue May 30 21:54:17 2006 @@ -7,19 +7,19 @@ require dirname(__FILE__)./connect.inc; -$stmt = oci_parse($c, create table phptestlng( id number(10), fileimage long)); +$stmt = oci_parse($c, create table phptestlng( id number(10), filetxt long)); oci_execute($stmt); -$stmt = oci_parse ($c, insert into phptestlng (id, fileimage) values (:id, :fileimage)); +$stmt = oci_parse ($c, insert into phptestlng (id, filetxt) values (:id, :filetxt)); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)./test.gif); +$filetxt = file_get_contents( dirname(__FILE__)./test.txt); oci_bind_by_name( $stmt, :id, $i, -1); -oci_bind_by_name( $stmt, :fileimage, $fileimage, -1, SQLT_LNG); +oci_bind_by_name( $stmt, :filetxt, $filetxt, -1, SQLT_LNG); oci_execute($stmt, OCI_DEFAULT); oci_commit($c); -$stmt = oci_parse($c, SELECT fileimage FROM phptestlng); +$stmt = oci_parse($c, SELECT filetxt FROM phptestlng); oci_execute($stmt); $row = oci_fetch_row($stmt); @@ -33,6 +33,6 @@ ? --EXPECT-- -string(32) d04e7036e2f4221abc88fd14e960a45b -int(2523) +string(32) da852396d08c9ef9fbdf914db1d6d5bb +int(276) Done http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/test.txt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/test.txt +++ php-src/ext/oci8/tests/test.txt Feel so good, I feel so fine Love that little lady always on my mind She gives me loving every night and day Never gonna leave her, never going away Someone to love me You know she makes me feel all right, yeah (all right) Someone to need me Love me every single night, yeah -- 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) /ext/oci8/tests bind_long.phpt test.txt
tony2001Tue May 30 21:54:42 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/oci8/tests test.txt Modified files: /php-src/ext/oci8/tests bind_long.phpt Log: fix test http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bind_long.phpt?r1=1.1.2.1r2=1.1.2.1.2.1diff_format=u Index: php-src/ext/oci8/tests/bind_long.phpt diff -u php-src/ext/oci8/tests/bind_long.phpt:1.1.2.1 php-src/ext/oci8/tests/bind_long.phpt:1.1.2.1.2.1 --- php-src/ext/oci8/tests/bind_long.phpt:1.1.2.1 Wed Apr 12 19:21:35 2006 +++ php-src/ext/oci8/tests/bind_long.phpt Tue May 30 21:54:42 2006 @@ -7,19 +7,19 @@ require dirname(__FILE__)./connect.inc; -$stmt = oci_parse($c, create table phptestlng( id number(10), fileimage long)); +$stmt = oci_parse($c, create table phptestlng( id number(10), filetxt long)); oci_execute($stmt); -$stmt = oci_parse ($c, insert into phptestlng (id, fileimage) values (:id, :fileimage)); +$stmt = oci_parse ($c, insert into phptestlng (id, filetxt) values (:id, :filetxt)); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)./test.gif); +$filetxt = file_get_contents( dirname(__FILE__)./test.txt); oci_bind_by_name( $stmt, :id, $i, -1); -oci_bind_by_name( $stmt, :fileimage, $fileimage, -1, SQLT_LNG); +oci_bind_by_name( $stmt, :filetxt, $filetxt, -1, SQLT_LNG); oci_execute($stmt, OCI_DEFAULT); oci_commit($c); -$stmt = oci_parse($c, SELECT fileimage FROM phptestlng); +$stmt = oci_parse($c, SELECT filetxt FROM phptestlng); oci_execute($stmt); $row = oci_fetch_row($stmt); @@ -33,6 +33,6 @@ ? --EXPECT-- -string(32) d04e7036e2f4221abc88fd14e960a45b -int(2523) +string(32) da852396d08c9ef9fbdf914db1d6d5bb +int(276) Done http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/test.txt?view=markuprev=1.1 Index: php-src/ext/oci8/tests/test.txt +++ php-src/ext/oci8/tests/test.txt Feel so good, I feel so fine Love that little lady always on my mind She gives me loving every night and day Never gonna leave her, never going away Someone to love me You know she makes me feel all right, yeah (all right) Someone to need me Love me every single night, yeah -- 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) /ext/oci8/tests coll_016.phpt coll_016_func.phpt error1.phpt lob_001.phpt lob_015.phpt
tony2001Tue May 30 22:27:32 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8/tests coll_016_func.phpt coll_016.phpt error1.phpt lob_001.phpt lob_015.phpt Log: fix tests http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/coll_016_func.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/oci8/tests/coll_016_func.phpt diff -u php-src/ext/oci8/tests/coll_016_func.phpt:1.1.2.3 php-src/ext/oci8/tests/coll_016_func.phpt:1.1.2.3.2.1 --- php-src/ext/oci8/tests/coll_016_func.phpt:1.1.2.3 Tue Dec 6 19:28:24 2005 +++ php-src/ext/oci8/tests/coll_016_func.phpt Tue May 30 22:27:32 2006 @@ -37,7 +37,7 @@ --EXPECTF-- bool(true) -Warning: oci_collection_element_assign(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +Warning: oci_collection_element_assign(): OCI-22165: given index [%d] must be in the range of 0 to [0] in %s on line %d bool(false) Warning: oci_collection_element_assign(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/coll_016.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/oci8/tests/coll_016.phpt diff -u php-src/ext/oci8/tests/coll_016.phpt:1.1.2.3 php-src/ext/oci8/tests/coll_016.phpt:1.1.2.3.2.1 --- php-src/ext/oci8/tests/coll_016.phpt:1.1.2.3Tue Dec 6 19:28:24 2005 +++ php-src/ext/oci8/tests/coll_016.phptTue May 30 22:27:32 2006 @@ -37,7 +37,7 @@ --EXPECTF-- bool(true) -Warning: OCI-Collection::assignelem(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +Warning: OCI-Collection::assignelem(): OCI-22165: given index [%d] must be in the range of 0 to [0] in %s on line %d bool(false) Warning: OCI-Collection::assignelem(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/error1.phpt?r1=1.1.2.4r2=1.1.2.4.2.1diff_format=u Index: php-src/ext/oci8/tests/error1.phpt diff -u php-src/ext/oci8/tests/error1.phpt:1.1.2.4 php-src/ext/oci8/tests/error1.phpt:1.1.2.4.2.1 --- php-src/ext/oci8/tests/error1.phpt:1.1.2.4 Tue Mar 28 09:12:45 2006 +++ php-src/ext/oci8/tests/error1.phpt Tue May 30 22:27:32 2006 @@ -12,13 +12,13 @@ ? --EXPECTF-- -Warning: oci_connect(): ORA-12154: TNS:could not resolve service name in %s on line %d +Warning: oci_connect(): ORA-12154: TNS:could not resolve %s in %s on line %d bool(false) array(4) { [code]= int(12154) [message]= - string(45) ORA-12154: TNS:could not resolve service name + string(%d) ORA-12154: TNS:could not resolve %s [offset]= int(0) [sqltext]= http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/lob_001.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/oci8/tests/lob_001.phpt http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/lob_015.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u Index: php-src/ext/oci8/tests/lob_015.phpt diff -u php-src/ext/oci8/tests/lob_015.phpt:1.1.2.3 php-src/ext/oci8/tests/lob_015.phpt:1.1.2.3.2.1 --- php-src/ext/oci8/tests/lob_015.phpt:1.1.2.3 Tue Dec 6 19:28:25 2005 +++ php-src/ext/oci8/tests/lob_015.phpt Tue May 30 22:27:32 2006 @@ -18,10 +18,11 @@ $statement = oci_parse($c,$ora_sql); $blob = oci_new_descriptor($c,OCI_D_LOB,1,2,3); $blob = oci_new_descriptor($c); +$int = 1; oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB,4); oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB,4,5); -oci_bind_by_name($statement,:v_blob, $blob,-1); -oci_bind_by_name($statement,:v_blob, $blob); +oci_bind_by_name($statement,:v_blob, $int,-1); +oci_bind_by_name($statement,:v_blob, $int); oci_bind_by_name($statement,:v_blob); oci_bind_by_name($statement); oci_execute($statement, OCI_DEFAULT); @@ -34,18 +35,19 @@ ? --EXPECTF-- -Warning: oci_new_descriptor() expects at most 2 parameters, 5 given in %slob_015.php on line %d +Warning: oci_new_descriptor() expects at most 2 parameters, 5 given in %s on line %d -Warning: oci_bind_by_name() expects at most 5 parameters, 6 given in %slob_015.php on line %d +Warning: oci_bind_by_name() expects at most 5 parameters, 6 given in %s on line %d -Warning: oci_bind_by_name() expects at most 5 parameters, 7 given in %slob_015.php on line %d +Warning: oci_bind_by_name() expects at most 5 parameters, 7 given in %s on line %d -Notice: Object of class OCI-Lob to string conversion in %slob_015.php on line %d +Warning: oci_bind_by_name() expects at least 3 parameters, 2 given in %s on line %d -Warning: oci_bind_by_name() expects at least 3 parameters, 2 given in %slob_015.php on line %d +Warning: oci_bind_by_name() expects at least 3 parameters, 1 given in %s on line %d -Warning: oci_bind_by_name() expects at least 3 parameters, 1 given in %slob_015.php on line %d - -Warning: oci_execute(): ORA-00932: inconsistent datatypes: expected NUMBER got
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/oci8/tests field_funcs.phpt field_funcs_old.phpt
tony2001Tue May 30 22:34:16 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/oci8/tests field_funcs_old.phpt field_funcs.phpt Log: more test fixes, this time support Oracle 10 http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs_old.phpt?r1=1.1.2.4r2=1.1.2.4.2.1diff_format=u Index: php-src/ext/oci8/tests/field_funcs_old.phpt diff -u php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4 php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4.2.1 --- php-src/ext/oci8/tests/field_funcs_old.phpt:1.1.2.4 Tue Mar 28 09:12:45 2006 +++ php-src/ext/oci8/tests/field_funcs_old.phpt Tue May 30 22:34:16 2006 @@ -54,7 +54,7 @@ echo Done\n; ? ---EXPECT-- +--EXPECTF-- array(5) { [0]= string(1) 1 @@ -71,14 +71,14 @@ string(2) ID string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(false) string(5) VALUE string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(true) http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs.phpt?r1=1.1.2.4.2.1r2=1.1.2.4.2.2diff_format=u Index: php-src/ext/oci8/tests/field_funcs.phpt diff -u php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.1 php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.2 --- php-src/ext/oci8/tests/field_funcs.phpt:1.1.2.4.2.1 Thu May 18 13:21:08 2006 +++ php-src/ext/oci8/tests/field_funcs.phpt Tue May 30 22:34:16 2006 @@ -54,7 +54,7 @@ echo Done\n; ? ---EXPECT-- +--EXPECTF-- array(5) { [0]= string(1) 1 @@ -71,14 +71,14 @@ string(2) ID string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(false) string(5) VALUE string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(true) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/oci8/tests coll_016.phpt coll_016_func.phpt error1.phpt field_funcs.phpt field_funcs_old.phpt lob_001.phpt lob_015.phpt
tony2001Tue May 30 22:37:08 2006 UTC Modified files: /php-src/ext/oci8/tests coll_016_func.phpt coll_016.phpt error1.phpt field_funcs_old.phpt field_funcs.phpt lob_001.phpt lob_015.phpt Log: MFB: fix tests http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/coll_016_func.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/oci8/tests/coll_016_func.phpt diff -u php-src/ext/oci8/tests/coll_016_func.phpt:1.3 php-src/ext/oci8/tests/coll_016_func.phpt:1.4 --- php-src/ext/oci8/tests/coll_016_func.phpt:1.3 Tue Dec 6 19:26:57 2005 +++ php-src/ext/oci8/tests/coll_016_func.phpt Tue May 30 22:37:08 2006 @@ -37,7 +37,7 @@ --EXPECTF-- bool(true) -Warning: oci_collection_element_assign(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +Warning: oci_collection_element_assign(): OCI-22165: given index [%d] must be in the range of 0 to [0] in %s on line %d bool(false) Warning: oci_collection_element_assign(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/coll_016.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/oci8/tests/coll_016.phpt diff -u php-src/ext/oci8/tests/coll_016.phpt:1.3 php-src/ext/oci8/tests/coll_016.phpt:1.4 --- php-src/ext/oci8/tests/coll_016.phpt:1.3Tue Dec 6 19:26:57 2005 +++ php-src/ext/oci8/tests/coll_016.phptTue May 30 22:37:08 2006 @@ -37,7 +37,7 @@ --EXPECTF-- bool(true) -Warning: OCI-Collection::assignelem(): OCI-22165: given index [4294967295] must be in the range of 0 to [0] in %s on line %d +Warning: OCI-Collection::assignelem(): OCI-22165: given index [%d] must be in the range of 0 to [0] in %s on line %d bool(false) Warning: OCI-Collection::assignelem(): OCI-22165: given index [5000] must be in the range of 0 to [0] in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/error1.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/oci8/tests/error1.phpt diff -u php-src/ext/oci8/tests/error1.phpt:1.4 php-src/ext/oci8/tests/error1.phpt:1.5 --- php-src/ext/oci8/tests/error1.phpt:1.4 Tue Mar 28 09:13:35 2006 +++ php-src/ext/oci8/tests/error1.phpt Tue May 30 22:37:08 2006 @@ -12,13 +12,13 @@ ? --EXPECTF-- -Warning: oci_connect(): ORA-12154: TNS:could not resolve service name in %s on line %d +Warning: oci_connect(): ORA-12154: TNS:could not resolve %s in %s on line %d bool(false) array(4) { [code]= int(12154) [message]= - string(45) ORA-12154: TNS:could not resolve service name + string(%d) ORA-12154: TNS:could not resolve %s [offset]= int(0) [sqltext]= http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs_old.phpt?r1=1.4r2=1.5diff_format=u Index: php-src/ext/oci8/tests/field_funcs_old.phpt diff -u php-src/ext/oci8/tests/field_funcs_old.phpt:1.4 php-src/ext/oci8/tests/field_funcs_old.phpt:1.5 --- php-src/ext/oci8/tests/field_funcs_old.phpt:1.4 Tue Mar 28 09:13:35 2006 +++ php-src/ext/oci8/tests/field_funcs_old.phpt Tue May 30 22:37:08 2006 @@ -54,7 +54,7 @@ echo Done\n; ? ---EXPECT-- +--EXPECTF-- array(5) { [0]= string(1) 1 @@ -71,14 +71,14 @@ string(2) ID string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(false) string(5) VALUE string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(true) http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/field_funcs.phpt?r1=1.5r2=1.6diff_format=u Index: php-src/ext/oci8/tests/field_funcs.phpt diff -u php-src/ext/oci8/tests/field_funcs.phpt:1.5 php-src/ext/oci8/tests/field_funcs.phpt:1.6 --- php-src/ext/oci8/tests/field_funcs.phpt:1.5 Thu May 18 13:20:00 2006 +++ php-src/ext/oci8/tests/field_funcs.phpt Tue May 30 22:37:08 2006 @@ -54,7 +54,7 @@ echo Done\n; ? ---EXPECT-- +--EXPECTF-- array(5) { [0]= string(1) 1 @@ -71,14 +71,14 @@ string(2) ID string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(false) string(5) VALUE string(6) NUMBER int(2) -int(0) +int(%d) int(0) int(22) bool(true) http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/lob_001.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/oci8/tests/lob_001.phpt http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/lob_015.phpt?r1=1.3r2=1.4diff_format=u Index: php-src/ext/oci8/tests/lob_015.phpt diff -u php-src/ext/oci8/tests/lob_015.phpt:1.3 php-src/ext/oci8/tests/lob_015.phpt:1.4 --- php-src/ext/oci8/tests/lob_015.phpt:1.3 Tue Dec 6 19:26:57 2005 +++ php-src/ext/oci8/tests/lob_015.phpt Tue May 30 22:37:08 2006 @@ -18,10 +18,11 @@ $statement = oci_parse($c,$ora_sql); $blob = oci_new_descriptor($c,OCI_D_LOB,1,2,3); $blob = oci_new_descriptor($c); +$int = 1; oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB,4); oci_bind_by_name($statement,:v_blob, $blob,-1,OCI_B_BLOB,4,5); -oci_bind_by_name($statement,:v_blob, $blob,-1); -oci_bind_by_name($statement,:v_blob, $blob);
[PHP-CVS] cvs: php-src /tests/classes inheritance_003.phpt inheritance_004.phpt
helly Tue May 30 23:11:14 2006 UTC Added files: /php-src/tests/classes inheritance_003.phpt inheritance_004.phpt Log: - Add new tests http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/inheritance_003.phpt?view=markuprev=1.1 Index: php-src/tests/classes/inheritance_003.phpt +++ php-src/tests/classes/inheritance_003.phpt --TEST-- ZE2 method inheritance without interfaces --FILE-- ?php class A { function f($x) {} } class B extends A { function f() {} } ? ===DONE=== --EXPECTF-- Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/inheritance_004.phpt?view=markuprev=1.1 Index: php-src/tests/classes/inheritance_004.phpt +++ php-src/tests/classes/inheritance_004.phpt --TEST-- ZE2 method inheritance without interfaces --FILE-- ?php class A { function f() {} } class B extends A { function f($x) {} } ? ===DONE=== --EXPECTF-- Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_004.php on line %d -- 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) /tests/classes inheritance_003.phpt inheritance_004.phpt
helly Tue May 30 23:11:34 2006 UTC Added files: (Branch: PHP_5_2) /php-src/tests/classes inheritance_003.phpt inheritance_004.phpt Log: - Add new tests http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/inheritance_003.phpt?view=markuprev=1.1 Index: php-src/tests/classes/inheritance_003.phpt +++ php-src/tests/classes/inheritance_003.phpt --TEST-- ZE2 method inheritance without interfaces --FILE-- ?php class A { function f($x) {} } class B extends A { function f() {} } ? ===DONE=== --EXPECTF-- Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/inheritance_004.phpt?view=markuprev=1.1 Index: php-src/tests/classes/inheritance_004.phpt +++ php-src/tests/classes/inheritance_004.phpt --TEST-- ZE2 method inheritance without interfaces --FILE-- ?php class A { function f() {} } class B extends A { function f($x) {} } ? ===DONE=== --EXPECTF-- Fatal error: Declaration of B::f() must be compatible with that of A::f() in %sinheritance_004.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
andiWed May 31 03:43:17 2006 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: - Fix typo http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.547.2.66r2=1.2027.2.547.2.67diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.66 php-src/NEWS:1.2027.2.547.2.67 --- php-src/NEWS:1.2027.2.547.2.66 Tue May 30 17:40:52 2006 +++ php-src/NEWSWed May 31 03:43:17 2006 @@ -4,7 +4,7 @@ - Added memory_get_peak_usage() function for retrieving peak memory usage of a PHP script. (Ilia) - Changed Apache 2 Handler SAPI to call ap_set_content_type() once only. (Mike) -- Changed E_ALL error reporting mode to includes E_RECOVERABLE_ERROR. (Marcus) +- Changed E_ALL error reporting mode to include E_RECOVERABLE_ERROR. (Marcus) - Added control character checks for cURL extension's open_basedir/safe_mode checks. (Ilia) - Disable realpath cache when open_basedir or safe_mode are enabled on a -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php