Re: [PHP-DEV] Feature(let) idea
On Tue, June 19, 2007 3:36 am, Stefan Priebsch wrote: > - define a unified path separator for include_path (the > system-dependend > ones could still be accepted, thus keeping BC) Any character you choose would be a valid part of a filename in some other OS, and so you'd then need an "escape" character to allow that character in the filename itself. This then gets pretty messy pretty fast. The CONSTANT already defined should be sufficient for writing portable code for this one, imho. [The rest seems fine to me] -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Bug 38245: magic_quotes_gpc and $_FILES
On Tue, June 19, 2007 5:19 am, Tim Starling wrote: > Can someone explain the closing comment on this bug report to me? > > http://bugs.php.net/bug.php?id=38245 > > Surely in a addslashes-escaped string, \\ is the Windows directory > separator, not \. > > The bug clearly describes irreversible corruption of upload filenames > by > PHP. I just had a report of it in a MediaWiki context, and I can't > believe that it wouldn't be considered a bug. Coming in late, but there has been no response I can see so far... You may also want to test with magic_quotes_gpc *OFF* and see if that makes a difference. I'm not sure why basename would be applied at all, since the browser only sends the basename of the file anyway, no? Perhaps, however, this is to avoid "hacks" that upload files with bogus filenames in attempts to do evil things... Even so, the basename should/could be applied before the magic quotes, I should think. On the plus side, if this bug gets people to turn OFF Magic Quotes, that's a net gain. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: documentation of php5ts.dll and .NET wrapper
On Tue, June 19, 2007 3:38 am, Richard Quadling wrote: > On 19/06/07, Johannes Schlüter <[EMAIL PROTECTED]> wrote: >> Sara has a nice article about TSRM: >> http://blog.libssh2.org/index.php?/archives/22-What-the-heck-is-TSRMLS_CC-anyway.html >> and since you're using php5ts.dll you have zts enabled. > > Why have ... > > TSRMLS_CC > > when ... > > , TSRMLS_C > > actually looks more "correct" when you're reading the code ... > > php_myextension_globals_ctor(&myextension_globals TSRMLS_CC); > > vs > > php_myextension_globals_ctor(&myextension_globals , TSRMLS_C); > > > I'm not saying change anything, but from someone trying to make > headway with the source, it just looks right (parameters are separated > by a comma not a space). So, when would it ever be "right" to use the _C version? Someplace where the code is completely meaningless in a non-ZTS environment only?... That seems kind of an awful lot of meta-knowledge to have to carry around in one's head... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Exception thrown without a stack frame
Hey! I sometimes get the following error >> Fatal error: Exception thrown without a stack frame in >> Unknown on line 0 What does this mean? Should this ever happen or does it somehow say that there is a bug in PHP. I am asking this because I've had this error a few times and it's pretty hard to debug. Thanks! - Jakob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: documentation of php5ts.dll and .NET wrapper
So, when would it ever be "right" to use the _C version? When you have function that its one (possible) argument is TRSM pointer. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What is the use of "unicode.semantics" in PHP 6?
On Tue, June 19, 2007 2:44 pm, Rasmus Lerdorf wrote: > It comes down to predicting the future. Whichever way we go, the > decision is going to be second-guessed. If we have critical mass for > a > clean BC break, then I am ok with it. For me personally it would make > things a bit easier, but I think it would be a long long time before > we > saw any large hosts out there switch to a PHP 6 that can't run common > PHP 5 apps. If they switch to 6 with unicode off, and never ever get around to turning unicode on, will it really be any better? They'll just be running some weird-o setup that causes all kinds of bugs and issues and you'll have users with php 6 apps that won't work in php 6 and who submit bogus bug reports about it, because of the setting. A clean break is probably better, especially if it makes php 6 much more maintainable. Large-scale hosts won't switch to 6 any faster than they switched to 5, unless there are ZERO BC breaks. And nobody can guarantee zero breaks, because there are always buglets. The effort to have unicode off in 6 is probably larger than the effort to document what needs to be done to a PHP 5 app to make it be 6-friendly, or even write tools to auto-convert the buik of a script. If unicode semantics are "on" what exactly is borked in PHP 5? Can that be fixed to be BC without resorting to this toggle? -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Exception thrown without a stack frame
I would guess that an exception is getting thrown before you PHP script has actually started... Something in the parsing of GET/POST data or file upload handler, perhaps. Can you nail down what was being done when it occurred, perhaps by sending the error to Apache error log, and then looking at previous line[s] to see what scripts are getting accessed. On Thu, June 28, 2007 3:25 pm, Jakob Buchgraber wrote: > Hey! > > I sometimes get the following error > >> Fatal error: Exception thrown without a stack frame in > >> Unknown on line 0 > > What does this mean? Should this ever happen or does it somehow say > that > there is a bug in PHP. I am asking this because I've had this error a > few times and it's pretty hard to debug. > > Thanks! > > - Jakob > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Exception thrown without a stack frame
> I sometimes get the following error > >> Fatal error: Exception thrown without a stack frame in > >> Unknown on line 0 > > What does this mean? When we see these, they're typically from our custom session handler. -- Andrew Minerd Software Architect The Selling Source, Inc. On Thu, 28 Jun 2007 22:25:55 +0200 [EMAIL PROTECTED] (Jakob Buchgraber) wrote: > Hey! > > I sometimes get the following error > >> Fatal error: Exception thrown without a stack frame in > >> Unknown on line 0 > > What does this mean? Should this ever happen or does it somehow say that > there is a bug in PHP. I am asking this because I've had this error a > few times and it's pretty hard to debug. > > Thanks! > > - Jakob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] debug level
Hello, I'd like to set the debug level to 3, i.e. set compiler flag -g3 instead -g. Can anyone give me a hint where to do this? Best Regards, Oliver -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: SNAPS+SNAPSPecl different to Pecl4Win
Thanks for your encouraging words. I ran a "complete" build today against php 5.2.3, and these are the stats: - 134 packaged extensions downloaded from pecl website (sniffed the list out of cvs.php.net, then got the latest existing package for every one) of those: only 61 have a config.w32 file, while 27 are part of the php source distribution - there are 79 folders in the /ext dir of the source distribution, but only 45 dlls in the windows distribution - pecl snapshot contains 75 extensions, none of which is part of the 45 dlls in the windows distribution - pecl4win snapshot contains 94 extensions, 13 of which are distributed as dlls in the windows distribution and 75 of which are part of the pecl snapshot ==> pecl snapshot is a subset of pecl4win! I used the zip.zip file from Edin instead of as a complete build environment instead of win32build from php.net, and vc++ 2005 express (so no luck in testing the produced dlls, as they are not compatible with the official distribution). Caveats: - for packages existing both in pecl and in the base distribution, I compiled the version coming with the distribution - bitset and blenc have errors in config.w32 that prevent building a correct Makefile. Both have been fixed in cvs, but not (yet) in a release - same goes for cairo_wrapper. Strangely enough, the cvs fix to the config file dates from november, while the package is from January. Yes, I am looking at you, Hartmut! ;[ - extensions depeneding on external libs mdbtools, ekhtml and freeimage have not been built because the libs are missing. BTW: I have downloaded from sf.net a binary version of freeimage wit .h, .lib and .dll, so that might (?) be easily solved Results: 61 dll files built, 43 of which are part of the standard win32 distribution and 29 of which are already in pecl4win Compared to pecl4win build log, I have to fix a couple of includes (svn, fbcaccess), plus I lost somewhere all the win32* extensions, so the final count might be up two or four extensions. All in all, not a huge sucess, but better than nothing... Next steps: + try running the whole process again with php 4.4 + make sure that the db and gui can accomodate both a cvs version and many packaged versions + ... + profit! Hi Gaetano, The flaw is not in your system, but in PECL itself. The best approach here is for authors to ensure their packages are up to date (I don't intend to single out any folks here, it's not easy to do what I'm saying). Extensions that don't build simply won't be there. This is how it works now, except that it is based on CVS rather than on releases. No problem in singling out folks: I can do it myself! One can't expect that all old releases will build, there are several examples of packages at pear.php.net that are so ancient, there was no proper validation of the package.xml file and they won't install with newer modern versions of the PEAR installer. This is perfectly natural. Also, generally there is a lag between CVS and releases for good reason - further testing of CVS is needed to ensure it doesn't break things. If there is a pecl4win that shows broken releases, then it puts a useful pressure on devs to release a new package version. I see no downsides to your approach. What may be the best solution is to continue to build from CVS as well, so we have "snapshots" in a similar manner to PHP snapshots, and releases. Thanks, Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] debug level
CFLAGS="-g3" ./configure ..etc. Oliver Block kirjoitti: Hello, I'd like to set the debug level to 3, i.e. set compiler flag -g3 instead -g. Can anyone give me a hint where to do this? Best Regards, Oliver -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What is the use of "unicode.semantics" in PHP 6?
>> It comes down to predicting the future. Whichever way we go, the >> decision is going to be second-guessed. If we have critical mass for >> a >> clean BC break, then I am ok with it. For me personally it would make >> things a bit easier, but I think it would be a long long time before >> we >> saw any large hosts out there switch to a PHP 6 that can't run common >> PHP 5 apps. > > If they switch to 6 with unicode off, and never ever get around to > turning unicode on, will it really be any better? > > They'll just be running some weird-o setup that causes all kinds of > bugs and issues and you'll have users with php 6 apps that won't work > in php 6 and who submit bogus bug reports about it, because of the > setting. > > A clean break is probably better, especially if it makes php 6 much > more maintainable. > > Large-scale hosts won't switch to 6 any faster than they switched to > 5, unless there are ZERO BC breaks. > > And nobody can guarantee zero breaks, because there are always buglets. buglet = small break and not something that requires massive code rewrite. Rewritten code is no longer backwards compatible. So developers have to maintain two code branches or two different sets of libraries. If code is maintained in one branch, scripts will need wrapper functions for most of PHP string and stream function calls. Instead of having performance loss in interpreter, you will force performance loss in portable scripts. > The effort to have unicode off in 6 is probably larger than the effort > to document what needs to be done to a PHP 5 app to make it be > 6-friendly, or even write tools to auto-convert the buik of a script. > > If unicode semantics are "on" what exactly is borked in PHP 5? In Unicode mode \[0-7]{1,3} and \x[0-9A-Fa-f]{1,2} refer to unicode code points and not to octal or hexadecimal byte values. Fix is not backwards compatible. Scripts can't match bytes. How they are supposed to check if string is in plain ascii or in 8bit? Do conversion to ASCII and check for errors instead of looking for 8bit byte values? How can scripts replace 8bit bytes with some other strings? ISO-8859-2 decoding table contains 95 entries written and evaluated as binary strings. Same thing applies to other iso-8859 and windows-125x character sets. iso-89859-1 and utf-8 decoding does not use mapping tables and performs complex calculations with byte values. multibyte character set decoding might actually benefit from unicode_encode(), if Table 325 (http://www.php.net/unicode) provides more information about U_INVALID_SUBSTITUTE and other unicode. settings. PHP6 does not provide backwards compatible functions to work with bytes. Provided constructs are not backwards compatible. If scripts want to do MIME Q encoding, they must work with bytes. Doing Q encoding with provided PHP extensions adds extra dependencies. ICU does not support HTML target. Text conversion to iso-8859-x or windows-125x targets will be lossy. > Can that be fixed to be BC without resorting to this toggle? Unicode and binary typecasting causes E_PARSE error in PHP 5.2.0 and older. PHP6 could introduce new Unicode aware functions, but Unicode implementation choose to modify existing ones. All low level string operations ($string[1]) are Unicode aware by default and not when script actually asks for it. Such implementation is designed for developers, who don't care about Unicode support and want it out of the box without any changes in their Unicode unaware scripts. It is not designed for developers that actually need it and want to have code working in PHP6 and PHP4/5. Unicode code points can be defined with \u, but PHP6 breaks existing octal and hex escape sequences. PHP6 is very noisy ("Notice: fwrite(): 13 character unicode buffer downcoded for binary stream runtime_encoding", "Warning: base64_encode() expects parameter 1 to be strictly a binary string, Unicode string given") about data stream and string operations. even when fwrite() or base64_encode() works only with plain ascii data. PHP script developers are not used to strict variable type checks in string functions. Which functions are modified to require binary typecasting? Do I have to make a list myself every time some function freaks out? -- Tomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php