Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Rui Hirokawa


I think adding 'const' is good idea to clarify the code.
We should check the new code before release process of PHP 4.3.0.

Rui

On Fri, 02 Aug 2002 03:08:12 +0200
[EMAIL PROTECTED] (Marcus B¾­ŽÓrger) wrote:

> Spent some more work and now it works if the internal encoding is
> UTF-8. So maybe the work is worth a comit the next days after some
> further testing. And the question is with or without const modifiers?
> 


-- 
-
Rui Hirokawa <[EMAIL PROTECTED]>
 <[EMAIL PROTECTED]>

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Steph

is there any way I can use this stuff to change the way dir functions
work on doze?
(sorry C is very new to me & PHP source is mad ;)

- Original Message -
From: "Marcus Börger" <[EMAIL PROTECTED]>
To: "Rui Hirokawa" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 02, 2002 1:08 AM
Subject: Re: [PHP-DEV] Re: mbstring and html encode/const structs


Spent some more work and now it works if the internal encoding is
UTF-8. So maybe the work is worth a comit the next days after some
further testing. And the question is with or without const modifiers?

You can see what the patch does by looking at this example (UTF8):
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.php.txt
and the result
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.html.txt

€ ⟨ and ⟩ are both in script and get parameters
and all three are handled internally as utf-8 and all are converted
to their entity representations on output.

marcus

At 00:51 02.08.2002, Marcus Börger wrote:
>At 00:36 02.08.2002, Rui Hirokawa wrote:
>
>>Thanks,
>>It's cool!
>>
>>On Thu, 01 Aug 2002 20:29:12 +0200
>>[EMAIL PROTECTED] (Marcus B¾­ZÓrger) wrote:
>>
>> > I have spent some more work and now i can decode HTML upon input,
too.
>> >
>> > If you set (arg_separator.input = "|") and
(mbstring.internal_encoding =
>> > ISO-8859-15) in your ini file
>> > you can do something like this:
>> > testpage.php?var=Aä€
>> > and receive $_GET['VAR'] = 'A and both ä and € decoded.
>> > This will work for post, too. So you can upload html pages decode
them and
>> > do something with it.
>>
>>But, I couldn't found arg_separator.input = "|" related code on
>>your patch.
>>arg_separator.input = "|" hasn't any side effect ?
>
>
>I did not do anythink with it simply you cannot use ';' or '&' as
argument
>separators if
>you want do decode html entities upon input.
>
>
>> > If you use HTML as output encoding and do foreach($_GET as
$idx=>$val)
>> echo
>> > $idx=$val; you will
>> > see the original input again (as expected minus | if any).
>>
>>I think using HTML as a name of output encoding is a little bit
>>confusing because almost PHP scripts output is html.
>
>
>I took that name because that is what it does: it encodes/decodes *all*
>HTML 4.01 entities.
>
>>And it't not compatible with multibyte encoding
>>which is necessary to use output encoding conversion.
>
>
>As i said i just wrote the filters and currently do not understand why
i
>cannot use
>multibyte internal encodings like UCS2 or UTF8. I had the idea that i
>simply had to
>implement html_wchar and wchar_html and then everything is fine. But i
>cannot handle
>those characters > 127still have to invent some more work...
>
>
>AND what do you think about the const modifiers? They helped my little
bit
>during
>first modifications and make the code somethink 'safer'.
>
>
>marcus
>
>
>> >
>> > But again i have problems if internal encoding is Multibate
encoding. I
>> > have to send some
>> > search on internal handling
>> >
>> > Anyone interested may download the patch:
>> >
http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>> > And the additional file holding the translation table:
>> > http://marcus-boerger.de/php/ext/mbstring/html_entities.c
>> >
>> > marcus
>> >
>> > At 04:11 01.08.2002, Yasuo Ohgaki wrote:
>> > >Interesting.
>> > >
>> > >Marcus Boerger wrote:
>> > >>Anyone interested may download the patch:
>> >
>>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patc
h
>> > >>And the additional file holding translation the table:
>> > >>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
>> > >
>> > >but I cannot access to your web site
>> > >
>> > >
>> > >--
>> > >Yasuo Ohgaki
>> > >
>> > >
>> > >--
>> > >PHP Development Mailing List 
>> > >To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>--
>>-
>>Rui Hirokawa <[EMAIL PROTECTED]>
>>  <[EMAIL PROTECTED]>
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Marcus Börger

Spent some more work and now it works if the internal encoding is
UTF-8. So maybe the work is worth a comit the next days after some
further testing. And the question is with or without const modifiers?

You can see what the patch does by looking at this example (UTF8):
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.php.txt
and the result
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.html.txt

€ ⟨ and ⟩ are both in script and get parameters
and all three are handled internally as utf-8 and all are converted
to their entity representations on output.

marcus

At 00:51 02.08.2002, Marcus Börger wrote:
>At 00:36 02.08.2002, Rui Hirokawa wrote:
>
>>Thanks,
>>It's cool!
>>
>>On Thu, 01 Aug 2002 20:29:12 +0200
>>[EMAIL PROTECTED] (Marcus B¾­ŽÓrger) wrote:
>>
>> > I have spent some more work and now i can decode HTML upon input, too.
>> >
>> > If you set (arg_separator.input = "|") and (mbstring.internal_encoding =
>> > ISO-8859-15) in your ini file
>> > you can do something like this:
>> > testpage.php?var=Aä€
>> > and receive $_GET['VAR'] = 'A and both ä and € decoded.
>> > This will work for post, too. So you can upload html pages decode them and
>> > do something with it.
>>
>>But, I couldn't found arg_separator.input = "|" related code on
>>your patch.
>>arg_separator.input = "|" hasn't any side effect ?
>
>
>I did not do anythink with it simply you cannot use ';' or '&' as argument 
>separators if
>you want do decode html entities upon input.
>
>
>> > If you use HTML as output encoding and do foreach($_GET as $idx=>$val) 
>> echo
>> > $idx=$val; you will
>> > see the original input again (as expected minus | if any).
>>
>>I think using HTML as a name of output encoding is a little bit
>>confusing because almost PHP scripts output is html.
>
>
>I took that name because that is what it does: it encodes/decodes *all* 
>HTML 4.01 entities.
>
>>And it't not compatible with multibyte encoding
>>which is necessary to use output encoding conversion.
>
>
>As i said i just wrote the filters and currently do not understand why i 
>cannot use
>multibyte internal encodings like UCS2 or UTF8. I had the idea that i 
>simply had to
>implement html_wchar and wchar_html and then everything is fine. But i 
>cannot handle
>those characters > 127still have to invent some more work...
>
>
>AND what do you think about the const modifiers? They helped my little bit 
>during
>first modifications and make the code somethink 'safer'.
>
>
>marcus
>
>
>> >
>> > But again i have problems if internal encoding is Multibate encoding. I
>> > have to send some
>> > search on internal handling
>> >
>> > Anyone interested may download the patch:
>> > http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>> > And the additional file holding the translation table:
>> > http://marcus-boerger.de/php/ext/mbstring/html_entities.c
>> >
>> > marcus
>> >
>> > At 04:11 01.08.2002, Yasuo Ohgaki wrote:
>> > >Interesting.
>> > >
>> > >Marcus Boerger wrote:
>> > >>Anyone interested may download the patch:
>> > >>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>> > >>And the additional file holding translation the table:
>> > >>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
>> > >
>> > >but I cannot access to your web site
>> > >
>> > >
>> > >--
>> > >Yasuo Ohgaki
>> > >
>> > >
>> > >--
>> > >PHP Development Mailing List 
>> > >To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>--
>>-
>>Rui Hirokawa <[EMAIL PROTECTED]>
>>  <[EMAIL PROTECTED]>
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] array commits broke something

2002-08-01 Thread Jan Schneider

Zitat von Brad LaFountain <[EMAIL PROTECTED]>:

> Sorry.. i miss read your comment... you are correct
> 
> I just fixed it commiting in a few min.

Yes, everything works as expected now. Thanks!

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Marcus Börger

At 00:36 02.08.2002, Rui Hirokawa wrote:

>Thanks,
>It's cool!
>
>On Thu, 01 Aug 2002 20:29:12 +0200
>[EMAIL PROTECTED] (Marcus B¾­ŽÓrger) wrote:
>
> > I have spent some more work and now i can decode HTML upon input, too.
> >
> > If you set (arg_separator.input = "|") and (mbstring.internal_encoding =
> > ISO-8859-15) in your ini file
> > you can do something like this:
> > testpage.php?var=Aä€
> > and receive $_GET['VAR'] = 'A and both ä and € decoded.
> > This will work for post, too. So you can upload html pages decode them and
> > do something with it.
>
>But, I couldn't found arg_separator.input = "|" related code on
>your patch.
>arg_separator.input = "|" hasn't any side effect ?


I did not do anythink with it simply you cannot use ';' or '&' as argument 
separators if
you want do decode html entities upon input.


> > If you use HTML as output encoding and do foreach($_GET as $idx=>$val) 
> echo
> > $idx=$val; you will
> > see the original input again (as expected minus | if any).
>
>I think using HTML as a name of output encoding is a little bit
>confusing because almost PHP scripts output is html.


I took that name because that is what it does: it encodes/decodes *all* 
HTML 4.01 entities.

>And it't not compatible with multibyte encoding
>which is necessary to use output encoding conversion.


As i said i just wrote the filters and currently do not understand why i 
cannot use
multibyte internal encodings like UCS2 or UTF8. I had the idea that i 
simply had to
implement html_wchar and wchar_html and then everything is fine. But i 
cannot handle
those characters > 127still have to invent some more work...


AND what do you think about the const modifiers? They helped my little bit 
during
first modifications and make the code somethink 'safer'.


marcus


> >
> > But again i have problems if internal encoding is Multibate encoding. I
> > have to send some
> > search on internal handling
> >
> > Anyone interested may download the patch:
> > http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
> > And the additional file holding the translation table:
> > http://marcus-boerger.de/php/ext/mbstring/html_entities.c
> >
> > marcus
> >
> > At 04:11 01.08.2002, Yasuo Ohgaki wrote:
> > >Interesting.
> > >
> > >Marcus Boerger wrote:
> > >>Anyone interested may download the patch:
> > >>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patch
> > >>And the additional file holding translation the table:
> > >>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
> > >
> > >but I cannot access to your web site
> > >
> > >
> > >--
> > >Yasuo Ohgaki
> > >
> > >
> > >--
> > >PHP Development Mailing List 
> > >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>-
>Rui Hirokawa <[EMAIL PROTECTED]>
>  <[EMAIL PROTECTED]>


--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Rui Hirokawa

Thanks,
It's cool!

On Thu, 01 Aug 2002 20:29:12 +0200
[EMAIL PROTECTED] (Marcus B¾­ŽÓrger) wrote:

> I have spent some more work and now i can decode HTML upon input, too.
> 
> If you set (arg_separator.input = "|") and (mbstring.internal_encoding = 
> ISO-8859-15) in your ini file
> you can do something like this:
> testpage.php?var=Aä€
> and receive $_GET['VAR'] = 'A and both ä and € decoded.
> This will work for post, too. So you can upload html pages decode them and 
> do something with it.

But, I couldn't found arg_separator.input = "|" related code on 
your patch.
arg_separator.input = "|" hasn't any side effect ?

> If you use HTML as output encoding and do foreach($_GET as $idx=>$val) echo 
> $idx=$val; you will
> see the original input again (as expected minus | if any).

I think using HTML as a name of output encoding is a little bit 
confusing because almost PHP scripts output is html.
And it't not compatible with multibyte encoding 
which is necessary to use output encoding conversion.

> 
> But again i have problems if internal encoding is Multibate encoding. I 
> have to send some
> search on internal handling
> 
> Anyone interested may download the patch: 
> http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
> And the additional file holding the translation table: 
> http://marcus-boerger.de/php/ext/mbstring/html_entities.c
> 
> marcus
> 
> At 04:11 01.08.2002, Yasuo Ohgaki wrote:
> >Interesting.
> >
> >Marcus Boerger wrote:
> >>Anyone interested may download the patch: 
> >>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patch
> >>And the additional file holding translation the table: 
> >>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
> >
> >but I cannot access to your web site
> >
> >
> >--
> >Yasuo Ohgaki
> >
> >
> >--
> >PHP Development Mailing List 
> >To unsubscribe, visit: http://www.php.net/unsub.php


-- 
-
Rui Hirokawa <[EMAIL PROTECTED]>
 <[EMAIL PROTECTED]>

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Re: solaris8 + php4.2.2 = memory corruption?

2002-08-01 Thread Dan Kalowsky

I do not get the Bus Error (this was fixed last night by Zeev).  And if
you correct the $id bug in this script, it works just fine ... at least on
OSX.

This is from CVS HEAD.

On Thu, 1 Aug 2002, Sulka Haro wrote:

>
> On Mac OS X, php 4.2.1 terminates without output with the given example.
>
> Running a copy of PHP 4.3.0 CLI I updated/compiled from CVS today,
> the output is "97Bus error".
>
> Anyone with enough info to say what's similar to both Solaris and OS X?
>
> sulka
>
> At 19:58 +0300 1.8.2002, Anti Veeranna wrote:
> >I finally tracked this down and it turned out to be a bug
> >in the code. I also was mistaken when I said that the
> >code works in 4.1.2/Solaris. It didn't.
> >
> >To make a long story short:
> >
> > >$foo = array(
> > "97" => "97",
> >);
> >$str = "";
> >foreach($foo as $id => $id)
> >//  ^^
> >{
> > $str .= $foo[$id];
> >};
> >print $str;
> >?>
> >
> >
>
>
>

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] segfault in recent code

2002-08-01 Thread Stefan Roehrich

On 2002-08-01 02:28:26, Rasmus Lerdorf wrote:
> That fixed part of it, there is still another segfault in there somewhere.

Maybe it has to do with the silly strncasecmp error I made (and just
committed a fix to SAPI.c), but I don't know how this would cause a
segfault.

  Stefan

-- 
Stefan Röhrich   [EMAIL PROTECTED], [EMAIL PROTECTED]
 http://www.roehri.ch/~sr/

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: solaris8 + php4.2.2 = memory corruption?

2002-08-01 Thread Sulka Haro


On Mac OS X, php 4.2.1 terminates without output with the given example.

Running a copy of PHP 4.3.0 CLI I updated/compiled from CVS today, 
the output is "97Bus error".

Anyone with enough info to say what's similar to both Solaris and OS X?

sulka

At 19:58 +0300 1.8.2002, Anti Veeranna wrote:
>I finally tracked this down and it turned out to be a bug
>in the code. I also was mistaken when I said that the
>code works in 4.1.2/Solaris. It didn't.
>
>To make a long story short:
>
>$foo = array(
> "97" => "97",
>);
>$str = "";
>foreach($foo as $id => $id)
>//  ^^
>{
> $str .= $foo[$id];
>};
>print $str;
>?>
>
>


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] [php-objects] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup& Texas PHP Users

2002-08-01 Thread Martin Clifford

I'm definately interested, even though I'll most likely be in MN at the time.  I've 
never even MET another PHP developer, so I don't know what to expect, but I'd sure 
love to be updated :o)

Martin

>>> [EMAIL PROTECTED] 08/01/02 03:21PM >>>
Well, the predictions have come true. In San Antonio only four folks signed
up for the meetup, and the event was cancelled with no way to get in touch
with the other local developers to make a go of it. Out of the 147 cities
listed only 15 had enough people for meetup.com to do their thing. A noble
idea, but ...

I want to encourage developers to farm PHP developer groups in their own
communities. Some may find that their community already has a users group (a
list is available at http://www.phpusergroups.org) although some of these
groups are not really groups at all, just people looking to form groups.

If you live in the San Antonio area I would be glad to be the
chief-wrangler-whats-in-charge for just such a group. Please contact me
directly. I am also working on a Texas PHP Developer Conference at the
beautiful T Bar M Resort & Conference Center in New Braunfels, Texas
sometime between January and April of 2003. I have begun contacting
potential speakers and hope to have people who wish to present papers at the
conference as well as do some other fun activities such as a high or low
ropes course, golf, tennis, etc. All suggestions and admonitions are
welcome. Everyone in Texas is invited to contact me so that I can dispurse
further information. Also, my contact at T Bar M says, "The more, the
cheaper ... " as discounts for larger groups are available. Heck, even if
you don't live in Texas but would be interested in attending drop me a line
and I'll keep you up to date.

Thanks!

Jay

It's as bad as you think, and they are out to get you.

***
* *
* Texas PHP Developers Meeting*
* Spring 2003 *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* Interested? Contact;*
* [EMAIL PROTECTED] *
* *
***



Look here for Free PHP Classes of objects:
http://phpclasses.UpperDesign.com/ 
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] 

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] [Patch] mhash

2002-08-01 Thread Peter Neuman

Hello,

This Patch adds mhash phpinfo function
And the Zend modifies modules struct like it in that
README.EXTENSIONS is.
I tested it and go it

Patch is Added as Attachment

Thanks
Peter Neuman


Index: mhash.c
===
RCS file: /repository/other/mhash.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 mhash.c
--- mhash.c 1 Aug 2002 16:56:33 -   1.1.1.1
+++ mhash.c 1 Aug 2002 19:07:30 -
@@ -44,19 +44,33 @@
 static PHP_MINIT_FUNCTION(mhash);
 
 zend_module_entry mhash_module_entry = {
-   STANDARD_MODULE_HEADER,
-   "mhash",
-   mhash_functions,
-   PHP_MINIT(mhash), NULL,
-   NULL, NULL,
-   NULL,
+#if ZEND_MODULE_API_NO >= 20010901
+STANDARD_MODULE_HEADER,
+#endif
+"mhash",
+mhash_functions,
+NULL,
+NULL,
+NULL,
+NULL,
+PHP_MINFO(mhash),
+#if ZEND_MODULE_API_NO >= 20010901
 NO_VERSION_YET,
-   STANDARD_MODULE_PROPERTIES,
+#endif
+STANDARD_MODULE_PROPERTIES
 };
 
 #ifdef COMPILE_DL_MHASH
 ZEND_GET_MODULE(mhash)
 #endif
+
+PHP_MINFO_FUNCTION(mhash)
+{
+php_info_print_table_start();
+php_info_print_table_row(2, "mhash Support", "enabled");
+php_info_print_table_end();
+}
+
 #define MHASH_FAILED_MSG "mhash initialization failed"
 #define MHASH_KEYGEN_FAILED_MSG "mhash key generation failed"
 static PHP_MINIT_FUNCTION(mhash)
Index: php_mhash.h
===
RCS file: /repository/other/php_mhash.h,v
retrieving revision 1.1
diff -u -r1.1 php_mhash.h
--- php_mhash.h 1 Aug 2002 17:39:26 -   1.1
+++ php_mhash.h 1 Aug 2002 17:40:47 -
@@ -12,6 +12,7 @@
 extern zend_module_entry mhash_module_entry;
 #define mhash_module_ptr &mhash_module_entry
 
+PHP_MINFO_FUNCTION(mhash);
 PHP_FUNCTION(mhash_get_block_size);
 PHP_FUNCTION(mhash_get_hash_name);
 PHP_FUNCTION(mhash_count);



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] RE: [PHP] Re: [PHP-DEV] [CROSS POST] PHP Meetup & Texas PHP Users

2002-08-01 Thread Jay Blanchard

Well, the predictions have come true. In San Antonio only four folks signed
up for the meetup, and the event was cancelled with no way to get in touch
with the other local developers to make a go of it. Out of the 147 cities
listed only 15 had enough people for meetup.com to do their thing. A noble
idea, but ...

I want to encourage developers to farm PHP developer groups in their own
communities. Some may find that their community already has a users group (a
list is available at http://www.phpusergroups.org) although some of these
groups are not really groups at all, just people looking to form groups.

If you live in the San Antonio area I would be glad to be the
chief-wrangler-whats-in-charge for just such a group. Please contact me
directly. I am also working on a Texas PHP Developer Conference at the
beautiful T Bar M Resort & Conference Center in New Braunfels, Texas
sometime between January and April of 2003. I have begun contacting
potential speakers and hope to have people who wish to present papers at the
conference as well as do some other fun activities such as a high or low
ropes course, golf, tennis, etc. All suggestions and admonitions are
welcome. Everyone in Texas is invited to contact me so that I can dispurse
further information. Also, my contact at T Bar M says, "The more, the
cheaper ... " as discounts for larger groups are available. Heck, even if
you don't live in Texas but would be interested in attending drop me a line
and I'll keep you up to date.

Thanks!

Jay

It’s as bad as you think, and they are out to get you.

***
* *
* Texas PHP Developers Meeting*
* Spring 2003 *
* T Bar M Resort & Conference Center  *
* New Braunfels, Texas*
* Interested? Contact;*
* [EMAIL PROTECTED] *
* *
***



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Marcus Börger

I have spent some more work and now i can decode HTML upon input, too.

If you set (arg_separator.input = "|") and (mbstring.internal_encoding = 
ISO-8859-15) in your ini file
you can do something like this:
testpage.php?var=Aä€
and receive $_GET['VAR'] = 'A and both ä and € decoded.
This will work for post, too. So you can upload html pages decode them and 
do something with it.
If you use HTML as output encoding and do foreach($_GET as $idx=>$val) echo 
$idx=$val; you will
see the original input again (as expected minus | if any).

But again i have problems if internal encoding is Multibate encoding. I 
have to send some
search on internal handling

Anyone interested may download the patch: 
http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
And the additional file holding the translation table: 
http://marcus-boerger.de/php/ext/mbstring/html_entities.c

marcus

At 04:11 01.08.2002, Yasuo Ohgaki wrote:
>Interesting.
>
>Marcus Boerger wrote:
>>Anyone interested may download the patch: 
>>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>>And the additional file holding translation the table: 
>>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
>
>but I cannot access to your web site
>
>
>--
>Yasuo Ohgaki
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Addition to the openssl ext

2002-08-01 Thread Wez Furlong

Sure!

Just post it here (diff against CVS HEAD version) and Cc: to me directly.
If it's a complete patch I'll apply it as soon as I see it.

--Wez.


On 07/31/02, "Thomas Langås" <[EMAIL PROTECTED]> wrote:
> > Could you log your patch as a feature request using bugs.php.net so
> > that I can find it when I get around to implementing this?
> 
> I might make a patch that implements what you suggests over, if
> that's ok with you? 



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] HANDLE_BLOCK_INTERRUPTIONS

2002-08-01 Thread Brad LaFountain

HANDLE_BLOCK_INTERRUPTIONS();
HANDLE_UNBLOCK_INTERRUPTIONS();

what exactly does these do?

 - brad

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] array commits broke something

2002-08-01 Thread Brad LaFountain

Sorry.. i miss read your comment... you are correct

I just fixed it commiting in a few min.

 - brad
--- Brad LaFountain <[EMAIL PROTECTED]> wrote:
> That was my fault. I did apply a patch that will fix that late
> last nite.
> 
> Just get the current CVS and it should work.
> 
> PS. array_pop/array_shift is tuns faster now :)
> 
>  - brad
> --- Jani Taskinen <[EMAIL PROTECTED]> wrote:
> > 
> > Have you updated to the very latest? I'm unable to reproduce this..
> > Can you give some simple example script? (maybe I understood you
> wrong..)
> > 
> > --Jani
> > 
> > 
> > 
> > 
> > -- 
> > 
> > On Thu, 1 Aug 2002, Jan Schneider wrote:
> > 
> > >Hi,
> > >
> > >the recent changes in the array code broke something. array_pop() doesn't
> > >decrease the key counter.
> > >Let's say your have an array('one', 'two', 'three') and run array_pop() on
> > >it, then push another value so that you now have array('one', 'two',
> 'four')
> > >the key of the last value will be 3, not 2 as it should be.
> > >
> > >Jan.
> > >
> > >--
> > >http://www.horde.org - The Horde Project
> > >http://www.ammma.de - discover your knowledge
> > >http://www.tip4all.de - Deine private Tippgemeinschaft
> > >
> > >
> > 
> > 
> > -- 
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: solaris8 + php4.2.2 = memory corruption?

2002-08-01 Thread Anti Veeranna

I finally tracked this down and it turned out to be a bug
in the code. I also was mistaken when I said that the 
code works in 4.1.2/Solaris. It didn't. 

To make a long story short:

 "97",
);
$str = "";
foreach($foo as $id => $id)
//  ^^
{
$str .= $foo[$id];
};
print $str;
?>

That foreach clause caused all sorts of weirdness
in my code - random variables were overwritten and
the script terminated without any output (nothing
in apache error_log either). 

The above code is a minimized testcase I managed
to create, which behaves exactly the same way - 
the script terminates without any output if it's
run on Solaris (both php4.1.2 and php4.2.2).

I was not able to compile php4.3 snapshot, so I don't
know whether that problem is still there. 
 
Remember, this is on Sparc/Solaris8.  The above testcase
works correctly in Linux and FreeBSD.

That foreach is pointless of course, I changed
it to foreach($foo as $id) and now it works on 
all 3 platforms.

If someone wants to try to find the real cause for
the problem (because as far as I can tell, it's still
a bug in PHP) and needs any additional information
about the server and/or it's configuration then please
let me know. I'll happily provide it.

-- 
Anti Veeranna









-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] array commits broke something

2002-08-01 Thread Brad LaFountain

That was my fault. I did apply a patch that will fix that late
last nite.

Just get the current CVS and it should work.

PS. array_pop/array_shift is tuns faster now :)

 - brad
--- Jani Taskinen <[EMAIL PROTECTED]> wrote:
> 
> Have you updated to the very latest? I'm unable to reproduce this..
> Can you give some simple example script? (maybe I understood you wrong..)
> 
> --Jani
> 
> 
> 
> 
> -- 
> 
> On Thu, 1 Aug 2002, Jan Schneider wrote:
> 
> >Hi,
> >
> >the recent changes in the array code broke something. array_pop() doesn't
> >decrease the key counter.
> >Let's say your have an array('one', 'two', 'three') and run array_pop() on
> >it, then push another value so that you now have array('one', 'two', 'four')
> >the key of the last value will be 3, not 2 as it should be.
> >
> >Jan.
> >
> >--
> >http://www.horde.org - The Horde Project
> >http://www.ammma.de - discover your knowledge
> >http://www.tip4all.de - Deine private Tippgemeinschaft
> >
> >
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] array commits broke something

2002-08-01 Thread Jani Taskinen


Have you updated to the very latest? I'm unable to reproduce this..
Can you give some simple example script? (maybe I understood you wrong..)

--Jani




-- 

On Thu, 1 Aug 2002, Jan Schneider wrote:

>Hi,
>
>the recent changes in the array code broke something. array_pop() doesn't
>decrease the key counter.
>Let's say your have an array('one', 'two', 'three') and run array_pop() on
>it, then push another value so that you now have array('one', 'two', 'four')
>the key of the last value will be 3, not 2 as it should be.
>
>Jan.
>
>--
>http://www.horde.org - The Horde Project
>http://www.ammma.de - discover your knowledge
>http://www.tip4all.de - Deine private Tippgemeinschaft
>
>


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] array commits broke something

2002-08-01 Thread Jan Schneider

Hi,

the recent changes in the array code broke something. array_pop() doesn't
decrease the key counter.
Let's say your have an array('one', 'two', 'three') and run array_pop() on
it, then push another value so that you now have array('one', 'two', 'four')
the key of the last value will be 3, not 2 as it should be.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] HEADS up: SSH warnings on pair1/pair2.php.net

2002-08-01 Thread Sascha Schumann

The recently upgraded ssh on these boxes sends a DSA host key
instead of the RSA version.  Because the DSA one is unknown,
ssh will alert you about a change of the remote host
identification.  You can safely ignore this warning and
remove the old entry from your known_hosts2 file (or whatever
is appropiate for your client).

The fingerprint for the DSA key sent by the remote host is
27:8f:3a:76:03:02:06:6e:32:6a:e4:4c:f6:c9:1b:f3.

- Sascha


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: [PHP-QA] Congratulations.

2002-08-01 Thread Wez Furlong

On 08/01/02, "Stig S. Bakken" <[EMAIL PROTECTED]> wrote:
> On Thu, 1 Aug 2002, Daniel Lorch wrote:
> > No offense, but I think other developers should be mentioned as well. I
> > very much like wez' work on innovative ideas - even though his results
> > might not be suitable for the masses (such as having PHP client-sided
> > embedded into redmond's browser etc.).

Daniel: Thanks for the vote of confidence!

> I think Derick and Jani
> deserved that award with good margin, because the type of work they do
> often has limited reward compared to the amount of energy they put into
> it.

Derick and Jani seem to be by far the most active PHP developers, so much
so that I have often thought of them.  It's a shame that I don't have
enough time to put into PHP so that they don't have to work quite so
hard!

Err, do they actually get anything tangible with this award?
Like a plaque, statue, software or cash??

--Wez.


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Implementing Threading: Some Hints (Was Re: [PHP-DEV]phpthreads - hints anyone...)

2002-08-01 Thread Jason T. Greene


> To make threading useful, you would need to somehow arrange for multiple
> threads to access the same underlying zval data without blocking all
> the threads.  This just isn't possible AFAIK.

Yes, this is definitely not possible without greatly modifying the
engine's zval management (which would introduce tons of locks which
would kill performance)


> If you want fast read-only access to "shared" zvals, you can serialize
> (just like sessions) the zval from the main thread and unserialize it
> into your new thread.  This isn't strictly read-only, although writes
> will only be visible to the new thread.  The advantage is that since
> the zval lives in the threads own engine/address-space, no
> thread-serialization occurs so performance is "better".

Automatically serializing is a good idea, though I think the performance
loss would out way the benefits.

IMO, the main difficulty is having the language automatically handle
reads and writes to any value in any thread. The functionality gained
from this automation is minimal. If the programmer is required to use a
single structure to share data between threads, then it forces them to
really think about the IPC between threads. Plus, we get the added
benefit of being able to optimize that bridge for the best possible
performance.

IMO an overloaded object that abstracted a special shared memory
structure with read/write locking per member is the way to go.

Simple scalar values could be implemented as direct copying, and complex
structures (arrays, objects) could use serialization.

-Jason


> 
> --Wez.
> 
> 
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] RE: looking for GMP extension for windows

2002-08-01 Thread phpsurf

do you know why this extension is not bundled with the php distribution ?

> -Original Message-
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]]
> Sent: jeudi 1 aout 2002 16:28
> To: [EMAIL PROTECTED]
> Subject: Re: looking for GMP extension for windows
> 
> 
> Hi,
> 
> There is no version released for the version of PHP. The version 
> on my site is build with the latest cvs version of PHP.
> 
> - Frank
> 
> > Hi
> > 
> > I'm looking for the GMP extension for windows (PHP4.2.2)
> > Do you know where I could find that ?
> > 
> > thanks for your help
> > 
> > 
> > 
> __
> 
> > ifrance.com, l'email gratuit le plus complet de l'Internet !
> > vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> > http://www.ifrance.com/_reloc/email.emailif
> > 
> > 
> > 
> 
> 
> 
 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Implementing Threading: Some Hints (Was Re: [PHP-DEV] phpthreads - hints anyone...)

2002-08-01 Thread Wez Furlong

Hi Alan,

I've missed the start of this thread on threads because our
internet connection was physically down for a couple of days,
but hopefully what I've said here is useful to you.
It started as a couple of comments but then grew a bit long...

You might find some of the code in the activescript sapi useful;
it's in CVS and only builds for Windows, but might give you a couple
of hints.  It doesn't implement threading (directly), but does
have some code that helps you to see what is required.

Each thread must have it's own copy of the engine.
This is a "hard" requirement of the PHP/TSRM architecture.

Communication between threads needs some kind of synchronization
mechanism.  Zvals need to be proxied so that access is serialized.
ActiveScript does this by exporting the zvals as IDispatch-able
COM objects and lets windows manage serialization via it's message
queues.

For other platforms you would need to implement some way to "pre-empt"
a thread so that it can access a zval and return the data.
You could implement this using ticks, or other similar mechanism -
perhaps as a Zend extension.

Proxying the zvals means the a given zval can only be accessed in
the context of the thread that created it - not 100% useful for
threading, but this is a "limitation" (feature?) of the memory
management system - memory is managed per-thread, so write accesses
(including changing a refcount) may trigger allocations/deallocations.
If that happens on the wrong thread, you get inconsistent hash tables
and most probably segfaults in BOTH threads.

Likewise, the zend functions and classes structures are managed in
a similar way. You must make your own copy of those for each thread
in case that thread includes/requires other scripts, or creates new
functions/classes dynamically using eval or similar.

To make threading useful, you would need to somehow arrange for multiple
threads to access the same underlying zval data without blocking all
the threads.  This just isn't possible AFAIK.

If you want fast read-only access to "shared" zvals, you can serialize
(just like sessions) the zval from the main thread and unserialize it
into your new thread.  This isn't strictly read-only, although writes
will only be visible to the new thread.  The advantage is that since
the zval lives in the threads own engine/address-space, no
thread-serialization occurs so performance is "better".


As a summary of the above, threading would work something like below:

  Given a zval, allocates a struct that identifies the zval
  as belonging to this thread and assigns it an id (much like the resource
  management system, but using global malloc()d memory).
  The id can be passed to other threads (much like session serialization)
  and used to construct a proxy (or just return the actual zval if it's
  on the same thread as the zval).

proxy_data proxyize(zval * zval);


  Given a proxy id: if the zval is on the same thread as the current
  caller, return the zval from the proxy data.  Otherwise, look in
  the list of "running" proxies for this thread; if we already have
  a proxy for this zval, return it.  Otherwise we have not yet accessed
  the zval from this thread.  Create an overloaded object that will
  use the thread synchronization methods to access the zval in it's
  owners thread.

zval * proxy_to_zval(proxy_data data);


  Returns a php script representing all the functions and classes
  defined in the current engine context.  This would be generated
  by examining the zend structures.  It has to be serialized like
  this since the zend structures are emalloc-ed.
  Ideally, this would return a malloc-ed copy of the structures that
  would then be emalloc-ed into the address space of the new thread.
  As a first attempt, it might be simpler just to convert to a
  string and ask the new engine to recompile it.

char * serialize_functions_and_classes();


struct thread_create_info {
  char * functions;
  int globals_count;
  char ** globals_keys
  proxy_data ** globals_values;
  char * threadfunc;
}

// proto resource thread_create(string threadfunc);
PHP_FUNCTION(thread_create)
{
   thread_create_info * info = malloc(sizeof(thread_create_info));

   info->functions = serialize_functions_and_classes();
   info->threadfunc = strdup(threadfunc);

   // could do similar thing for passing params to the thread func
   info->globals_count = count($GLOBALS);
   for (i = 0; i < info->globals_count; i++) {
  info->globals_keys[i] = strdup(key($GLOBALS));
  info->globals_values[i] = proxyize(current($GLOBALS));
  next($GLOBALS);
   }

   // use your platform-specific function here
   pthread_create(phpthreads_threadfunc, info);

   // return some kind of token for that thread
}

phpthreads_threadfunc(thread_create_info * info)
{
   zval ** args;

   /* create a new zend engine instance */
   ...

   /* load in functions (and classes) */
   compile_string(info->functions);
   free(info->functions);

   /* import global data */
   // co

Re: [PHP-DEV] phpthreads - hints anyone...

2002-08-01 Thread Jason T. Greene

On Thu, 2002-08-01 at 04:43, Alan Knowles wrote:
> >
> > It's not about looking at the perl code, that will tell you nothing 
> > unless you know perl internals.  It's about the way the interpreter 
> > works, some of the architecture, that is simular to PHP.  In PHP, 
> > threads are isolated, kind of like seperate processes, but in threads.
> 
> 
>  From my understanding they are 'forced to be isolated' by the TSRM 
> stuff.  which looks like it stores globals in something like an 
> associated array ( thread id => global c variable - eg. compiler_globals 
> etc.), when ZTS is enabled..
> 
> > Everything in PHP works that way, so in creating threads for php 
> > scripts, you have to have a seperate interpreter.  Then you have to 
> > create a "bridge" between the threads for shared variables.  shmop 
> > comes close to what is needed, but not close enough.
> 
> the real use of the threading I guess is for people who want to write 
> tcp servers, or desktop gtk apps.
> 
> Thoughts on accessing 'threaded shared vars'
> 
> $_THREADVAR['gtktext'] type..
> 
> php_threads_malloc_lock();
> $_THREADVAR['gtktext']->add_text('some data ouput');
> php_threads_malloc_unlock();
> 
> this would I guess involve rather heavy changes to the ZE engine to 
> recogize an lock/unlock, copy (rather than refcount) etc. variables that 
> where threaded..
> 
> 
> Threaded objects???

Yes, if you created an overloaded object that handled the sharing of
data there would be no need to modify the engine. Instead of using
methods, you could also use property offsets.

Since an overloaded object is given both read and write hooks, you 
can improve performance by having both shared(read) and exclusive(write)
locks. These locks could even be on a per property basis.


> I guess the other consideration is to have thread variable objects..
> $threadvar  = new Thread_Var();
> $threadvar->setNewObject('mywidget','GtkWindow');
> $threadvar->set('mywidget',$gtkobject);
> $var = $threadvar->get('mywidget');
> $var = $threadvar->getArray('key','val');
> $threadvar->callMethod('mywidget', 'add_text','something');
> 
> obviously copying and accessing these would probably be easier to cope 
> with ( without having to modify heavily the zend engine) -  we could do 
> 'real' copying on the data, rather than refcounting them. and reduce the 
> headaches...
> 
> > You're much closer to what needs to happen now.  But you cannot simply 
> > point to the memory for another thread.  Doing that will cause 
> > problems like you are running into.  You actually have to copy a bunch 
> > of stuff so each thread is completely independent.
> 
> Do you mean we will have to really physically copy the all theopcode 
> data from one thread to another?

Yes, since there are multiple interpreters, they must be synchronized.
(This way they are all allowed to access the POST GET SERVER vars) 


-Jason



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] phpthreads - hints anyone...

2002-08-01 Thread Jason T. Greene

On Thu, 2002-08-01 at 08:04, [EMAIL PROTECTED] wrote:
> On 31 Jul 2002, Jason T. Greene wrote:
> 
> > Instead of mutexing the entire interpreter to death, why don't you try
> > creating multiple interpreters (each in a thread), and then come up with
> > a sharing mechanism.
> 
> Sounds like duplication some other thing :)
> 
> Derick

parse error on line 1 : )
huh?


-Jason
> 
> > On Wed, 2002-07-31 at 03:57, Alan Knowles wrote:
> > > Im looking at adding threading to php, (for the cgi/cli stuff)..
> > > 
> > > The story so far:
> > > 
> > > I've created an extension which diverts all zend_execute calls into the 
> > > extension -> phpthreads_execute.
> > > this function is a copy of zend_execute with a few modifications
> > > - to copy & restore things like  EG(active_symbol_table);
> > > - to malloc lock and unlock the execute loop and release on each opcode.
> > > 
> > > I've started testing the phpthreads_create($callback); - it appears to 
> > > work ok, execept it segfaults on completion.. - trying to reduce 
> > > refcounts somewhere.
> > > 
> > > The fireup code looks something like this..
> > > 
> > > void phpthreads_create(void *ptr) {
> > > zval myretval;
> > > zval *callback = (zval *) ptr;
> > >   
> > > if (!call_user_function( EG(function_table), NULL, callback, 
> > > &myretval, 0, NULL TSRMLS_CC ))  {
> > > zend_error(E_ERROR, "Problem Starting thread with 
> > > callback");
> > > }
> > >
> > > pthread_exit(NULL);
> > >
> > >
> > > }
> > > /* {{{ proto string phpthreads_thread(string function)
> > >Return a string to confirm that the module is compiled in */
> > > PHP_FUNCTION(phpthreads_create)
> > > {
> > >  
> > > zval *callback;
> > > pthread_t thread;
> > >
> > >   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", 
> > > &callback) == FAILURE) {
> > >   return;
> > >   }
> > > pthread_create( &thread, NULL, (void *) phpthreads_create, 
> > > (void*) callback);
> > > RETURN_TRUE;
> > > }
> > > 
> > > and the backtrace of the simple threaded test looks like this..
> > > 0x08128f08 in _zval_ptr_dtor (zval_ptr=0x81b5ce8) at 
> > > /usr/src/php/php4/Zend/zend_execute_API.c:275
> > > 275 (*zval_ptr)->refcount--;
> > > (gdb) bt
> > > #0  0x08128f08 in _zval_ptr_dtor (zval_ptr=0x81b5ce8) at 
> > > /usr/src/php/php4/Zend/zend_execute_API.c:275
> > > #1  0x424ceba2 in ?? ()
> > > #2  0x424c7c92 in ?? ()
> > > #3  0x08130588 in zend_execute_scripts (type=8, retval=0x0, 
> > > file_count=3) at /usr/src/php/php4/Zend/zend.c:810
> > > #4  0x08110abd in php_execute_script (primary_file=0x40006c71) at 
> > > /usr/src/php/php4/main/main.c:1398
> > > #5  0x08110138 in php_module_shutdown () at 
> > > /usr/src/php/php4/main/main.c:1058
> > > #6  0x2e325f43 in ?? ()
> > > 
> > > does anyone want to suggest what might be missing - is it worth putting 
> > > this into pecl - and does someone what to lend a hand??
> > > 
> > > regards
> > > alan
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > -- 
> > > PHP Development Mailing List 
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > 
> > 
> > 
> > 
> > -- 
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> ---
>  Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
>  Frequent ranting: http://www.derickrethans.nl/
> ---
>  PHP: Scripting the Web - [EMAIL PROTECTED]
> All your branches are belong to me!
> SRM: Script Running Machine - www.vl-srm.net
> ---
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] imap quota broken

2002-08-01 Thread Dan Kalowsky

Jan it is possible to put a fix in to keep some backwards compatibility.
I thought about this last night, and I will try to implement it today.  If
you would test it later today that would be nice.   This solution does
pollute the array, but it will make old scripts work a bit better.

On Thu, 1 Aug 2002, Jan Schneider wrote:

> OK, thanks for making that clear.
>
> Zitat von Dan Kalowsky <[EMAIL PROTECTED]>:
>
> > Yes it did.  Mainly because the old compatibility was wrong.
> >
> > In the case when a server would respond with multiple resources like so:
> >
> > C: A003 GETQUOTA ""
> > S: * QUOTA "" (STORAGE 10 512 MESSAGE 5 256)
> >
> > The imap_get_quota() function would set the usage and limit values to
> > that
> > of the last resource.  If there is more than one resource, the last value
> > is NEVER the STORAGE value.  The current functionality reflects the
> > proper
> > usage and limit values for all resources, and conforms to RFC 2087.
> >
> > On Thu, 1 Aug 2002, Jan Schneider wrote:
> >
> > > One of the lasts commits to the imap quota functions broke backward
> > > compatibility with the old imap_get_quota() behaviour.
> > >
> > > It used to return an array like:
> > > array ( 'usage' => 83090, 'limit' => 10, )
> > > but now returns an array like:
> > > array ( 'STORAGE' => array ( 'usage' => 83090, 'limit' => 10, ), )
>
> Jan.
>
> --
> http://www.horde.org - The Horde Project
> http://www.ammma.de - discover your knowledge
> http://www.tip4all.de - Deine private Tippgemeinschaft
>

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] phpthreads - hints anyone...

2002-08-01 Thread derick

On 31 Jul 2002, Jason T. Greene wrote:

> Instead of mutexing the entire interpreter to death, why don't you try
> creating multiple interpreters (each in a thread), and then come up with
> a sharing mechanism.

Sounds like duplication some other thing :)

Derick

> On Wed, 2002-07-31 at 03:57, Alan Knowles wrote:
> > Im looking at adding threading to php, (for the cgi/cli stuff)..
> > 
> > The story so far:
> > 
> > I've created an extension which diverts all zend_execute calls into the 
> > extension -> phpthreads_execute.
> > this function is a copy of zend_execute with a few modifications
> > - to copy & restore things like  EG(active_symbol_table);
> > - to malloc lock and unlock the execute loop and release on each opcode.
> > 
> > I've started testing the phpthreads_create($callback); - it appears to 
> > work ok, execept it segfaults on completion.. - trying to reduce 
> > refcounts somewhere.
> > 
> > The fireup code looks something like this..
> > 
> > void phpthreads_create(void *ptr) {
> > zval myretval;
> > zval *callback = (zval *) ptr;
> >   
> > if (!call_user_function( EG(function_table), NULL, callback, 
> > &myretval, 0, NULL TSRMLS_CC ))  {
> > zend_error(E_ERROR, "Problem Starting thread with 
> > callback");
> > }
> >
> > pthread_exit(NULL);
> >
> >
> > }
> > /* {{{ proto string phpthreads_thread(string function)
> >Return a string to confirm that the module is compiled in */
> > PHP_FUNCTION(phpthreads_create)
> > {
> >  
> > zval *callback;
> > pthread_t thread;
> >
> >   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", 
> > &callback) == FAILURE) {
> >   return;
> >   }
> > pthread_create( &thread, NULL, (void *) phpthreads_create, 
> > (void*) callback);
> > RETURN_TRUE;
> > }
> > 
> > and the backtrace of the simple threaded test looks like this..
> > 0x08128f08 in _zval_ptr_dtor (zval_ptr=0x81b5ce8) at 
> > /usr/src/php/php4/Zend/zend_execute_API.c:275
> > 275 (*zval_ptr)->refcount--;
> > (gdb) bt
> > #0  0x08128f08 in _zval_ptr_dtor (zval_ptr=0x81b5ce8) at 
> > /usr/src/php/php4/Zend/zend_execute_API.c:275
> > #1  0x424ceba2 in ?? ()
> > #2  0x424c7c92 in ?? ()
> > #3  0x08130588 in zend_execute_scripts (type=8, retval=0x0, 
> > file_count=3) at /usr/src/php/php4/Zend/zend.c:810
> > #4  0x08110abd in php_execute_script (primary_file=0x40006c71) at 
> > /usr/src/php/php4/main/main.c:1398
> > #5  0x08110138 in php_module_shutdown () at 
> > /usr/src/php/php4/main/main.c:1058
> > #6  0x2e325f43 in ?? ()
> > 
> > does anyone want to suggest what might be missing - is it worth putting 
> > this into pecl - and does someone what to lend a hand??
> > 
> > regards
> > alan
> > 
> > 
> > 
> > 
> > 
> > 
> > -- 
> > PHP Development Mailing List 
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

---
 Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
 Frequent ranting: http://www.derickrethans.nl/
---
 PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] GMP extension

2002-08-01 Thread phpsurf

Hi,

I'm looking for the GMP extension in a binary distribution for windows.
This extension is documented, found in the CVS tree at php4/ext/gmp, but it
is never packaged in any windows distribution !
Am I totally blind, or is there something missing ?

Thanks for help :)

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] oci8 extension

2002-08-01 Thread Abdul-Kareem Abo-Namous

hi everyone

i'm new to this list so please be patient with me (but not too patient ;-)).

i am currently a contractor for a pretty big it company that is migrating
all its php sites to oracle 9i. since we ran into some large problems
related to character sets and the way the oci library handles enviroment
setup in a shared environment, we have agreed to write new functions that
expose new functionality in oracle's oci in php. we're talking about a mere
2 new functions that can't be used in oracle 8's oci.

now my questions are:

-should i fork the oci8 extension into a new one (oci9 or so) that includes
these functions and all other (older) functions with modified names, and
submit it as a new extension, or
-just submit a patch for ext/oci8 that adds these two functions and add a
switch that turns them on or off depending on what oci lib version was found
during a build process?

furtheron, is there anyone out there already working on an oci9 extension?
anyway, thanks for reading. if there's any interest, i can shed some light
on a few details of the problems forcing us to do this.

cu,
Abdul-Kareem Abo-Namous


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] phpthreads - hints anyone...

2002-08-01 Thread Alan Knowles

>
> It's not about looking at the perl code, that will tell you nothing 
> unless you know perl internals.  It's about the way the interpreter 
> works, some of the architecture, that is simular to PHP.  In PHP, 
> threads are isolated, kind of like seperate processes, but in threads.


 From my understanding they are 'forced to be isolated' by the TSRM 
stuff.  which looks like it stores globals in something like an 
associated array ( thread id => global c variable - eg. compiler_globals 
etc.), when ZTS is enabled..

> Everything in PHP works that way, so in creating threads for php 
> scripts, you have to have a seperate interpreter.  Then you have to 
> create a "bridge" between the threads for shared variables.  shmop 
> comes close to what is needed, but not close enough.

the real use of the threading I guess is for people who want to write 
tcp servers, or desktop gtk apps.

Thoughts on accessing 'threaded shared vars'

$_THREADVAR['gtktext'] type..

php_threads_malloc_lock();
$_THREADVAR['gtktext']->add_text('some data ouput');
php_threads_malloc_unlock();

this would I guess involve rather heavy changes to the ZE engine to 
recogize an lock/unlock, copy (rather than refcount) etc. variables that 
where threaded..


Threaded objects???
 
I guess the other consideration is to have thread variable objects..
$threadvar  = new Thread_Var();
$threadvar->setNewObject('mywidget','GtkWindow');
$threadvar->set('mywidget',$gtkobject);
$var = $threadvar->get('mywidget');
$var = $threadvar->getArray('key','val');
$threadvar->callMethod('mywidget', 'add_text','something');

obviously copying and accessing these would probably be easier to cope 
with ( without having to modify heavily the zend engine) -  we could do 
'real' copying on the data, rather than refcounting them. and reduce the 
headaches...

> You're much closer to what needs to happen now.  But you cannot simply 
> point to the memory for another thread.  Doing that will cause 
> problems like you are running into.  You actually have to copy a bunch 
> of stuff so each thread is completely independent.

Do you mean we will have to really physically copy the all theopcode 
data from one thread to another?

>
>
> I've worked up some code in TSRM to abstract native thread calls, and 
> have started on an extension, but probably won't have it complete 
> until this weekend some time.  What you've done now is fairly simular, 
> but pthread specific.  Given time, I might have enough done to email a 
> diff containing my work tomorrow night if you want to take a look.

Anything I can do to help - testing, understanding - let me know.
Sounds Great.

Regards
Alan

>
>
> Shane
>



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] segfault in recent code

2002-08-01 Thread Rasmus Lerdorf

That fixed part of it, there is still another segfault in there somewhere.
Something in the vastness of IMP is making things go weird...

On Thu, 1 Aug 2002, Marcus [iso-8859-1] Börger wrote:

> At 10:37 01.08.2002, Rasmus Lerdorf wrote:
> >/home/rasmus/php4/main/SAPI.c(642) : Block 0x0825B220 status:
> >Beginning:  Overrun (magic=0x0825B1A8, expected=0x7312F8DC)
> >[Thu Aug  1 01:32:21 2002] [notice] child pid 24107 exit signal
> >Segmentation fault (11)
> >
> >Poked around for it a bit, but need to get some sleep.  Not sure the
> >overrun is actually related to the segfault.  The overrun can be
> >reproduced by the one-liner:
> >
> >  
> >
> >I'll see if I can find the segfault on the plane tomorrow if nobody in a
> >saner timezone gets to it first.
>
> done by now: It was not setting mimetype and statusline to NULL that caused
> the segfault.
>
> marcus
>


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: [PHP-QA] Congratulations.

2002-08-01 Thread Dan Hardiker

> Come on, it's an award, they pick individuals.  I think Derick and Jani
> deserved that award with good margin, because the type of work they do
> often has limited reward compared to the amount of energy they put into
> it.

If any of us did the work we do for the money (in commerical), the
recognition, or the "fame" (as such) then PHP, Open Source and the whole
bleeding edge programming community wouldnt be where it is now. Every
developer who has taken up the text editor and coded for the sheere hell
of expanding the current realm of known computing (eg: expanding PHP's
functionality, contributing to projects such as FreeBSD etc) deserves
recognition like this.

The prize comes from self gratification more than anything - and although
decoration may be nice this IS an award for everyone who has worked on the
PHP project. Although its Derick and Jani's names on the trophy, we all
know that its a group effort - hence the name PHP _Group_.

If anything we should all be proud of what we all have accomplished.

> There'll be a chance for everyone ;-)

Just my 2c if that makes any sense :P


-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: [PHP-QA] Congratulations.

2002-08-01 Thread Stig S. Bakken

On Thu, 1 Aug 2002, Daniel Lorch wrote:

> hi,
> 
> > Congratulations Derick.
> > Most deserving recognition for a terrific job.
> > I will add to that my humble thanks.
> 
> No offense, but I think other developers should be mentioned as well. I
> very much like wez' work on innovative ideas - even though his results
> might not be suitable for the masses (such as having PHP client-sided
> embedded into redmond's browser etc.).
> 
> But generally, I think honoring hard working developers is a good idea,
> as they only seldomly get positive feedback on their work (what they
> certainly deserve).

Come on, it's an award, they pick individuals.  I think Derick and Jani
deserved that award with good margin, because the type of work they do
often has limited reward compared to the amount of energy they put into
it.

There'll be a chance for everyone ;-)

 - Stig


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] segfault in recent code

2002-08-01 Thread Marcus Börger

At 10:37 01.08.2002, Rasmus Lerdorf wrote:
>/home/rasmus/php4/main/SAPI.c(642) : Block 0x0825B220 status:
>Beginning:  Overrun (magic=0x0825B1A8, expected=0x7312F8DC)
>[Thu Aug  1 01:32:21 2002] [notice] child pid 24107 exit signal 
>Segmentation fault (11)
>
>Poked around for it a bit, but need to get some sleep.  Not sure the
>overrun is actually related to the segfault.  The overrun can be
>reproduced by the one-liner:
>
>  
>
>I'll see if I can find the segfault on the plane tomorrow if nobody in a
>saner timezone gets to it first.

done by now: It was not setting mimetype and statusline to NULL that caused 
the segfault.

marcus


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] imap quota broken

2002-08-01 Thread Jan Schneider

OK, thanks for making that clear.

Zitat von Dan Kalowsky <[EMAIL PROTECTED]>:

> Yes it did.  Mainly because the old compatibility was wrong.
> 
> In the case when a server would respond with multiple resources like so:
> 
> C: A003 GETQUOTA ""
> S: * QUOTA "" (STORAGE 10 512 MESSAGE 5 256)
> 
> The imap_get_quota() function would set the usage and limit values to
> that
> of the last resource.  If there is more than one resource, the last value
> is NEVER the STORAGE value.  The current functionality reflects the
> proper
> usage and limit values for all resources, and conforms to RFC 2087.
> 
> On Thu, 1 Aug 2002, Jan Schneider wrote:
> 
> > One of the lasts commits to the imap quota functions broke backward
> > compatibility with the old imap_get_quota() behaviour.
> >
> > It used to return an array like:
> > array ( 'usage' => 83090, 'limit' => 10, )
> > but now returns an array like:
> > array ( 'STORAGE' => array ( 'usage' => 83090, 'limit' => 10, ), )

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Re: mbstring and html encode/const structs

2002-08-01 Thread Marcus Börger

At 04:11 01.08.2002, Yasuo Ohgaki wrote:
>Interesting.
>
>Marcus Boerger wrote:
>>Anyone interested may download the patch: 
>>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>>And the additional file holding translation the table: 
>>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
>
>but I cannot access to your web site

Ups sorry :-)

must be a '-' instead of '.'

Anyone interested may download the patch: 
http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
And the additional file holding translation the table: 
http://marcus-boerger.de/php/ext/mbstring/html_entities.c


>--
>Yasuo Ohgaki
>
>
>--
>PHP Development Mailing List 
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] segfault in recent code

2002-08-01 Thread Rasmus Lerdorf

/home/rasmus/php4/main/SAPI.c(642) : Block 0x0825B220 status:
Beginning:  Overrun (magic=0x0825B1A8, expected=0x7312F8DC)
[Thu Aug  1 01:32:21 2002] [notice] child pid 24107 exit signal Segmentation fault (11)

Poked around for it a bit, but need to get some sleep.  Not sure the
overrun is actually related to the segfault.  The overrun can be
reproduced by the one-liner:

 

I'll see if I can find the segfault on the plane tomorrow if nobody in a
saner timezone gets to it first.

-Rasmus


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] phpthreads - hints anyone...

2002-08-01 Thread Shane Caraveo

Alan Knowles wrote:
> Ok, had a slight play with it again..
> 
> I did eventually find the perl code for threading although without an 
> lxr server it's pretty much impossible to decipher all the macros they 
> use..

It's not about looking at the perl code, that will tell you nothing 
unless you know perl internals.  It's about the way the interpreter 
works, some of the architecture, that is simular to PHP.  In PHP, 
threads are isolated, kind of like seperate processes, but in threads. 
Everything in PHP works that way, so in creating threads for php 
scripts, you have to have a seperate interpreter.  Then you have to 
create a "bridge" between the threads for shared variables.  shmop comes 
close to what is needed, but not close enough.

> The code for this stuff is pretty simple at the moment.. - so i'ts down 
> the bottom..

You're much closer to what needs to happen now.  But you cannot simply 
point to the memory for another thread.  Doing that will cause problems 
like you are running into.  You actually have to copy a bunch of stuff 
so each thread is completely independent.

I've worked up some code in TSRM to abstract native thread calls, and 
have started on an extension, but probably won't have it complete until 
this weekend some time.  What you've done now is fairly simular, but 
pthread specific.  Given time, I might have enough done to email a diff 
containing my work tomorrow night if you want to take a look.

Shane


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] need help!

2002-08-01 Thread Sujata Ghosh

hi to all!

i want to do followings using php:

1) i have made a form in html. this form contain user 
details who want to download a pdf file. where 
javascript is handling data validation on submission 
of that user info.

2) after that a php file will open and it takes all 
user's information and send a mail to me along with 
those data and automaically start download that pdf 
file. user won't get any mail.

3) i want to put basic checking of email address also 
so that it will force someone to put correct email 
address.

can any one help me out! let me know, then i will 
submit that php coding also.

thanks in advance,
Sujata Ghosh.
Calcutta, india.



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php