[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.
Hi! > I wonder if anybody can suggest a way to detect such commits > automatically so we can catch them. `git diff` and others show nothing > of relevance. We could get some commit that is only in master (like NEWS edits, for example) and check for it - if it's ever pushed into 5.4 that's trouble. This is of course a special master/5.4 hack but should work I think... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Fix error message: hooks/pre-receive
Commit:3f9aeb02ef1bde0d2f3c25c3a297bb872964c99a Author:Johannes Schlüter Wed, 25 Jul 2012 03:09:52 +0200 Parents: 870bde4b24538cf7b64f0dd01b630241c5a53109 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=3f9aeb02ef1bde0d2f3c25c3a297bb872964c99a Log: Fix error message Changed paths: M hooks/pre-receive Diff: diff --git a/hooks/pre-receive b/hooks/pre-receive index d605a8d..e30ca6c 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -134,7 +134,7 @@ if (isset($restrictedBranches[$repo_name])) { } if (count($restricted) > 0 && $pi->isForced() && $user != 'johannes') { -deny("You are allowed to overwrite commits on " . implode(', ', $restricted)); +deny("You are not allowed to overwrite commits on " . implode(', ', $restricted)); } $prefix = sprintf('%s/', $repo_name); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.
On Tue, 2012-07-24 at 20:34 -0400, Sean Coates wrote: > > Use > > git reset --hard origin/PHP-5.4 > > to reset your local checkout to the current version on the server. > > It should be noted that when you `reset --hard`, you'll lose local > changes (including branch commits, except in the reflog). You'll > probably want to stash first, reset, then stash pop (or branch > locally, merge, checkout 5.4, reset, then cherry-pick (or maybe > merge)). > > Sorry for the noise if this is already widely known, but since PHP is > relatively new to the world of git, I thought it was worth mentioning. Thanks for the advise! I hope nobody was affected as we had the issue for less than an hour. For reference: The 5.4 with the invalid commit is backed up at https://github.com/johannes/php-src/commits/php-5.4-messup2 The bad commit was 8ad868 there, looks innocent but is quite a big merge. I wonder if anybody can suggest a way to detect such commits automatically so we can catch them. `git diff` and others show nothing of relevance. To undo the commit I took the following steps: $ git checkout PHP-5.4# Get a clean tree including the bad # commit $ git reset --hard 5f224412fa689 # This is the last good commit # before 8ad868 $ git push -f origin PHP-5.4 # Overwrite newer versions on the # server. Right now only I can do that # (see my recent commit to karma.git) johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] Re: [PHP-DEV] Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.
> Use > git reset --hard origin/PHP-5.4 > to reset your local checkout to the current version on the server. It should be noted that when you `reset --hard`, you'll lose local changes (including branch commits, except in the reflog). You'll probably want to stash first, reset, then stash pop (or branch locally, merge, checkout 5.4, reset, then cherry-pick (or maybe merge)). Sorry for the noise if this is already widely known, but since PHP is relatively new to the world of git, I thought it was worth mentioning. S
Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.phpt Zend/tests/const_de
On 07/24/2012 05:18 PM, Stas Malyshev wrote: > Hi! > > On 7/24/12 5:15 PM, Johannes Schlüter wrote: >> Branch: PHP-5.4 >> Deleted commits count: 2298 >> User: Johannes Schlüter Wed, 25 Jul 2012 00:15:30 >> + >> > > What does this push do? > It reverses the mess I caused. I had no idea I did it, and the commit messages didn't show it, but I merged master into 5.4 and pushed it. The commit message just showed the trivial sun/sock fpm change, but what actually happened was that I changed the 5.4 tree into master at the same time. I really really hate that a simple client-side mistake can cause silent massive code changes like this. So, what I did to cause it was to do a 'git rebase master' in the 5.4 branch. Just muscle memory from working all day in an environment where we develop in master all the time. The forced-push restriction we put in to try to prevent this kind of mass-repo-fuck doesn't catch this particular kind of fuckyness. -Rasmus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.phpt Zend/tests/const_de
Hi, for some reason master was merged into the PHP-5.4 branch. I undid this change in the repo. If you pulled in between your next pull should result in an error. Use git reset --hard origin/PHP-5.4 to reset your local checkout to the current version on the server. johannes On Wed, 2012-07-25 at 00:15 +, Johannes Schlüter wrote: > Branch: PHP-5.4 > Deleted commits count: 2298 > User: Johannes Schlüter Wed, 25 Jul 2012 00:15:30 > + > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] del php-src: .travis.yml LICENSE Makefile.gcov NEWS README.md UPGRADING UPGRADING.INTERNALS Zend/tests/bug18556.phpt Zend/tests/bug60738.phpt Zend/tests/bug61681.phpt Zend/tests/const_de
Hi! On 7/24/12 5:15 PM, Johannes Schlüter wrote: > Branch: PHP-5.4 > Deleted commits count: 2298 > User: Johannes Schlüter Wed, 25 Jul 2012 00:15:30 > + > What does this push do? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com karma: Allow myself to do forced pushes.: hooks/pre-receive
Commit:870bde4b24538cf7b64f0dd01b630241c5a53109 Author:Johannes Schlüter Wed, 25 Jul 2012 02:08:05 +0200 Parents: d1884840e7108c098ce75e7bbe204fb77b5fc975 Branches: master Link: http://git.php.net/?p=karma.git;a=commitdiff;h=870bde4b24538cf7b64f0dd01b630241c5a53109 Log: Allow myself to do forced pushes. This should be made nicer in some way so we can easily fix the repo when messed up. Changed paths: M hooks/pre-receive Diff: diff --git a/hooks/pre-receive b/hooks/pre-receive index 2fcfe42..d605a8d 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -133,7 +133,7 @@ if (isset($restrictedBranches[$repo_name])) { }); } -if (count($restricted) > 0 && $pi->isForced()) { +if (count($restricted) > 0 && $pi->isForced() && $user != 'johannes') { deny("You are allowed to overwrite commits on " . implode(', ', $restricted)); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
johannes Wed, 25 Jul 2012 00:10:14 + Revision: http://svn.php.net/viewvc?view=revision&revision=326802 Log: Give myself access to karma.git Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail2012-07-24 23:38:18 UTC (rev 326801) +++ SVNROOT/global_avail2012-07-25 00:10:14 UTC (rev 326802) @@ -9,7 +9,7 @@ avail||playground.git # People that have access to the Karma implementation that is usedon git.php.net -avail|dsp,irker,derick,fa|karma.git +avail|dsp,irker,derick,fa,johannes|karma.git # Some people also have access to the configuration files in the SVNROOT. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #62654: sapi/fpm/fpm/fpm_sockets.c
Commit:5799ebdb0cafb2de1dbb18cfe780976c98dbaeac Author:Rasmus Lerdorf Tue, 24 Jul 2012 16:28:49 -0700 Committer: Gustavo André dos Santos Lopes Wed, 25 Jul 2012 02:03:47 +0200 Parents: ffa8461bfebebd8158cdb26ad5f3439c527545f7 Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5799ebdb0cafb2de1dbb18cfe780976c98dbaeac Log: Fix bug #62654 Bugs: https://bugs.php.net/62654 Changed paths: M sapi/fpm/fpm/fpm_sockets.c Diff: diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index d24dccc..f56b9cf 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -455,11 +455,11 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq) #endif -int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */ +int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */ { int fd; - if (!sun || sun->sun_family != AF_UNIX) { + if (!sock || sock->sun_family != AF_UNIX) { return -1; } @@ -467,7 +467,7 @@ int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ return -1; } - if (connect(fd, (struct sockaddr *)sun, socklen) == -1) { + if (connect(fd, (struct sockaddr *)sock, socklen) == -1) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #62654: sapi/fpm/fpm/fpm_sockets.c
Commit:0fbc8561e687689f796d95584cea1fa959eee83b Author:Rasmus Lerdorf Tue, 24 Jul 2012 16:28:49 -0700 Parents: f356be68c244dd0dd70894ac4a5c9b4e3a882e04 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0fbc8561e687689f796d95584cea1fa959eee83b Log: Fix bug #62654 Bugs: https://bugs.php.net/62654 Changed paths: M sapi/fpm/fpm/fpm_sockets.c Diff: diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index d24dccc..f56b9cf 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -455,11 +455,11 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq) #endif -int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */ +int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */ { int fd; - if (!sun || sun->sun_family != AF_UNIX) { + if (!sock || sock->sun_family != AF_UNIX) { return -1; } @@ -467,7 +467,7 @@ int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ return -1; } - if (connect(fd, (struct sockaddr *)sun, socklen) == -1) { + if (connect(fd, (struct sockaddr *)sock, socklen) == -1) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #62654: sapi/fpm/fpm/fpm_sockets.c
Commit:a05e07ea1f75b8021c9b64bf93ff970873375d97 Author:Rasmus Lerdorf Tue, 24 Jul 2012 16:28:49 -0700 Parents: f356be68c244dd0dd70894ac4a5c9b4e3a882e04 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a05e07ea1f75b8021c9b64bf93ff970873375d97 Log: Fix bug #62654 Bugs: https://bugs.php.net/62654 Changed paths: M sapi/fpm/fpm/fpm_sockets.c Diff: diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index d24dccc..f56b9cf 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -455,11 +455,11 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq) #endif -int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */ +int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */ { int fd; - if (!sun || sun->sun_family != AF_UNIX) { + if (!sock || sock->sun_family != AF_UNIX) { return -1; } @@ -467,7 +467,7 @@ int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ return -1; } - if (connect(fd, (struct sockaddr *)sun, socklen) == -1) { + if (connect(fd, (struct sockaddr *)sock, socklen) == -1) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug #62654: sapi/fpm/fpm/fpm_sockets.c
Commit:5f224412fa6892645ca548ac75f20ff8743ed916 Author:Rasmus Lerdorf Tue, 24 Jul 2012 16:28:49 -0700 Parents: 54cba5aa91c58e2bcfa7957f72d5f4553c0dd265 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5f224412fa6892645ca548ac75f20ff8743ed916 Log: Fix bug #62654 Bugs: https://bugs.php.net/62654 Changed paths: M sapi/fpm/fpm/fpm_sockets.c Diff: diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c index d24dccc..f56b9cf 100644 --- a/sapi/fpm/fpm/fpm_sockets.c +++ b/sapi/fpm/fpm/fpm_sockets.c @@ -455,11 +455,11 @@ int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq) #endif -int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ */ +int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */ { int fd; - if (!sun || sun->sun_family != AF_UNIX) { + if (!sock || sock->sun_family != AF_UNIX) { return -1; } @@ -467,7 +467,7 @@ int fpm_socket_unix_test_connect(struct sockaddr_un *sun, size_t socklen) /* {{{ return -1; } - if (connect(fd, (struct sockaddr *)sun, socklen) == -1) { + if (connect(fd, (struct sockaddr *)sock, socklen) == -1) { return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /SVNROOT/ global_avail
rasmus Tue, 24 Jul 2012 18:56:50 + Revision: http://svn.php.net/viewvc?view=revision&revision=326797 Log: karma Changed paths: U SVNROOT/global_avail Modified: SVNROOT/global_avail === --- SVNROOT/global_avail 2012-07-24 17:10:02 UTC (rev 326796) +++ SVNROOT/global_avail 2012-07-24 18:56:50 UTC (rev 326797) @@ -53,7 +53,7 @@ # The PHP Documentation Group maintains the documentation and its # translations. -avail|lucas,jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,frogger,coldocean,fleaslob,torben,lynch,kk,ted,paul,mbritton,bibi,mrobinso,perugini,tzwenny,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,danbeck,sli,jmcastagnetto,mohrt,samesch,soneca,ronabop,glace,latoserver,rafael,jcmeloni,chrullrich,mk,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zimt,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,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,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,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,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,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,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,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,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,tessus,gavinfo,rant,ramsey,arkadius,erinet,omar,oliver,rquadling,timo,shadda,joeaccord,ezyang,ljbuesch,knut,asonge,ron,nicobn,jacques,void,mcbrown,simionea,preinheimer,stanprog,msaraujo,asbjornit,philippe,sezer,rmlr,hradtke,alan,danielc,danbrown,alexxed,psalehpoor,loudi,abedford,morgue,nilgun,saltybeagle,dedemorton,eniac2008,jawed,ch,mgdm,ericstewart,mager,keito,juxecl,chx,vito,beverloo,joris,mumumu,brandon,santiago,ajcollison,rbowen,ruslany,satoruyoshida,seld,degeberg,yago,seros,dtajchreber,jwage,ambrish,shein,frozenfire,x1v4nx,carlos,nikola,baijh,nullw0rm,danielb,thijs,orientalcoder,sh_mashaqi,dominis,irfan,dre,marionunes,ditto,mirry,superb,moacir,itanea,vitali,duodraco,craigkitterman,mfonda,nbpoole,ircmaxell,nikic,kassner,lyma,gmsecrieru,cyberline,avb,chunsong,jguerin,honestqiao,cweiske,bradley,till,gooh,levim,nveid,jpauli,drak,jeanseb,pmartin,peehaa,goo
[PHP-CVS] com php-src: ini intl.explicit_cleanup -> INTL_EXPLICIT_CLEANUP: ext/intl/php_intl.c
Commit:f356be68c244dd0dd70894ac4a5c9b4e3a882e04 Author:Gustavo André dos Santos Lopes Tue, 24 Jul 2012 15:13:02 +0200 Parents: 777160f7b544971f7e73932482735af69bc42ec7 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f356be68c244dd0dd70894ac4a5c9b4e3a882e04 Log: ini intl.explicit_cleanup -> INTL_EXPLICIT_CLEANUP Added an environment variable and removed the ini setting intl.explicit_cleanup for calling u_cleanup() Changed paths: M ext/intl/php_intl.c Diff: diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 38175ca..78da0f5 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -853,36 +853,11 @@ zend_function_entry intl_functions[] = { }; /* }}} */ -static zend_bool explicit_cleanup = 0; - -static ZEND_INI_MH(OnExplicitCleanupUpdate) -{ - if (stage == PHP_INI_STAGE_STARTUP) { - if (new_value_length == 2 && strcasecmp("on", new_value) == 0) { - explicit_cleanup = (zend_bool)1; - } - else if (new_value_length == 3 && strcasecmp("yes", new_value) == 0) { - explicit_cleanup = (zend_bool)1; - } - else if (new_value_length == 4 && strcasecmp("true", new_value) == 0) { - explicit_cleanup = (zend_bool)1; - } - else { - explicit_cleanup = (zend_bool)atoi(new_value); - } - return SUCCESS; - } else { - return FAILURE; - } -} - - /* {{{ INI Settings */ PHP_INI_BEGIN() STD_PHP_INI_ENTRY(LOCALE_INI_NAME, NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_locale, zend_intl_globals, intl_globals) STD_PHP_INI_ENTRY("intl.error_level", "0", PHP_INI_ALL, OnUpdateLong, error_level, zend_intl_globals, intl_globals) STD_PHP_INI_ENTRY("intl.use_exceptions", "0", PHP_INI_ALL, OnUpdateBool, use_exceptions, zend_intl_globals, intl_globals) - PHP_INI_ENTRY_EX("intl.explicit_cleanup", "0", 0, OnExplicitCleanupUpdate, zend_ini_boolean_displayer_cb) PHP_INI_END() /* }}} */ @@ -1015,14 +990,18 @@ PHP_MINIT_FUNCTION( intl ) } /* }}} */ +#define EXPLICIT_CLEANUP_ENV_VAR "INTL_EXPLICIT_CLEANUP" + /* {{{ PHP_MSHUTDOWN_FUNCTION */ PHP_MSHUTDOWN_FUNCTION( intl ) { + const char *cleanup; /* For the default locale php.ini setting */ UNREGISTER_INI_ENTRIES(); -if (explicit_cleanup) { + cleanup = getenv(EXPLICIT_CLEANUP_ENV_VAR); +if (cleanup != NULL && !(cleanup[0] == '0' && cleanup[1] == '\0')) { u_cleanup(); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: - Fixed ZTS build: ext/standard/mail.c
Commit:54cba5aa91c58e2bcfa7957f72d5f4553c0dd265 Author:Felipe Pena Tue, 24 Jul 2012 10:02:32 -0300 Parents: f2cef8afc499ede08e935449030595933d070c5e Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=54cba5aa91c58e2bcfa7957f72d5f4553c0dd265 Log: - Fixed ZTS build Changed paths: M ext/standard/mail.c Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 0bbdebc..364f7fc 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -210,7 +210,7 @@ void php_mail_log_to_syslog(char *message) { } -void php_mail_log_to_file(char *filename, char *message, size_t message_size) { +void php_mail_log_to_file(char *filename, char *message, size_t message_size TSRMLS_DC) { /* Write 'message' to the given file. */ uint flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR; php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL); @@ -261,7 +261,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char else { /* Convert the final space to a newline when logging to file. */ tmp[l - 1] = '\n'; - php_mail_log_to_file(mail_log, tmp, l); + php_mail_log_to_file(mail_log, tmp, l TSRMLS_CC); } efree(tmp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Updated NES: NEWS
Commit:f2cef8afc499ede08e935449030595933d070c5e Author:Florian Anderiasch Tue, 24 Jul 2012 14:46:19 +0200 Parents: ddc8d1624525e500c593f4cbd30b3358ad4ad95e Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2cef8afc499ede08e935449030595933d070c5e Log: Updated NES Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 883d910..0df6970 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ PHP NEWS . Fixed bug #62564 (Extending MessageFormatter and adding property causes crash). (Felipe) +- Mail: + . Fixed bug #62356 (Add syslog support to mail.log). (Michael Orlitzky) + - MySQLnd: . Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode). (Laruence) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add optional depth parameter to json_encode #62369: ext/json/json.c ext/json/php_json.h ext/json/tests/bug62369.phpt
Commit:45d596ea1e32792c7b7b7f28be220dea861b6708 Author:Florian Anderiasch Tue, 24 Jul 2012 13:15:16 +0200 Parents: dd9d64b21e4bbc8a106a6156dc6ffefbcc33ec02 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=45d596ea1e32792c7b7b7f28be220dea861b6708 Log: Add optional depth parameter to json_encode #62369 Bugs: https://bugs.php.net/62369 Changed paths: M ext/json/json.c M ext/json/php_json.h A ext/json/tests/bug62369.phpt Diff: diff --git a/ext/json/json.c b/ext/json/json.c index 9669047..dab4230 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -47,6 +47,7 @@ ZEND_DECLARE_MODULE_GLOBALS(json) ZEND_BEGIN_ARG_INFO_EX(arginfo_json_encode, 0, 0, 1) ZEND_ARG_INFO(0, value) ZEND_ARG_INFO(0, options) + ZEND_ARG_INFO(0, depth) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_json_decode, 0, 0, 1) @@ -126,6 +127,7 @@ static PHP_GINIT_FUNCTION(json) { json_globals->encoder_depth = 0; json_globals->error_code = 0; + json_globals->encode_max_depth = 0; } /* }}} */ @@ -341,6 +343,9 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC) } } + if (JSON_G(encoder_depth) > JSON_G(encode_max_depth)) { + JSON_G(error_code) = PHP_JSON_ERROR_DEPTH; + } --JSON_G(encoder_depth); json_pretty_print_char(buf, options, '\n' TSRMLS_CC); json_pretty_print_indent(buf, options TSRMLS_CC); @@ -702,13 +707,16 @@ static PHP_FUNCTION(json_encode) zval *parameter; smart_str buf = {0}; long options = 0; +long depth = JSON_PARSER_DEFAULT_DEPTH; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", ¶meter, &options) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ll", ¶meter, &options, &depth) == FAILURE) { return; } JSON_G(error_code) = PHP_JSON_ERROR_NONE; + JSON_G(encode_max_depth) = depth; + php_json_encode(&buf, parameter, options TSRMLS_CC); if (JSON_G(error_code) != PHP_JSON_ERROR_NONE && !(options & PHP_JSON_PARTIAL_OUTPUT_ON_ERROR)) { diff --git a/ext/json/php_json.h b/ext/json/php_json.h index afeff3f..2b3cf58 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -40,6 +40,7 @@ extern zend_module_entry json_module_entry; ZEND_BEGIN_MODULE_GLOBALS(json) int encoder_depth; int error_code; + int encode_max_depth; ZEND_END_MODULE_GLOBALS(json) #ifdef ZTS diff --git a/ext/json/tests/bug62369.phpt b/ext/json/tests/bug62369.phpt new file mode 100644 index 000..a5efd80 --- /dev/null +++ b/ext/json/tests/bug62369.phpt @@ -0,0 +1,34 @@ +--TEST-- +FR #62369 (Segfault on json_encode(deeply_nested_array) +--SKIPIF-- + +--FILE-- +http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4': php.ini-development php.ini-production
Commit:81de31884d219645e4128e3dd57db8edbf5c Author:Florian Anderiasch Tue, 24 Jul 2012 14:34:41 +0200 Parents: 45d596ea1e32792c7b7b7f28be220dea861b6708 ddc8d1624525e500c593f4cbd30b3358ad4ad95e Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=81de31884d219645e4128e3dd57db8edbf5c Log: Merge branch 'PHP-5.4' * PHP-5.4: Add syslog support to mail.log #62356 Bugs: https://bugs.php.net/62356 Changed paths: MM php.ini-development MM php.ini-production Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add syslog support to mail.log #62356: ext/standard/mail.c php.ini-development php.ini-production
Commit:ddc8d1624525e500c593f4cbd30b3358ad4ad95e Author:Florian Anderiasch Tue, 24 Jul 2012 14:29:25 +0200 Parents: 9fe8c58130ac82d2b52b35a290b71569abe50d18 Branches: PHP-5.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ddc8d1624525e500c593f4cbd30b3358ad4ad95e Log: Add syslog support to mail.log #62356 Patch by Michael Orlitzky Bugs: https://bugs.php.net/62356 Changed paths: M ext/standard/mail.c M php.ini-development M php.ini-production Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 36568c5..0bbdebc 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -39,6 +39,7 @@ #endif #endif +#include "php_syslog.h" #include "php_mail.h" #include "php_ini.h" #include "php_string.h" @@ -189,6 +190,37 @@ PHP_FUNCTION(mail) } /* }}} */ + +void php_mail_log_crlf_to_spaces(char *message) { + /* Find all instances of carriage returns or line feeds and +* replace them with spaces. Thus, a log line is always one line +* long +*/ + char *p = message; + while ((p = strpbrk(p, "\r\n"))) { + *p = ' '; + } +} + +void php_mail_log_to_syslog(char *message) { + /* Write 'message' to syslog. */ +#ifdef HAVE_SYSLOG_H + php_syslog(LOG_NOTICE, "%s", message); +#endif +} + + +void php_mail_log_to_file(char *filename, char *message, size_t message_size) { + /* Write 'message' to the given file. */ + uint flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR; + php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL); + if (stream) { + php_stream_write(stream, message, message_size); + php_stream_close(stream); + } +} + + /* {{{ php_mail */ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd TSRMLS_DC) @@ -216,19 +248,22 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char if (mail_log && *mail_log) { char *tmp; int l = spprintf(&tmp, 0, "mail() on [%s:%d]: To: %s -- Headers: %s\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ""); - php_stream *stream = php_stream_open_wrapper(mail_log, "a", IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR, NULL); - if (hdr) { /* find all \r\n instances and replace them with spaces, so a log line is always one line long */ - char *p = tmp; - while ((p = strpbrk(p, "\r\n"))) { - *p = ' '; - } - tmp[l - 1] = '\n'; + if (hdr) { + php_mail_log_crlf_to_spaces(tmp); } - if (stream) { - php_stream_write(stream, tmp, l); - php_stream_close(stream); + + if (!strcmp(mail_log, "syslog")) { + /* Drop the final space when logging to syslog. */ + tmp[l - 1] = 0; + php_mail_log_to_syslog(tmp); + } + else { + /* Convert the final space to a newline when logging to file. */ + tmp[l - 1] = '\n'; + php_mail_log_to_file(mail_log, tmp, l); } + efree(tmp); } if (PG(mail_x_header)) { diff --git a/php.ini-development b/php.ini-development index 298cb06..4ff4192 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1020,6 +1020,8 @@ mail.add_x_header = On ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = +; Log mail to syslog (Event Log on NT, not valid in Windows 95). +;mail.log = syslog [SQL] ; http://php.net/sql.safe-mode diff --git a/php.ini-production b/php.ini-production index d4c1261..814455b 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1020,6 +1020,8 @@ mail.add_x_header = On ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = +; Log mail to syslog (Event Log on NT, not valid in Windows 95). +;mail.log = syslog [SQL] ; http://php.net/sql.safe-mode -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Re-fix bug #55544: ext/zlib/php_zlib.h ext/zlib/tests/bug55544.phpt ext/zlib/zlib.c
Hi: the fix is bad smell, I knew. maybe you can find a better fix :) ? the problem is explained in #55544: " here is the confusion(assuming -d output_handler=ob_gzhandler -d zlib.output_compression=0) : 1. php.output_handler will change the ZLIGB(output_compression) before the zlib RINIT 2. in zlib RINIT, we set the ZLIBG(output_compression) to default value(ini) 3. if we don't override the ZLIBG(output_compression), then in the php_zlib_output_compression_start which will be called in RINT will try to start zlib compression handler (although it depends on the requeset header), then, the conflict warning will be threw. 4. if we override it, then it the php_zlib_output_compression_start, it will return FALIURE, and no compression occurred(see the codes from my previous reply) so, the key problem is multi-featrues depends on one global flag -> ZLIBG(output_compression)." thanks On Tue, Jul 24, 2012 at 2:43 PM, Xinchen Hui wrote: > Commit:4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe > Author:Xinchen Hui Tue, 24 Jul 2012 14:43:53 > +0800 > Parents: 2abc4c2f6fabfc81d12380170dc5ec7be9314a61 > Branches: PHP-5.4 > > Link: > http://git.php.net/?p=php-src.git;a=commitdiff;h=4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe > > Log: > Re-fix bug #55544 > > Bugs: > https://bugs.php.net/55544 > > Changed paths: > M ext/zlib/php_zlib.h > A ext/zlib/tests/bug55544.phpt > M ext/zlib/zlib.c > > > Diff: > diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h > index 449dfed..ab67351 100644 > --- a/ext/zlib/php_zlib.h > +++ b/ext/zlib/php_zlib.h > @@ -55,6 +55,7 @@ ZEND_BEGIN_MODULE_GLOBALS(zlib) > long output_compression_default; > char *output_handler; > php_zlib_context *ob_gzhandler; > +zend_bool handler_registered; > ZEND_END_MODULE_GLOBALS(zlib); > > php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char > *mode, int options, char **opened_path, php_stream_context *context > STREAMS_DC TSRMLS_DC); > diff --git a/ext/zlib/tests/bug55544.phpt b/ext/zlib/tests/bug55544.phpt > new file mode 100644 > index 000..ca4214a > Binary files /dev/null and b/ext/zlib/tests/bug55544.phpt differ > diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c > index eac757b..7ff2b30 100644 > --- a/ext/zlib/zlib.c > +++ b/ext/zlib/zlib.c > @@ -263,6 +263,8 @@ static php_output_handler > *php_zlib_output_handler_init(const char *handler_name > ZLIBG(output_compression) = chunk_size ? chunk_size : > PHP_OUTPUT_HANDLER_DEFAULT_SIZE; > } > > +ZLIBG(handler_registered) = 1; > + > if ((h = php_output_handler_create_internal(handler_name, > handler_name_len, php_zlib_output_handler, chunk_size, flags TSRMLS_CC))) { > php_output_handler_set_context(h, > php_zlib_output_handler_context_init(TSRMLS_C), > php_zlib_output_handler_context_dtor TSRMLS_CC); > } > @@ -964,9 +966,10 @@ static PHP_MSHUTDOWN_FUNCTION(zlib) > static PHP_RINIT_FUNCTION(zlib) > { > ZLIBG(compression_coding) = 0; > - ZLIBG(output_compression) = ZLIBG(output_compression_default); > - > - php_zlib_output_compression_start(TSRMLS_C); > +if (!ZLIBG(handler_registered)) { > +ZLIBG(output_compression) = ZLIBG(output_compression_default); > +php_zlib_output_compression_start(TSRMLS_C); > +} > > return SUCCESS; > } > @@ -976,6 +979,7 @@ static PHP_RINIT_FUNCTION(zlib) > static PHP_RSHUTDOWN_FUNCTION(zlib) > { > php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_C); > +ZLIBG(handler_registered) = 0; > > return SUCCESS; > } > @@ -1000,6 +1004,7 @@ static PHP_MINFO_FUNCTION(zlib) > static ZEND_MODULE_GLOBALS_CTOR_D(zlib) > { > zlib_globals->ob_gzhandler = NULL; > +zlib_globals->handler_registered = 0; > } > /* }}} */ > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php