[PHP-DEV] Re: par/phar/jar (was zend_stream_fixup)

2005-03-11 Thread Christian Schneider
L0t3k wrote: In about a month or so, i'll start work on an extension implementing a file format which allows for bundling all resources related to a app (including I'd very much recommend using an already existing file format, e.g. PEAR::PHP_Archive (uses tar) or something based on zip. The

Re: [PHP-DEV] XML Bug #32001

2005-03-11 Thread Marcus Boerger
Hello Moriyoshi, Friday, March 11, 2005, 4:44:19 AM, you wrote: On 2005/03/11, at 10:24, Marcus Boerger wrote: Hello moriyoshi or any other XMLer, please verify the --EXPECT-- data in test ext/xml/tests/bug32001.phpt i am quite sure there are several mistakes in it. Excuse me if I'm

Re: [PHP-DEV] XML Bug #32001

2005-03-11 Thread Rob Richards
The test works fine for me under linux. Only difference is on windows and there its to how windows performs php_strtoupper differently. If case folding is turned off under windows, the test passes. Rob Moriyoshi Koizumi wrote: On 2005/03/11, at 10:24, Marcus Boerger wrote: Hello moriyoshi or

Re: [PHP-DEV] XML Bug #32001

2005-03-11 Thread Moriyoshi Koizumi
On 2005/03/11, at 20:38, Rob Richards wrote: The test works fine for me under linux. Only difference is on windows and there its to how windows performs php_strtoupper differently. If case folding is turned off under windows, the test passes. It looks like the problem is due to the following

Re: [PHP-DEV] zend_stream_fixup

2005-03-11 Thread Stanislav Malyshev
WFhttp://viewcvs.php.net/viewcvs.cgi/php-src/main/main.c.diff?r1=1.526r2=1.527 And? What this is supposed to explain? My questions are still unanswered. I still do not see how converting FP to STREAm helps anything. This patch has nothing to do with that - it deals with php_stream that I have

[PHP-DEV] HALT Patch

2005-03-11 Thread Ilia Alshanetsky
The attach patch implements a special token ?php HALT; ? that can be used to stop the Zend lexical parser from parsing any data after this token. The idea behind this patch is to allow tucking on of any data (binary and otherwise) to the PHP script without having to encode it. It also saves

[PHP-DEV] Re: HALT Patch

2005-03-11 Thread Sara Golemon
The attach patch implements a special token ?php HALT; ? that can be used to stop the Zend lexical parser from parsing any data after this token. +1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread John Coggeshall
We've been talking about this on IRC for awhile now and I think it's a nice patch to minimize memory usage when you want to create these sorts of bundled PHP/data hybrid scripts. John On Fri, 2005-03-11 at 14:36, Ilia Alshanetsky wrote: The attach patch implements a special token ?php HALT; ?

Re: [PHP-DEV] zend_stream_fixup

2005-03-11 Thread Wez Furlong
The point is that you associate the approprite methods with the file handle at the time you set it to STREAM. --Wez. On Fri, 11 Mar 2005 21:18:37 +0200 (IST), Stanislav Malyshev [EMAIL PROTECTED] wrote: WFhttp://viewcvs.php.net/viewcvs.cgi/php-src/main/main.c.diff?r1=1.526r2=1.527 And? What

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Daniel Convissor
Hi Ilia: On Fri, Mar 11, 2005 at 02:36:16PM -0500, Ilia Alshanetsky wrote: The attach patch implements a special token ?php HALT; ? that can be used to stop the Zend lexical parser from parsing any data after this token. Would the data after that point be sent directly to STDOUT? Or would

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Ilia Alshanetsky
Would the data after that point be sent directly to STDOUT? Or would the present script somehow be able to use it? The data will not be parsed or output. When you need it you would make the script open itself and read the (binary) data dump from the end of the file and use it various creative

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Daniel Convissor
Hi Ilia: On Fri, Mar 11, 2005 at 04:27:53PM -0500, Ilia Alshanetsky wrote: The data will not be parsed or output. When you need it you would make the script open itself and read the (binary) data dump from the end of the file and use it various creative ways. Interesting. I'm wondering

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Ilia Alshanetsky
Daniel Convissor wrote: Interesting. I'm wondering about the security implications of this. This makes it very easy to use PHP as a means to propogate all sorts of nasty things. You can already use PHP to propagate all sorts of nasty things, nothing changes in this respect. Well, people

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Wez Furlong
If you name the token __HALT_PHP_PARSER__ instead (or something equally unlikely to be used by accident and unambiguous in meaning), you'll get a +1 from me :-) --Wez. On Fri, 11 Mar 2005 14:36:16 -0500, Ilia Alshanetsky [EMAIL PROTECTED] wrote: The attach patch implements a special token ?php

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread John Coggeshall
On Fri, 2005-03-11 at 16:37, Daniel Convissor wrote: Interesting. I'm wondering about the security implications of this. This makes it very easy to use PHP as a means to propogate all sorts of nasty things. Well, people could even do that today in one script by setting a variable to a

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Sara Golemon
1) while (fgets($fp) != '?php __HALT_PHP_PARSER__; ?')); Just a nudge about this code approach. #1 It doesn't detect EOF #2 It forgets about the newline returned by fgets() #3 It doesn't allow the HALT; to float within a line between other content (not that you'd do that anyway but...

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Daniel Convissor
On Fri, Mar 11, 2005 at 04:49:50PM -0500, John Coggeshall wrote: There is no issue here. You can throw binary data at the end of a PHP script as it is now: ?php /* stuff */ exit; ? binary data here True enough. Thanks, --Dan -- T H E A N A L Y S I S A N D S O L U T I

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Daniel Convissor
On Fri, Mar 11, 2005 at 04:43:21PM -0500, Ilia Alshanetsky wrote: Daniel Convissor wrote: Interesting. I'm wondering about the security implications of this. This makes it very easy to use PHP as a means to propogate all sorts of nasty things. You can already use PHP to propagate all sorts

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Ilia Alshanetsky
Sara Golemon wrote: Just a nudge about this code approach. #1 It doesn't detect EOF Well, if you encounter EOF before the HALT tag, it means as a developer of the script you are trying to break your own code ;-) #2 It forgets about the newline returned by fgets( True, I suppose strncmp could

[PHP-DEV] Re: par/phar/jar (was zend_stream_fixup)

2005-03-11 Thread cshmoove
Christian Schneider [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The advantage of a proven format and being able to use standard tools are priority #1 IMHO. manipulate them. The advantage over other formats is that the resources can be used in-place using a custom PHP stream

[PHP-DEV] mail() by SMTP on UNIX

2005-03-11 Thread Piotr Roszatycki
Hi. I was wondered why mail() function couldn't use SMTP subroutines. In shared hosting environment where can't be used sendmail binary it is an only way. I've attached my dirty hack. I hope someone would help me to clean up the patch. -- .''`.Piotr Roszatycki, Netia SA : :' :

Re: [PHP-DEV] HALT Patch

2005-03-11 Thread Moriyoshi Koizumi
Hi, I modified your patch so it can capture the position where the supposed data begins into the constant __HALT_PHP_PARSER__. There may be a problem with my patch if more than one require()'d / include()'d script contain __HALT_PHP_PARSER__, but it'd be quite handy if such an issue is resolved.