[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Fri Jul 23 20:32:54 2004 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1694r2=1.1695ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1694 php-src/ChangeLog:1.1695 --- php-src/ChangeLog:1.1694Thu Jul 22 20:35:56 2004 +++ php-src/ChangeLog Fri Jul 23 20:32:53 2004 @@ -1,3 +1,57 @@ +2004-07-23 Andi Gutmans [EMAIL PROTECTED] + +* ext/standard/tests/time/001.phpt: + - There's no reason why gettimeofday() shouldn''t return the same time in + successive calls; this test fails spuriously on Linux/x86_64 (which has + a particularly fast gettimeofday() implementation). + - Joe Orton [EMAIL PROTECTED] + +2004-07-23 Georg Richter [EMAIL PROTECTED] + +* (PHP_5_0) + ext/mysqli/mysqli_fe.c + ext/mysqli/tests/bug29311.phpt: + fixed bug #29311 + +* NEWS + ext/mysqli/mysqli.c + ext/mysqli/mysqli_fe.c + ext/mysqli/tests/bug29311.phpt: + fixed bug #29311 + added support for Cursors (MySQL 5.0.x) + +2004-07-23 Marcus Boerger [EMAIL PROTECTED] + +* ZendEngine2/zend_execute.c: + Fix 0 Byte leak after alloca to emalloc change + +2004-07-23 Edin Kadribasic [EMAIL PROTECTED] + +* (PHP_4_3) + ext/gd/gd.dsp: + Fix .dsp + +* (PHP_5_0) + ext/gd/gd.c: + MFB: Updated version number + +* ext/gd/gd.c: + Updated version number + +2004-07-23 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS + ext/standard/url_scanner_ex.c + ext/standard/url_scanner_ex.c + ext/standard/url_scanner_ex.re + ext/standard/url_scanner_ex.re: + MFH: Fixed bug #29333 (output_buffering + trans_sess_id can corrupt output) + +* ext/standard/url_scanner_ex.c + ext/standard/url_scanner_ex.re: + Fixed bug #29333 (output_buffering + trans_sess_id can corrupt output). + 2004-07-22 Stefan Esser [EMAIL PROTECTED] * ext/gd/gd.dsp: @@ -6891,7 +6945,7 @@ 2004-03-18 Pierre-Alain Joye [EMAIL PROTECTED] * ext/gd/tests/bug27582_2.phpt: - - Fix the test description and $Id: ChangeLog,v 1.1694 2004/07/23 00:35:56 changelog Exp $ + - Fix the test description and $Id: ChangeLog,v 1.1695 2004/07/24 00:32:53 changelog Exp $ 2004-03-18 Derick Rethans [EMAIL PROTECTED]
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Fri Jul 23 20:32:58 2004 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.507r2=1.508ty=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.507 ZendEngine2/ChangeLog:1.508 --- ZendEngine2/ChangeLog:1.507 Thu Jul 22 20:36:00 2004 +++ ZendEngine2/ChangeLog Fri Jul 23 20:32:58 2004 @@ -1,3 +1,8 @@ +2004-07-23 Marcus Boerger [EMAIL PROTECTED] + +* zend_execute.c: + Fix 0 Byte leak after alloca to emalloc change + 2004-07-22 Zeev Suraski [EMAIL PROTECTED] * zend_object_handlers.c: @@ -5074,7 +5079,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.507 2004/07/23 00:36:00 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.508 2004/07/24 00:32:58 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -6798,7 +6803,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.507 2004/07/23 00:36:00 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.508 2004/07/24 00:32:58 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd gd.dsp
Hi, from config.m4 you also need to drop: AC_DEFINE(HAVE_GD_GIF_CREATE, 1, []) why should he drop that line? Otherwise the build system does not know that bundled GD has GIF create support. Stefan -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
gobaFri Jul 23 08:11:58 2004 EDT Modified files: /CVSROOTavail Log: Add phpdoc karma to jellybob (Jon Wood) http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.890r2=1.891ty=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.890 CVSROOT/avail:1.891 --- CVSROOT/avail:1.890 Tue Jul 20 19:14:59 2004 +++ CVSROOT/avail Fri Jul 23 08:11:58 2004 @@ -29,7 +29,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,tony2001,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan|phpdoc,ZendAPI,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh
[PHP-CVS] cvs: php-src / NEWS /ext/mysqli mysqli.c mysqli_fe.c /ext/mysqli/tests bug29311.phpt
georg Fri Jul 23 08:47:36 2004 EDT Added files: /php-src/ext/mysqli/tests bug29311.phpt Modified files: /php-srcNEWS /php-src/ext/mysqli mysqli.c mysqli_fe.c Log: fixed bug #29311 added support for Cursors (MySQL 5.0.x) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1771r2=1.1772ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1771 php-src/NEWS:1.1772 --- php-src/NEWS:1.1771 Thu Jul 22 08:15:12 2004 +++ php-src/NEWSFri Jul 23 08:47:36 2004 @@ -1,10 +1,11 @@ PHPNEWS ||| ?? ??? 2004, PHP 5.1.0 -- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry) +- Fixed bug #29311 (calling parent constructor in mysqli). (Georg) - Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry) - Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry) - Fixed bug #29061 (soap extension segfaults). (Dmitry) +- Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry) - Added new functions : . array_diff_key() (Andrey) . array_diff_ukey() (Andrey) @@ -13,6 +14,7 @@ . stream_context_get_default() (Wez) . stream_socket_enable_crypto() (Wez) - PHP will now respect extension dependencies when initializing. (Wez) +- Added Cursor support for MySQL 5.0.x in mysqli (Georg) - Added MDTM support to ftp_url_stat. (Sara) - Added zlib stream filter suport. (Sara) - Added bz2 stream filter support. (Sara) http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.43r2=1.44ty=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.43 php-src/ext/mysqli/mysqli.c:1.44 --- php-src/ext/mysqli/mysqli.c:1.43Wed Jul 7 04:02:27 2004 +++ php-src/ext/mysqli/mysqli.c Fri Jul 23 08:47:36 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.43 2004/07/07 08:02:27 georg Exp $ + $Id: mysqli.c,v 1.44 2004/07/23 12:47:36 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -273,7 +273,7 @@ { mysqli_object *obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC); - if (obj-zo.ce != mysqli_link_class_entry obj-zo.ce-constructor) { + if (obj-zo.ce != mysqli_link_class_entry) { return obj-zo.ce-constructor; } else { static zend_internal_function f; @@ -443,6 +443,14 @@ /* for mysqli_stmt_set_attr */ REGISTER_LONG_CONSTANT(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, STMT_ATTR_UPDATE_MAX_LENGTH, CONST_CS | CONST_PERSISTENT); + +#ifdef STMT_ATTR_CURSOR_TYPE + REGISTER_LONG_CONSTANT(MYSQLI_STMT_ATTR_CURSOR_TYPE, STMT_ATTR_CURSOR_TYPE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(MYSQLI_CURSOR_TYPE_NO_CURSOR, CURSOR_TYPE_NO_CURSOR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(MYSQLI_CURSOR_TYPE_READ_ONLY, CURSOR_TYPE_READ_ONLY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(MYSQLI_CURSOR_TYPE_FOR_UPDATE, CURSOR_TYPE_FOR_UPDATE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(MYSQLI_CURSOR_TYPE_SCROLLABLE, CURSOR_TYPE_SCROLLABLE, CONST_CS | CONST_PERSISTENT); +#endif /* column information */ REGISTER_LONG_CONSTANT(MYSQLI_NOT_NULL_FLAG, NOT_NULL_FLAG, CONST_CS | CONST_PERSISTENT); http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.40r2=1.41ty=u Index: php-src/ext/mysqli/mysqli_fe.c diff -u php-src/ext/mysqli/mysqli_fe.c:1.40 php-src/ext/mysqli/mysqli_fe.c:1.41 --- php-src/ext/mysqli/mysqli_fe.c:1.40 Wed Jul 7 04:02:27 2004 +++ php-src/ext/mysqli/mysqli_fe.c Fri Jul 23 08:47:36 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_fe.c,v 1.40 2004/07/07 08:02:27 georg Exp $ + $Id: mysqli_fe.c,v 1.41 2004/07/23 12:47:36 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -202,6 +202,7 @@ PHP_FALIAS(set_local_infile_handler,mysqli_set_local_infile_handler,NULL) PHP_FALIAS(master_query,mysqli_master_query,NULL) PHP_FALIAS(multi_query,mysqli_multi_query,NULL) + PHP_FALIAS(mysqli,mysqli_connect,NULL) PHP_FALIAS(more_results,mysqli_more_results, NULL) PHP_FALIAS(next_result, mysqli_next_result, NULL) PHP_FALIAS(options,mysqli_options,NULL) http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug29311.phpt?r=1.1p=1 Index: php-src/ext/mysqli/tests/bug29311.phpt +++ php-src/ext/mysqli/tests/bug29311.phpt --TEST-- constructor test --FILE-- ?php include connect.inc; /* class 1 calls parent constructor */ class mysql1 extends mysqli { function __construct() {
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mysqli mysqli_fe.c /ext/mysqli/tests bug29311.phpt
georg Fri Jul 23 08:48:21 2004 EDT Added files: (Branch: PHP_5_0) /php-src/ext/mysqli/tests bug29311.phpt Modified files: /php-src/ext/mysqli mysqli_fe.c Log: fixed bug #29311 http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.40r2=1.40.2.1ty=u Index: php-src/ext/mysqli/mysqli_fe.c diff -u php-src/ext/mysqli/mysqli_fe.c:1.40 php-src/ext/mysqli/mysqli_fe.c:1.40.2.1 --- php-src/ext/mysqli/mysqli_fe.c:1.40 Wed Jul 7 04:02:27 2004 +++ php-src/ext/mysqli/mysqli_fe.c Fri Jul 23 08:48:20 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_fe.c,v 1.40 2004/07/07 08:02:27 georg Exp $ + $Id: mysqli_fe.c,v 1.40.2.1 2004/07/23 12:48:20 georg Exp $ */ #ifdef HAVE_CONFIG_H @@ -203,6 +203,7 @@ PHP_FALIAS(master_query,mysqli_master_query,NULL) PHP_FALIAS(multi_query,mysqli_multi_query,NULL) PHP_FALIAS(more_results,mysqli_more_results, NULL) + PHP_FALIAS(mysqli, mysqli_connect, NULL) PHP_FALIAS(next_result, mysqli_next_result, NULL) PHP_FALIAS(options,mysqli_options,NULL) PHP_FALIAS(ping,mysqli_ping,NULL) http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug29311.phpt?r=1.1p=1 Index: php-src/ext/mysqli/tests/bug29311.phpt +++ php-src/ext/mysqli/tests/bug29311.phpt --TEST-- constructor test --FILE-- ?php include connect.inc; /* class 1 calls parent constructor */ class mysql1 extends mysqli { function __construct() { parent::__construct(localhost, root, , test); } } /* class 2 has an own constructor */ class mysql2 extends mysqli { function __construct() { $this-connect(localhost, root, , test); } } /* class 3 has no constructor */ class mysql3 extends mysqli { } $foo[0] = new mysql1(); $foo[1] = new mysql2(); $foo[2] = new mysql3(localhost, root, , test); for ($i=0; $i 3; $i++) { if (($result = $foo[$i]-query(SELECT DATABASE( { $row = $result-fetch_row(); printf(%d: %s\n, $i, $row[0]); $result-close(); } $foo[$i]-close(); } ? --EXPECTF-- 0: test 1: test 2: test -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/time 001.phpt
andiFri Jul 23 17:53:16 2004 EDT Modified files: /php-src/ext/standard/tests/time001.phpt Log: - There's no reason why gettimeofday() shouldn''t return the same time in successive calls; this test fails spuriously on Linux/x86_64 (which has a particularly fast gettimeofday() implementation). - Joe Orton [EMAIL PROTECTED] http://cvs.php.net/diff.php/php-src/ext/standard/tests/time/001.phpt?r1=1.6r2=1.7ty=u Index: php-src/ext/standard/tests/time/001.phpt diff -u php-src/ext/standard/tests/time/001.phpt:1.6 php-src/ext/standard/tests/time/001.phpt:1.7 --- php-src/ext/standard/tests/time/001.phpt:1.6Fri May 23 16:51:49 2003 +++ php-src/ext/standard/tests/time/001.phptFri Jul 23 17:53:16 2004 @@ -17,7 +17,7 @@ for ($i=1;$i=10;$i++) { list($micro,$time)=explode( ,microtime()); - if ($time $last_t || ($time == $last_t $micro $last_m)) { + if ($time $last_t || ($time == $last_t $micro = $last_m)) { $passed++; } else if ($failed++ =10) { $result .= sprintf('%06d', $i).: $time $micro $last_t $last_m\n; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / NEWS /ext/standard ftp_fopen_wrapper.c http_fopen_wrapper.c
pollita Sat Jul 24 00:01:48 2004 EDT Modified files: /php-src/ext/standard ftp_fopen_wrapper.c http_fopen_wrapper.c /php-srcNEWS Log: Add proxy support to ftp using http wrapper http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.75r2=1.76ty=u Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.75 php-src/ext/standard/ftp_fopen_wrapper.c:1.76 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.75 Wed Jul 21 00:37:47 2004 +++ php-src/ext/standard/ftp_fopen_wrapper.cSat Jul 24 00:01:48 2004 @@ -18,7 +18,7 @@ | Sara Golemon [EMAIL PROTECTED] | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.75 2004/07/21 04:37:47 pollita Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.76 2004/07/24 04:01:48 pollita Exp $ */ #include php.h #include php_globals.h @@ -384,6 +384,12 @@ int allow_overwrite = 0; int read_write = 0; + if (context + php_stream_context_get_option(context, ftp, proxy, tmpzval) == SUCCESS) { + /* Use http wrapper to proxy ftp request */ + return php_stream_url_wrap_http(wrapper, path, mode, options, opened_path, context STREAMS_CC TSRMLS_CC); + } + tmp_line[0] = '\0'; if (strpbrk(mode, r+)) { @@ -1130,7 +1136,7 @@ php_stream_ftp_stream_stat, php_stream_ftp_url_stat, /* stat_url */ php_stream_ftp_opendir, /* opendir */ - FTP, + ftp, php_stream_ftp_unlink, /* unlink */ php_stream_ftp_rename, /* rename */ php_stream_ftp_mkdir, /* mkdir */ http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.88r2=1.89ty=u Index: php-src/ext/standard/http_fopen_wrapper.c diff -u php-src/ext/standard/http_fopen_wrapper.c:1.88 php-src/ext/standard/http_fopen_wrapper.c:1.89 --- php-src/ext/standard/http_fopen_wrapper.c:1.88 Fri May 28 09:38:06 2004 +++ php-src/ext/standard/http_fopen_wrapper.c Sat Jul 24 00:01:48 2004 @@ -18,7 +18,7 @@ | Wez Furlong [EMAIL PROTECTED] | +--+ */ -/* $Id: http_fopen_wrapper.c,v 1.88 2004/05/28 13:38:06 sesser Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.89 2004/07/24 04:01:48 pollita Exp $ */ #include php.h #include php_globals.h @@ -114,37 +114,50 @@ return NULL; } - if (strpbrk(mode, awx+)) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, HTTP wrapper does not support writeable connections.); - return NULL; - } - resource = php_url_parse(path); if (resource == NULL) { return NULL; } if (strncasecmp(resource-scheme, http, sizeof(http)) strncasecmp(resource-scheme, https, sizeof(https))) { - php_url_free(resource); - return php_stream_open_wrapper_ex(path, mode, ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); - } - - use_ssl = resource-scheme (strlen(resource-scheme) 4) resource-scheme[4] == 's'; - /* choose default ports */ - if (use_ssl resource-port == 0) - resource-port = 443; - else if (resource-port == 0) - resource-port = 80; - - if (context !use_ssl - php_stream_context_get_option(context, http, proxy, tmpzval) == SUCCESS - Z_TYPE_PP(tmpzval) == IS_STRING - Z_STRLEN_PP(tmpzval) 0) { - /* Don't use proxy server for SSL resources */ + if (!context || + php_stream_context_get_option(context, wrapper-wops-label, proxy, tmpzval) == FAILURE || + Z_TYPE_PP(tmpzval) != IS_STRING || + Z_STRLEN_PP(tmpzval) = 0) { + php_url_free(resource); + return php_stream_open_wrapper_ex(path, mode, ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); + } + /* Called from a non-http wrapper with http proxying requested (i.e. ftp) */ + request_fulluri = 1; + use_ssl = 0; + transport_len = Z_STRLEN_PP(tmpzval); transport_string = estrndup(Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval)); } else { - transport_len = spprintf(transport_string, 0, %s://%s:%d, use_ssl ? ssl : tcp, resource-host, resource-port); + /* Normal http request (possibly with proxy) */ + + if (strpbrk(mode, awx+)) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, HTTP wrapper does not support writeable connections.); + return NULL; + } + + use_ssl = resource-scheme
[PHP-CVS] cvs: php-src /ext/standard ftp_fopen_wrapper.c
pollita Sat Jul 24 00:14:26 2004 EDT Modified files: /php-src/ext/standard ftp_fopen_wrapper.c Log: Oh by the way, only use proxy mode for reading... http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.76r2=1.77ty=u Index: php-src/ext/standard/ftp_fopen_wrapper.c diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.76 php-src/ext/standard/ftp_fopen_wrapper.c:1.77 --- php-src/ext/standard/ftp_fopen_wrapper.c:1.76 Sat Jul 24 00:01:48 2004 +++ php-src/ext/standard/ftp_fopen_wrapper.cSat Jul 24 00:14:26 2004 @@ -18,7 +18,7 @@ | Sara Golemon [EMAIL PROTECTED] | +--+ */ -/* $Id: ftp_fopen_wrapper.c,v 1.76 2004/07/24 04:01:48 pollita Exp $ */ +/* $Id: ftp_fopen_wrapper.c,v 1.77 2004/07/24 04:14:26 pollita Exp $ */ #include php.h #include php_globals.h @@ -384,12 +384,6 @@ int allow_overwrite = 0; int read_write = 0; - if (context - php_stream_context_get_option(context, ftp, proxy, tmpzval) == SUCCESS) { - /* Use http wrapper to proxy ftp request */ - return php_stream_url_wrap_http(wrapper, path, mode, options, opened_path, context STREAMS_CC TSRMLS_CC); - } - tmp_line[0] = '\0'; if (strpbrk(mode, r+)) { @@ -410,6 +404,18 @@ /* No mode specified? */ php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, Unknown file open mode.); return NULL; + } + + if (context + php_stream_context_get_option(context, ftp, proxy, tmpzval) == SUCCESS) { + if (read_write == 1) { + /* Use http wrapper to proxy ftp request */ + return php_stream_url_wrap_http(wrapper, path, mode, options, opened_path, context STREAMS_CC TSRMLS_CC); + } else { + /* ftp proxy is read-only */ + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, FTP proxy may only be used in read mode); + return NULL; + } } stream = php_ftp_fopen_connect(wrapper, path, mode, options, opened_path, context, reuseid, resource, use_ssl, use_ssl_on_data TSRMLS_CC); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php