Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-18 Thread Colin Viebrock
 And I wonder why do you think it is so important to show the characters 
 like eacute; or auml; in every browser... ?  For me, to show correct 
 multibyte characters in the gpc section would make more sense. 
 Therefore I think the best solution is to keep the best visibility in the 
 user's native charset / encoding.

phpinfo() no longer encodes accented characters to eacute; or auml;.
I changed this on Wed Oct 9 10:39:39 2002 in version 1.215 of info.c.


 As I said before, IE and Mozilla automatically changes the font 
 preference if no suitable glyph for a character is found on rendering.
 So with some charsets, specifying the face name in CSS declaration has 
 no effect.

And?  Isn't that what phpinfo() does now?  No charset/encoding is
specified, so IE/Moz automagically changes it.

 Please look at the attached HTML file and the image (the file would be 
 dropped in the list). The HTML file is encoded in UTF-8 and the image is 
 rendered by IE5.5 . Note that the font used to render the Japanese 
 characters are not Arial Unicode MS but MS PGothic. Hope it helps.

Well, it renders nicely under Mozilla for me too.  I don't understand
the point though, so here are my questions:

1) what is wrong with the way phpinfo() works *right now*?
2) what could/should be changed to fix it?

If I call a page with phpinfo(), and pass it a query string with encoded
chars, then I do see the _GET[var] part of the info in the Japanese
characters, and all the rest of the page looks fine.  i.e.:

http://devel.easydns.com/~cmv/.info.php?var=%E6%97%A5%E6%9C%AC%E8%AA%9E

This is under Moz 1.2 on my machine.

- Colin



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




Re: [PHP-DEV] [PATCH] Changing entity charsethandlinginext/standard/html.c

2002-10-18 Thread Moriyoshi Koizumi
resending...


Moriyoshi Koizumi [EMAIL PROTECTED] wrote:

 I've made a revised patch. I don't see there's no more BC problem around
 it. Please review it.
 
 PS: I finally ended my search without a hit on such a discussion: Could 
 you give me a pointer where that discussion took place if it doesn't take 
 your time? I've ever looked over the archives of php-dev, php-cvs and 
 php-i18n.
 
 Moriyoshi Koizumi
 
 
 Wez Furlong [EMAIL PROTECTED] wrote:
 
  On 10/17/02, Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
   Yep, as far as I read the archives, I haven't found any discussions on the 
   charset related backwards problems. So I wrote *exactly* about this 
   issue.
  
  Search for htmlentities charset.  Both myself and thies (and probably others
  were discussing this).
  In short: there are many, many, many people who have scripts that rely
  on htmlentities defaulting to iso-8859-1 (the documented default for ever).
  
   I'm going to read archives more carefully, though I think even handling 
   the charset in phpinfo() will yield the same discussion in the future.
  
  This is a separate issue and nothing to do with changing the behaviour of
  htmlentities().
  
  --Wez.
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Index: html.c
===
RCS file: /repository/php4/ext/standard/html.c,v
retrieving revision 1.54
diff -u -r1.54 html.c
--- html.c  3 Oct 2002 12:06:52 -   1.54
+++ html.c  17 Oct 2002 17:58:19 -
@@ -31,6 +31,11 @@
 #include langinfo.h
 #endif
 
+#if HAVE_MBSTRING
+# include ext/mbstring/mbstring.h
+ZEND_EXTERN_MODULE_GLOBALS(mbstring)
+#endif
+
 enum entity_charset { cs_terminator, cs_8859_1, cs_cp1252,
  cs_8859_15, cs_utf_8, cs_big5, cs_gb2312, 
  cs_big5hkscs, cs_sjis, cs_eucjp};
@@ -525,6 +530,36 @@
return cs_8859_1;
 
if (strlen(charset_hint) == 0)  {
+#if HAVE_MBSTRING
+   /* XXX: Ugly things. Why don't we look for a more sophisticated way? */
+   switch (MBSTRG(internal_encoding)) {
+   case mbfl_no_encoding_utf8:
+   return cs_utf_8;
+
+   case mbfl_no_encoding_euc_jp:
+   case mbfl_no_encoding_eucjp_win:
+   return cs_eucjp;
+
+   case mbfl_no_encoding_sjis:
+   case mbfl_no_encoding_sjis_win:
+   case mbfl_no_encoding_sjis_mac:
+   return cs_sjis;
+
+   case mbfl_no_encoding_cp1252:
+   return cs_cp1252;
+
+   case mbfl_no_encoding_8859_15:
+   return cs_8859_15;
+
+   case mbfl_no_encoding_big5:
+   return cs_big5;
+
+   case mbfl_no_encoding_euc_cn:
+   case mbfl_no_encoding_hz:
+   case mbfl_no_encoding_cp936:
+   return cs_gb2312;
+   }
+#endif
/* try to detect the charset for the locale */
 #if HAVE_NL_LANGINFO  HAVE_LOCALE_H  defined(CODESET)
charset_hint = nl_langinfo(CODESET);

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


Re: [PHP-DEV] OCI patch

2002-10-18 Thread Maxim Maletsky

OK, then.


--
Maxim Maletsky
[EMAIL PROTECTED]



[EMAIL PROTECTED] wrote... :

 
 Thies, Maxim, if you could hang on for a few hours I'll be back with a few ideas and 
a cleaned up version of the patches + a switch for oracle 9+ to enable the new nls 
functions.
 
 Abdul
 


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Yasuo Ohgaki
Zeev Suraski wrote:

At 11:10 17/10/2002, Yasuo Ohgaki wrote:


Zeev Suraski wrote:


No, we shouldn't have.  It is not a deprecated feature or a 
discouraged feature.  If you use the *FAIRLY RARE* combination of 
using PHP to generate XML, you'd have to configure your PHP.  If 
you're with the vast majority of the population and couldn't care 
less about writing XML-embedded scripts, you enjoy a working short tag.


I know it's a kind of religious issue :)

Anyway, if it's rare we don't need ?xml awareness in parser.



Since there are no drawbacks at all to the ?xml detection, and since it 
does cover a great deal of the problem (taking into account the very 
limited scope of the problem), I don't see a good reason not to add it.  
Rasmus put it very well in one of his recent letters - PHP is not a 
purists' language, complex problem sometimes require 'ugly' solutions...

Hmm. I fails to see importance of ?xml awareness.

I see side effect of ? tag as PHP start tag.
IMHO, language that supposed to process XML document should
not have ? as start tag. Use of ? should be discouraged
if a language suppose to work with ?xml.

I'm not insisting removal of it, but having ? start tag,
and keep encouraging use of it, is a design flaw to me.

--
Yasuo Ohgaki


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




Re: [PHP-DEV] Re: $_ENV[] != getenv()

2002-10-18 Thread Andrew Sitnikov
Hello Tom,

reede, 18.10.2002, you wrote:

TS Andrew Sitnikov wrote:
 Any comments please ?
 
 P.S. I know that 'REMOTE_ADDR' exists in $_SERVER[]

TS Are you using the lastest snapshot, I believe this is a bug that is now 
TS fixed...
i use 4.2.3 and will try snapshot for you.



Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-18 Thread Moriyoshi Koizumi
Hello,

 If you explicitly specify a charset, then you need to encode the
 characters according to that character set.  The problem is, that
 encodings such as eacute; and Auml; (which show up on the credits
 page), don't work under all charsets/encodings.

IMO this is alreadly accomplished with mbstring or iconv extension.

And I wonder why do you think it is so important to show the characters 
like eacute; or auml; in every browser... ?  For me, to show correct 
multibyte characters in the gpc section would make more sense. 
Therefore I think the best solution is to keep the best visibility in the 
user's native charset / encoding.

 I will test it again, with the charset declaration back in, but I'm
 relying on people with non-Western browsers and charsets for some
 feedback on how the choice of charset affects the rendering of the pages.

As I said before, IE and Mozilla automatically changes the font 
preference if no suitable glyph for a character is found on rendering.
So with some charsets, specifying the face name in CSS declaration has 
no effect.

Please look at the attached HTML file and the image (the file would be 
dropped in the list). The HTML file is encoded in UTF-8 and the image is 
rendered by IE5.5 . Note that the font used to render the Japanese 
characters are not Arial Unicode MS but MS PGothic. Hope it helps.


Moriyoshi Koizumi


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


[PHP-DEV] parse_url is not BC to 4.2.

2002-10-18 Thread Thies C. Arntzen

HEAD doesnt do parse_url(file:/tmp/bla) any more. (you need
to have 2 slahes after file: to make it work).

i really think we should allow the single-slash syntax again!

re,
tc

-- 
Thies C. Arntzen   -   Looking for all sorts of freelance work  -   just ask..
  http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ

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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andi Gutmans
I have to admit that after grep'ing a few hundred xml documents it does 
seem to make some sense to support this.
It's ugly but it works. The only question is what will we think of this in 
two years time? :)
By the way, I really think we should quit the ? removing thread. I think 
it's quite obvious that this won't be going anywhere.

Andi

At 06:12 PM 10/17/2002 +0200, Zeev Suraski wrote:
Well, I differ with you on that.  I don't think there's anything in the 
same class as ?xml.

Zeev

At 18:08 17/10/2002, Andi Gutmans wrote:
I don't think we should add special hacks to the scanner. Soon we're 
going to have a zillion hacks for other XML/SGML/foobar documents.

Andi

At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
Since the general consensus by the developers is not to remove the 
short_tags
or even disable them. Perhaps we should consider alternate solutions to this
problem. Given the buzzword popularity of XML and its slowly growing
popularity among website designers (XHTML) this issue is likely to come 
up in
the future yet again.
The solution I would like to offer, is a patch that adds special 
handling for
?xml. Thus preventing the language parser from attempting to parse data
inside ?xml as PHP source.

Ilia


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




Re: [PHP-DEV] 4.3.0-pre1 printf weirdness

2002-10-18 Thread Derick Rethans
Hello,

I could reproduce this with pre1, but latest CVS works fine again. Can 
you try?

Derick


On Thu, 17 Oct 2002, Mike Robinson wrote:

 ?php
   printf(%01.2f,-2999/100);
   echo br;
   printf(%01.2f,-3000/100);
   echo br;
   printf(%01.2f,-3000/100);
   echo br;
   printf(%01.2f,-3000/100);
   echo br;
   printf(%01.2f,-3001/100);
   echo br;
   printf(%01.2f,-3000/100);
 ?
 
 4.2.3 output:
 -29.99
 -30.00
 -30.00
 -30.00
 -30.01
 -30.00
 
 4.3.0pre1 output:
 -29.99
 296.14
 0.00
 0.00
 -30.01
 296.14 
 
 If I comment out one or more of the printf()'s that use -3000/100,
 but not all of them, I can get the returned output of the others
 to change to all sorts of neat things (just never -30.00). At one
 point one of them output 3245234172.00. This is on a stock redhat8
 box.
 
 Regards
 Mike Robinson
 
 
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




Re: [PHP-DEV] [PATCH] Changing entity charsethandlinginext/standard/html.c

2002-10-18 Thread Moriyoshi Koizumi
I've made a revised patch. I don't see there's no more BC problem around
it. Please review it.

PS: I finally ended my search without a hit on such a discussion: Could 
you give me a pointer where that discussion took place if it doesn't take 
your time? I've ever looked over the archives of php-dev, php-cvs and 
php-i18n.

Moriyoshi Koizumi


Wez Furlong [EMAIL PROTECTED] wrote:

 On 10/17/02, Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
  Yep, as far as I read the archives, I haven't found any discussions on the 
  charset related backwards problems. So I wrote *exactly* about this 
  issue.
 
 Search for htmlentities charset.  Both myself and thies (and probably others
 were discussing this).
 In short: there are many, many, many people who have scripts that rely
 on htmlentities defaulting to iso-8859-1 (the documented default for ever).
 
  I'm going to read archives more carefully, though I think even handling 
  the charset in phpinfo() will yield the same discussion in the future.
 
 This is a separate issue and nothing to do with changing the behaviour of
 htmlentities().
 
 --Wez.
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP-DEV] php/embed and php-config

2002-10-18 Thread Wez Furlong
I've been playing with php/embed and stumbled on a slight problem with php-config - it 
doesn't include the paths for the libs:

% php-config --libs
-lrecode -lexpat -lsnmp -lpanel -lncurses -lmysqlclient -lming -lm
-lintl -lgd -lfreetype -lpng -lz -ljpeg -lexslt -lxsltbreakpoint
-lxml2 -lxslt -lz -lgdbm -lcurl -lbz2 -lz -lcrypt -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lcrypt -lcurl -lssl -lcrypto -ldl -lz
-lxml2 -lz -lm

When I try and link I get:
/usr/i486-suse-linux/bin/ld: cannot find -lmysqlclient

% locate mysqlclient
/usr/lib/mysql/libmysqlclient.a
/usr/lib/mysql/libmysqlclient.la
/usr/lib/mysql/libmysqlclient.so
/usr/lib/mysql/libmysqlclient.so.10
/usr/lib/mysql/libmysqlclient.so.10.0.0
/usr/lib/mysql/libmysqlclient.so.6
/usr/lib/mysql/libmysqlclient.so.6.0.0


so php-config should convey this information somehow :/
Any volunteers?

--Wez.
(I'm going to hack my ld.so.conf now).

-- 
Wez Furlong
The Brain Room Ltd.


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Tim Daly, Jr.


Brad LaFountain [EMAIL PROTECTED] writes:

 PHP_FUNCTION(ref_assign)
 {
   zval *bar, *foo;
 
   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zz, bar, foo) ==
 FAILURE) {
   return;
   }
 
   ZVAL_ADDREF(foo);
   *bar = *foo;
   bar-is_ref = TRUE;
   bar-refcount = 1;
 }
 
 this works, but i don't know if its the best way to do it.
 

Thanks, but it doesn't actually work for me.  Witness:

[tim@myst php-4.2.3]$ ./php -f ext/foo/foo.php
foo
foo
baz
-*-
^@\204Í
FATAL:  erealloc():  Unable to allocate 1515870811 bytes
Segmentation fault (core dumped)
[tim@myst php-4.2.3]$ 


ext/foo/foo.php contains:

?
if(!extension_loaded('foo')) {
dl('foo.so');
}

//make two variables
$foo = foo;
$bar = zonk;

//reference assignment
$bar = $foo;

//should be identical
echo $foo\n;
echo $bar\n;

//set foo and bar to baz
$bar = baz;

//should print baz
echo $foo\n;

echo -*-\n;

//make two variables
$wibb = foo;
$wobb = zonk;

//reference assignment
ref_assign($wobb, $wibb);

//set wibb and wobb to baz
echo $wibb\n;
echo $wobb\n;

//should print baz
$wobb = baz;

echo $wibb\n;

?


-Tim

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




Re: [PHP-DEV] php/embed and php-config

2002-10-18 Thread Jani Taskinen

On Fri, 18 Oct 2002, Wez Furlong wrote:

I've been playing with php/embed and stumbled on a slight problem with
php-config - it doesn't include the paths for the libs:

% php-config --libs
-lrecode -lexpat -lsnmp -lpanel -lncurses -lmysqlclient -lming -lm
-lintl -lgd -lfreetype -lpng -lz -ljpeg -lexslt -lxsltbreakpoint
-lxml2 -lxslt -lz -lgdbm -lcurl -lbz2 -lz -lcrypt -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lcrypt -lcurl -lssl -lcrypto -ldl -lz
-lxml2 -lz -lm

   Seems like php-config misses something.. :) 
   php4/pear/scripts/php-config.in should propably be using
   PHP_LIBS and PHP_LDFLAGS. Now it uses EXTRA_LIBS only..
   And for some reason PHP_LIBS is empty.
   
   Sascha, can you enlighten us? :)
   
   --Jani


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




RE: [PHP-DEV] 4.3.0-pre1 printf weirdness

2002-10-18 Thread Mike Robinson
Yup, I just grabbed a checkout and its fixed.
That was a weird one.

Regards
Mike Robinson


Derick Rethans wrote:

 Hello,
 
 I could reproduce this with pre1, but latest CVS works fine 
 again. Can 
 you try?
 
 Derick
 
 
 On Thu, 17 Oct 2002, Mike Robinson wrote:
 
  ?php
printf(%01.2f,-2999/100);
echo br;
printf(%01.2f,-3000/100);
echo br;
printf(%01.2f,-3000/100);
echo br;
printf(%01.2f,-3000/100);
echo br;
printf(%01.2f,-3001/100);
echo br;
printf(%01.2f,-3000/100);
  ?
  
  4.2.3 output:
  -29.99
  -30.00
  -30.00
  -30.00
  -30.01
  -30.00
  
  4.3.0pre1 output:
  -29.99
  296.14
  0.00
  0.00
  -30.01
  296.14
  
  If I comment out one or more of the printf()'s that use 
 -3000/100, but 
  not all of them, I can get the returned output of the 
 others to change 
  to all sorts of neat things (just never -30.00). At one 
 point one of 
  them output 3245234172.00. This is on a stock redhat8 box.
  
  Regards
  Mike Robinson
  
  
  
  
  
  
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 --
 
 --
 -
  Derick Rethans   
 http://derickrethans.nl/ 
  JDI Media Solutions
 
 --[ if you hold a unix shell to your ear, do you 
 hear the c? ]-
 


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




SV: [PHP-DEV] [4.3] Current critical bugs

2002-10-18 Thread Carsten Gehling
Maybe this is what you need?

http://www.naken.cc/mikehup.php

I use this on a CMS site, where the users upload imagefiles with ftp. After
that, they use a php webinterface to start an importscript (written in
Perl). By doing this command in php:

system(/usr/local/bin/mikehup /usr/bin/perl
/www/servers/netlag/cronscripts/import_billede.pl );

The importscript is started and executes in the background while the
php-script finishes execution.

Hope that helps

- Carsten

 -Oprindelig meddelelse-
 Fra: Joseph Tate [mailto:jtate;mi-corporation.com]
 Sendt: 15. oktober 2002 21:15
 Til: Zeev Suraski
 Cc: Andrei Zmievski; PHP Developers; Jason Priebe
 Emne: Re: [PHP-DEV] [4.3] Current critical bugs


 Throw me a bone then.  What is the suggested way to offer php developers
 the opportunity to run code after the connection has been closed?  Even
 if it only works under Apache on Linux?  Also if the 4.1.0 behavior is
 the correct behavior, why is the function still documented as the
 4.0.x behavior?

 I'll admit that the company I work for is probably the only one using
 this function, but we depend on it.  We do heavy image processing work,
 using image magick, called from clients using wireless networks, where
 it hurts us to keep connections open for long periods of time.  If we
 can't fork some processing to the background, our users think our app is
 slow, and we lose sales.  It's that simple.  Correct behavior or not,
 we need the functionality.

 My patch, I hope, will be ready by the end of the week.  Adding a
 parameter to the register_shutdown_function will not be possible, since
 the function was changed a while back to allow users to specify
 arguments to the function being registered.  Instead a second function
 will be created: register_offline_function offering the 4.0.x behavior.

 Joseph

 Zeev Suraski wrote:
  Summary: Under Apache, register_shutdown_function() broke between 4.0.x
  to 4.1.x
  URL: http://bugs.php.net/bug.php?id=15209
 
 
  I stated my stand on this, I believe that the 4.1.0 behavior is
 the more
  correct one.
 
  I have to go now, but I'll look at the rest of relevant bugs
 later today.
 


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




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




Re[2]: [PHP-DEV] short_open_tag

2002-10-18 Thread Antony Dovgal
Hello All,

AG I don't see why it's such a big deal for people who are creating xml to
AG turn-off short tags?
YES!
This is the main question/answer of this thread!
So, please, people, calm down.

Zmievski has got the present for all of you...=))

Antony Dovgal aka tony2001   mailto:tony2001;ua.fm
http://phpclub.net


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




Re: [PHP-DEV] php/embed and php-config

2002-10-18 Thread Wez Furlong
OK, so /usr/lib/mysql was already in ld.so.conf.
The only way I got this to build was:
LD_LIBRARY_PATH=/usr/lib/mysql make

wtf is going wrong here?
Could it be a libtool problem?

--Wez.

On 18/10/02, Wez Furlong [EMAIL PROTECTED] wrote:
 When I try and link I get:
 /usr/i486-suse-linux/bin/ld: cannot find -lmysqlclient
 
 % locate mysqlclient
 /usr/lib/mysql/libmysqlclient.a
 /usr/lib/mysql/libmysqlclient.la
 /usr/lib/mysql/libmysqlclient.so
 /usr/lib/mysql/libmysqlclient.so.10
 /usr/lib/mysql/libmysqlclient.so.10.0.0
 /usr/lib/mysql/libmysqlclient.so.6
 /usr/lib/mysql/libmysqlclient.so.6.0.0

 (I'm going to hack my ld.so.conf now).




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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Rasmus Lerdorf
My main worry with such a hack would be breaking a script like this:

  ?php
function xml() {
echo Hello World;
}
  ?
  ...
  ?xml ()?
  ...

Now, people generally don't put spaces between the function name and the
(), but it is a BC concern since the above script works just fine today.

One idea would be to only strip ?xml tags up until we see the first PHP
tag.  That should cover most cases, but it may be a bit too magical.

-Rasmus

On Thu, 17 Oct 2002, Andrei Zmievski wrote:

 They are _not_ the same person!

 On Thu, 17 Oct 2002, Zeev Suraski wrote:
  Well, I differ with you on that.  I don't think there's anything in the
  same class as ?xml.
 
  Zeev
 
  At 18:08 17/10/2002, Andi Gutmans wrote:
  I don't think we should add special hacks to the scanner. Soon we're going
  to have a zillion hacks for other XML/SGML/foobar documents.
  
  Andi
  
  At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
  Since the general consensus by the developers is not to remove the
  short_tags
  or even disable them. Perhaps we should consider alternate solutions to
  this
  problem. Given the buzzword popularity of XML and its slowly growing
  popularity among website designers (XHTML) this issue is likely to come
  up in
  the future yet again.
  The solution I would like to offer, is a patch that adds special handling
  for
  ?xml. Thus preventing the language parser from attempting to parse data
  inside ?xml as PHP source.
  
  Ilia
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php



 -Andrei   http://www.gravitonic.com/

 Claiming Java is easier than C++ is like
  saying that K2 is shorter than Everest.
  -- Larry O'Brien (editor, Software Development)

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



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




Re: [PHP-DEV] 4.3.0-pre1 printf weirdness

2002-10-18 Thread Tom Sommer
Derick Rethans wrote:

I could reproduce this with pre1, but latest CVS works fine again. Can 
you try?

You gotta love bugkilling :)

--
* Tom Sommer
* http://www.tsn.dk | webmaster(a)tsn.dk
* Any sufficiently advanced bug is indistinguishable from a feature


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




[PHP-DEV] 4.3.0-pre1 printf weirdness

2002-10-18 Thread Mike Robinson
?php
  printf(%01.2f,-2999/100);
  echo br;
  printf(%01.2f,-3000/100);
  echo br;
  printf(%01.2f,-3000/100);
  echo br;
  printf(%01.2f,-3000/100);
  echo br;
  printf(%01.2f,-3001/100);
  echo br;
  printf(%01.2f,-3000/100);
?

4.2.3 output:
-29.99
-30.00
-30.00
-30.00
-30.01
-30.00

4.3.0pre1 output:
-29.99
296.14
0.00
0.00
-30.01
296.14 

If I comment out one or more of the printf()'s that use -3000/100,
but not all of them, I can get the returned output of the others
to change to all sorts of neat things (just never -30.00). At one
point one of them output 3245234172.00. This is on a stock redhat8
box.

Regards
Mike Robinson






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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Tim Daly, Jr.

Stanislav Malyshev [EMAIL PROTECTED] writes:

 OK, looking again on the matter in depth, it seems to me that you cannot 
 do it from C function either, due to the way in which parameters are 
 passed in the engine. 

Could you go into a little more depth on the problem, just so I
understand?

Thanks,
Tim


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




Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-18 Thread Moriyoshi Koizumi
 phpinfo() no longer encodes accented characters to eacute; or auml;.
 I changed this on Wed Oct 9 10:39:39 2002 in version 1.215 of info.c.

I'm Sorry for taking your time. I missed the recent change about phpinfo. 
And I reconfirmed that the entity conversion doesn't affect multibyte 
characters. But we shouldn't rely on the automatic encoding detection too 
much.

Moriyoshi Koizumi


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




Re: [PHP-DEV] short_open_tag ini_set()

2002-10-18 Thread Richard Heyes
 Since there are no drawbacks at all to the ?xml detection, and since it
 does cover a great deal of the problem (taking into account the very
 limited scope of the problem), I don't see a good reason not to add
 it.  Rasmus put it very well in one of his recent letters - PHP is not a
 purists' language, complex problem sometimes require 'ugly' solutions...

Something else to aid the writing of portable scripts is to allow the
setting
of short_open_tag from the script with ini_set(), for either subsequent
code,
or subsequently included files.

--
Richard Heyes
V-webmail - http://www.v-webmail.co.uk


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




[PHP-DEV] Re: removing apidoc.txt

2002-10-18 Thread Yasuo Ohgaki
+1

It's time to do so.

--
Yasuo Ohgaki

Andrei Zmievski wrote:

I propose we remove apidoc.txt from the tree. It is prety outdated and
only promotes confusion. We have a module for API documentation and it
is available online as well.

-Andrei   http://www.gravitonic.com/

Computers are useless. They can only give you answers.
   --Pablo Picasso



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Yasuo Ohgaki
Andi Gutmans wrote:

I don't think we should add special hacks to the scanner. Soon we're 
going to have a zillion hacks for other XML/SGML/foobar documents.

I agree.
We are better to leave it as documentation issue, IMO.

--
Yasuo Ohgaki



Andi

At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:


Since the general consensus by the developers is not to remove the 
short_tags
or even disable them. Perhaps we should consider alternate solutions 
to this
problem. Given the buzzword popularity of XML and its slowly growing
popularity among website designers (XHTML) this issue is likely to 
come up in
the future yet again.
The solution I would like to offer, is a patch that adds special 
handling for
?xml. Thus preventing the language parser from attempting to parse data
inside ?xml as PHP source.

Ilia





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




[PHP-DEV] trying to understand zvals

2002-10-18 Thread Tim Daly, Jr.

I'm trying to do some extension programming, and I'm pretty confused
by the whole zval thing.  In particular, references are a little
mysterious.  If I have

$foo = zonk;
$bar = $foo;

in PHP, what actually happens?  Specifically, if I wanted a function
that did such a reference assignment:

$foo = zonk;
$bar = baz;

ref_assign($bar, $foo); // $bar = $foo;

what has to happen in ref_assign?

Thanks,
Tim


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Zeev Suraski
At 07:40 18/10/2002, Andi Gutmans wrote:

At 01:09 AM 10/18/2002 +0200, Zeev Suraski wrote:

At 18:49 17/10/2002, Rasmus Lerdorf wrote:

?xml ()? has whitespace.


And I personally think it's a bit pushing it.  How likely is it for 
someone to have a function called xml(), and then call it without a space 
from the ? tag, and then add a space before the parentheses?  I think we 
can safely ignore that one...

I don't see why it's such a big deal for people who are creating xml to 
turn-off short tags?

I don't see why it's such a big deal to have this thread quiet down for at 
least a couple of years, and making the lives of those who generate XML a 
bit easier, and their scripts more portable.

Are we seriously taking this ?xml () issue into account?  Come on.

function php()
{
}

works fine, right?  But, God forbid, ?php () becomes ambiguous!!  Are we 
dropping ?php now?  We can barely hold under the flow of bug reports.

Identifying ?xml is a practical solution to a practical problem.

Zeev

p.s.:  Do you guys seriously think a person could argue with himself so 
vigorously? ;)


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



Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Dan Hardiker
Unless they like arguing with themselvse in public heh

 They are _not_ the same person!

 On Thu, 17 Oct 2002, Zeev Suraski wrote:
 Well, I differ with you on that.  I don't think there's anything in
 the  same class as ?xml.

 At 18:08 17/10/2002, Andi Gutmans wrote:
 I don't think we should add special hacks to the scanner. Soon we're
 going  to have a zillion hacks for other XML/SGML/foobar documents.
 


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



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Maxim Maletsky

just making it in numbers:

(users using short_tags)  (users_using xml() function)

I suppose the first one wins. Now, wouldn't it be possible to find a
work around this issue? This should be a question, IMHO.

-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Fri, 18 Oct 2002 08:14:21 +0900 Yasuo Ohgaki [EMAIL PROTECTED] wrote:

 Andi Gutmans wrote:
  I don't think we should add special hacks to the scanner. Soon we're 
  going to have a zillion hacks for other XML/SGML/foobar documents.
 
 I agree.
 We are better to leave it as documentation issue, IMO.
 
 --
 Yasuo Ohgaki
 
  
  Andi
  
  At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
  
  Since the general consensus by the developers is not to remove the 
  short_tags
  or even disable them. Perhaps we should consider alternate solutions 
  to this
  problem. Given the buzzword popularity of XML and its slowly growing
  popularity among website designers (XHTML) this issue is likely to 
  come up in
  the future yet again.
  The solution I would like to offer, is a patch that adds special 
  handling for
  ?xml. Thus preventing the language parser from attempting to parse data
  inside ?xml as PHP source.
 
  Ilia
  
  
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP-DEV] testing

2002-10-18 Thread Tit \Black\ Petric
ignore this mail

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




Re: [PHP-DEV] Xerces?

2002-10-18 Thread Alex Black
Cool that's exactly what I wanted to know :)

Thanks Melvyn :)

_alex


 Hi,
 
 At 03:05 17-10-2002, Alex Black wrote:
 
 [...]
 
 Still no one has told me what's happening with the XML extension! :) That's
 all I wanted to know...
 
 Are you looking for Xerces support or for a validating XML parser?
 libxml is validating XML parser and is supported through the domxml extension.
 
 Some ideas for better XML support have been brought up, but Xerces is not
 considered an option, mainly because it doesn't have a C API as that prevents
 us from bundeling.
 
 IF ext/xml is to be upgraded (read: find the people to do it), library of
 choice now is libxml.
 
 With kind regards,
 
 Melvyn Sopacua
 ?php include(not_reflecting_employers_views.txt); ?
 
 


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andi Gutmans
At 01:09 AM 10/18/2002 +0200, Zeev Suraski wrote:

At 18:49 17/10/2002, Rasmus Lerdorf wrote:

?xml ()? has whitespace.


And I personally think it's a bit pushing it.  How likely is it for 
someone to have a function called xml(), and then call it without a space 
from the ? tag, and then add a space before the parentheses?  I think we 
can safely ignore that one...

I don't see why it's such a big deal for people who are creating xml to 
turn-off short tags?

Andi


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



[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-18 Thread Colin Viebrock
 Why did you remove the charset info?
 
 I want my charset back since it enables correct handling of the output.
 Everything these lines commented out by you do is telling the receiver
 what charset he gets. That is compareable to http charset info which
 will be generated by those modules also. This way you can enable
 mbsting or iconv with any charset you like.
 
 This has nothing to do with the other thing you did in this patch:
 changing behaviour of php_escape_html_entities(). I guess you did
 not understand what you removed?

No, I do understand what I did.  Every browser I tested displayed the
phpinfo() page correctly when the charset was not specified ... i.e.,
they guessed the right charset.

If you explicitly specify a charset, then you need to encode the
characters according to that character set.  The problem is, that
encodings such as eacute; and Auml; (which show up on the credits
page), don't work under all charsets/encodings.

I will test it again, with the charset declaration back in, but I'm
relying on people with non-Western browsers and charsets for some
feedback on how the choice of charset affects the rendering of the pages.

- Colin



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




Re: [PHP-DEV] OCI extension - brainstorming

2002-10-18 Thread Maxim Maletsky
[EMAIL PROTECTED] wrote... :

 the OCIQuery that maxim proposed has the advantage of being pretty
 high-level, making it much easier for mysql programmers to get a grip at
 oracle, but then again i think that every self-respecting php developer
 would write a function/method that does this for him ;-). from an
 extension point of view i think we shouldn't give up the granularity
 IMHO... but if we go for it, maybe we can change the result type (in
 accordance to the shift of focus in php5) to be a php object that
 contains the statement handle, row+column count,..etc. fields?

Of course everything can be wrapped and modularized. But, I think
OCIQuery could be very nice addition in terms of language usability. It
would then really make it clear why using OCIParse/Execute.

 while we are at it and regarding data types: shall we change the way
 lobs are handled? perhaps a switch between object/content return types.
 i cannot quite see the advantage of having the lobs loaded on demand,
 rather than 'unpacking' them as soon as a result is fetched.

I was thinking of also work out a way to start supporting Boolean types.
Studying the sources now. This is in regards of Bug #19687:

http://bugs.php.net/bug.php?id=19687

 btw, connection pooling, which thies mentioned, would be an absolute +.
 
 perhaps we should wrap around more oci functions, specially the type
 conversion ones, and offer these as part of the extension.

Can we have an internal OCI/PHP and viceversa datatype converter? This
would make things much easier.

-- 
Maxim Maletsky
[EMAIL PROTECTED]


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Stanislav Malyshev
TDJ I'm trying to do some extension programming, and I'm pretty confused
TDJ by the whole zval thing.  In particular, references are a little
TDJ mysterious.  If I have
TDJ 
TDJ $foo = zonk;
TDJ $bar = $foo;
TDJ 
TDJ in PHP, what actually happens?  Specifically, if I wanted a function

What actually happens is that both entries in symbol table with names 
foo and bar point to the same zval (having refcount of 2 now) 
containing string zonk.

TDJ that did such a reference assignment:
TDJ 
TDJ $foo = zonk;
TDJ $bar = baz;
TDJ 
TDJ ref_assign($bar, $foo); // $bar = $foo;
TDJ 
TDJ what has to happen in ref_assign?

That's problematic, due to the way PHP variables work. The best you can do 
is something like this:

function ref_assign($a, $b) {
$GLOBALS[$a] = $GLOBALS[$b];
}

ref_assign(bar, foo);

That's assuming they are globals. If they are not, I cannot now think of a 
good way to make variable-binding function. 
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andi Gutmans
This is definitely one thing to think about. This is exactly the reason why 
I was against in the beginning. I had a feeling such ambiguities could arise.

Andi

At 09:43 AM 10/17/2002 -0700, Rasmus Lerdorf wrote:
My main worry with such a hack would be breaking a script like this:

  ?php
function xml() {
echo Hello World;
}
  ?
  ...
  ?xml ()?
  ...

Now, people generally don't put spaces between the function name and the
(), but it is a BC concern since the above script works just fine today.

One idea would be to only strip ?xml tags up until we see the first PHP
tag.  That should cover most cases, but it may be a bit too magical.

-Rasmus

On Thu, 17 Oct 2002, Andrei Zmievski wrote:

 They are _not_ the same person!

 On Thu, 17 Oct 2002, Zeev Suraski wrote:
  Well, I differ with you on that.  I don't think there's anything in the
  same class as ?xml.
 
  Zeev
 
  At 18:08 17/10/2002, Andi Gutmans wrote:
  I don't think we should add special hacks to the scanner. Soon we're 
going
  to have a zillion hacks for other XML/SGML/foobar documents.
  
  Andi
  
  At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
  Since the general consensus by the developers is not to remove the
  short_tags
  or even disable them. Perhaps we should consider alternate solutions to
  this
  problem. Given the buzzword popularity of XML and its slowly growing
  popularity among website designers (XHTML) this issue is likely to come
  up in
  the future yet again.
  The solution I would like to offer, is a patch that adds special 
handling
  for
  ?xml. Thus preventing the language parser from attempting to parse 
data
  inside ?xml as PHP source.
  
  Ilia
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php



 -Andrei   http://www.gravitonic.com/

 Claiming Java is easier than C++ is like
  saying that K2 is shorter than Everest.
  -- Larry O'Brien (editor, Software Development)

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



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Zeev Suraski
At 18:49 17/10/2002, Rasmus Lerdorf wrote:

?xml ()? has whitespace.


And I personally think it's a bit pushing it.  How likely is it for someone 
to have a function called xml(), and then call it without a space from the 
? tag, and then add a space before the parentheses?  I think we can safely 
ignore that one...

Zeev


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



Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andi Gutmans
At 10:14 AM 10/18/2002 +0200, Zeev Suraski wrote:

At 07:40 18/10/2002, Andi Gutmans wrote:

At 01:09 AM 10/18/2002 +0200, Zeev Suraski wrote:

At 18:49 17/10/2002, Rasmus Lerdorf wrote:

?xml ()? has whitespace.


And I personally think it's a bit pushing it.  How likely is it for 
someone to have a function called xml(), and then call it without a 
space from the ? tag, and then add a space before the parentheses?  I 
think we can safely ignore that one...

I don't see why it's such a big deal for people who are creating xml to 
turn-off short tags?

I don't see why it's such a big deal to have this thread quiet down for at 
least a couple of years, and making the lives of those who generate XML a 
bit easier, and their scripts more portable.

Why for a couple of years? Oh because we might end up finding out it wasn't 
such a good idea after all? :) It might lead to people wanting other new 
XML2/3/foobar tags to also be excluded?
Well anyway, as far as I'm concerned, it's not such a big deal either way 
and it's always fun to be able to say I told you so so I'll retire from 
this discussion. Admittedly there are good points to both sides.

Andi

P.S. - If we do go with it then the original patch of Ilia is probably a 
better idea for now.


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



Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Tim Daly, Jr.

Stanislav Malyshev [EMAIL PROTECTED] writes:

*snip*
 TDJ that did such a reference assignment:
 TDJ 
 TDJ $foo = zonk;
 TDJ $bar = baz;
 TDJ 
 TDJ ref_assign($bar, $foo); // $bar = $foo;
 TDJ 
 TDJ what has to happen in ref_assign?
 
 That's problematic, due to the way PHP variables work. The best you can do 
 is something like this:
*snip*

Sorry, I wasn't clear.  I mean ref_assign to be a C function, in my
extension.

-Tim

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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Brad LaFountain
PHP_FUNCTION(ref_assign)
{
zval *bar, *foo;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, zz, bar, foo) ==
FAILURE) {
return;
}

ZVAL_ADDREF(foo);
*bar = *foo;
bar-is_ref = TRUE;
bar-refcount = 1;
}

this works, but i don't know if its the best way to do it.

 - Brad

--- Tim Daly, Jr. [EMAIL PROTECTED] wrote:
 
 I'm trying to do some extension programming, and I'm pretty confused
 by the whole zval thing.  In particular, references are a little
 mysterious.  If I have
 
 $foo = zonk;
 $bar = $foo;
 
 in PHP, what actually happens?  Specifically, if I wanted a function
 that did such a reference assignment:
 
 $foo = zonk;
 $bar = baz;
 
 ref_assign($bar, $foo); // $bar = $foo;
 
 what has to happen in ref_assign?
 
 Thanks,
 Tim
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com

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




[PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread Yasuo Ohgaki
Andrei Zmievski wrote:

Hi,

We have 10 critical bugs in the list currently. If you could please see
about fixing at least one of them, we'd be that much closer to a release
candidate.


Summary: Apache2 sending 304 - not modified header
http://bugs.php.net/bug.php?id=17098

This is serious problem for serious sites.
(Serious sites shouldn't use Apache2, though)

--
Yasuo Ohgaki


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Andrey Hristov
- Original Message -
From: Stanislav Malyshev [EMAIL PROTECTED]
To: Tim Daly, Jr. [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 17, 2002 5:34 PM
Subject: Re: [PHP-DEV] trying to understand zvals


 TDJ I'm trying to do some extension programming, and I'm pretty confused
 TDJ by the whole zval thing.  In particular, references are a little
 TDJ mysterious.  If I have
 TDJ
 TDJ $foo = zonk;
 TDJ $bar = $foo;
 TDJ
 TDJ in PHP, what actually happens?  Specifically, if I wanted a function

 What actually happens is that both entries in symbol table with names
 foo and bar point to the same zval (having refcount of 2 now)
 containing string zonk.

 TDJ that did such a reference assignment:
 TDJ
 TDJ $foo = zonk;
 TDJ $bar = baz;
 TDJ
 TDJ ref_assign($bar, $foo); // $bar = $foo;
 TDJ
 TDJ what has to happen in ref_assign?

 That's problematic, due to the way PHP variables work. The best you can do
 is something like this:

 function ref_assign($a, $b) {
 $GLOBALS[$a] = $GLOBALS[$b];
 }

 ref_assign(bar, foo);

 That's assuming they are globals. If they are not, I cannot now think of a
 good way to make variable-binding function.
 --

I think he wants to know how to do that in C.

Andrey


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Tim Daly, Jr.


Stanislav Malyshev [EMAIL PROTECTED] writes:

 Ah. Then you need to accept the first parameter by reference (this is 
 defined in ZEND_FE definition, put first_arg_force_ref as second 
 parameter). Then you get parameters the usual way (zend_get_parameters_ex, 
 etc.) and have to zval ** variables, something like this:

Thanks for your response!  While it does not cause a crash, your
function doesn't do what I expected.  Do you know where I went wrong?

This script:

?
if(!extension_loaded('foo')) {
dl('foo.so');
}

//make two variables
$foo = foo;
$bar = zonk;

//reference assignment
stas_ref_assign($bar, $foo);

//should be identical
echo $foo\n;
echo $bar\n;

//set foo and bar to baz
$bar = baz;

//should print baz
echo $foo\n;

?

Outputs foo zonk foo, and I expected foo foo baz. 

I made the following function:

PHP_FUNCTION(stas_ref_assign)
{
zval **dest, **src;

if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, dest, src)) {
WRONG_PARAM_COUNT;
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(src);
(*src)-refcount++;
zval_ptr_dtor(dest);
*dest = *src;
}

with the function entry:

PHP_FE(stas_ref_assign, first_arg_force_ref)

Thanks,
-Tim

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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andrei Zmievski
They are _not_ the same person!

On Thu, 17 Oct 2002, Zeev Suraski wrote:
 Well, I differ with you on that.  I don't think there's anything in the 
 same class as ?xml.
 
 Zeev
 
 At 18:08 17/10/2002, Andi Gutmans wrote:
 I don't think we should add special hacks to the scanner. Soon we're going 
 to have a zillion hacks for other XML/SGML/foobar documents.
 
 Andi
 
 At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
 Since the general consensus by the developers is not to remove the 
 short_tags
 or even disable them. Perhaps we should consider alternate solutions to 
 this
 problem. Given the buzzword popularity of XML and its slowly growing
 popularity among website designers (XHTML) this issue is likely to come 
 up in
 the future yet again.
 The solution I would like to offer, is a patch that adds special handling 
 for
 ?xml. Thus preventing the language parser from attempting to parse data
 inside ?xml as PHP source.
 
 Ilia
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php



-Andrei   http://www.gravitonic.com/

Claiming Java is easier than C++ is like
 saying that K2 is shorter than Everest. 
 -- Larry O'Brien (editor, Software Development)

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




Re: Re: [PHP-DEV] OCI patch

2002-10-18 Thread predator79
Ok, I've attached a pretty ok version. I had to update the config.m4 to inculde a 
HAVE_OCI9 define, but since I'm not really good in this kind of thing, buildconf now 
reports a warning

autoheader: No template for symbol `HAVE_OCI9'

don't know what to do about it. otherwise everything compiles and runs smoothly, so I 
hope you'll enjoy :-).

Abdul

Maxim Maletsky [EMAIL PROTECTED] schrieb am 17.10.02 12:45:57:
 OK, then.
 
 
 --
 Maxim Maletsky
 [EMAIL PROTECTED]
 
 
 
 [EMAIL PROTECTED] wrote... :
 
  
  Thies, Maxim, if you could hang on for a few hours I'll be back with a few ideas 
and a cleaned up version of the patches + a switch for oracle 9+ to enable the new 
nls functions.
  
  Abdul
  
 


--- oci8.c  Wed Oct  9 16:55:16 2002
+++ oci8.c  Thu Oct 17 13:32:09 2002
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.176 2002/09/12 09:48:02 thies Exp $ */
+/* $Id: oci8.c,v 1.175 2002/08/20 07:26:50 edink Exp $ */
 
 /* TODO list:
  *
@@ -199,7 +199,7 @@
 static oci_server *_oci_open_server(char *dbname,int persistent);
 static void _oci_close_server(oci_server *server);
 
-static oci_session *_oci_open_session(oci_server* server,char *username,char 
*password,int persistent,int exclusive);
+static oci_session *_oci_open_session(oci_server* server,char *username,char 
+*password,int persistent,int exclusive,char *charset);
 static void _oci_close_session(oci_session *session);
 
 static sb4 oci_bind_in_callback(dvoid *, OCIBind *, ub4, ub4, dvoid **, ub4 *, ub1 *, 
dvoid **);
@@ -451,7 +451,7 @@
OCI_DEFAULT, 
0, 
NULL));
-   
+   
CALL_OCI(OCIHandleAlloc(
OCI(pEnv), 
(dvoid **)OCI(pError), 
@@ -631,7 +631,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.176 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.175 $);
 #ifndef PHP_WIN32
php_info_print_table_row(2, Oracle Version, PHP_OCI8_VERSION );
php_info_print_table_row(2, Compile-time ORACLE_HOME, PHP_OCI8_DIR );
@@ -1158,9 +1158,9 @@
php_error(E_WARNING, Unknown descriptor type 
%d.,Z_TYPE_P(descr));
return 0;
}
-   
+   
CALL_OCI_RETURN(OCI(error), OCIDescriptorAlloc(
-   OCI(pEnv),
+   connection-session-pEnv,
(dvoid*)(descr-ocidescr), 
Z_TYPE_P(descr), 
(size_t) 0, 
@@ -1244,7 +1244,7 @@
oci_debug(_oci_make_zval: %16s,retlen = %4d,retlen4 = 
%d,storage_size4 = %4d,indicator %4d, retcode = %4d,
  
column-name,column-retlen,column-retlen4,column-storage_size4,column-indicator,column-retcode);

-   if ((! statement-has_data) || (column-indicator == -1)) { /* column is NULL 
or statment has no current data */
+   if (column-indicator == -1) { /* column is NULL */
ZVAL_NULL(value); 
return 0;
}
@@ -1351,14 +1351,14 @@
statement = ecalloc(1,sizeof(oci_statement));
 
 CALL_OCI(OCIHandleAlloc(
-   OCI(pEnv),
+   connection-session-pEnv,
(dvoid **)statement-pStmt,
OCI_HTYPE_STMT, 
0, 
NULL));
 
 CALL_OCI(OCIHandleAlloc(
-   OCI(pEnv),
+   connection-session-pEnv,
(dvoid **)statement-pError,
OCI_HTYPE_ERROR,
0,
@@ -1392,9 +1392,7 @@
if (query) {
statement-last_query = estrdup(query);
}
-
statement-conn = connection;
-   statement-has_data = 0;
 
statement-id = zend_list_insert(statement,le_stmt);
 
@@ -1771,7 +1769,6 @@
}
 
statement-error = 0; /* OCI_NO_DATA is NO error for us!!! */
-   statement-has_data = 0;
 
return 0;
}
@@ -1831,16 +1828,12 @@

_oci_make_zval(column-define-zval,statement,column,OCIFetch,0 TSRMLS_CC);
}
 
-   statement-has_data = 1;
-
return 1;
}
 
oci_error(statement-pError, func, statement-error);
oci_handle_error(statement-conn, statement-error);
 
-   statement-has_data = 0;
-
return 0;
 }
 
@@ -1855,8 +1848,8 @@
ub4 siz = 0;
ub4 readlen = 0;
char *buf;
+  

[PHP-DEV] removing apidoc.txt

2002-10-18 Thread Andrei Zmievski
I propose we remove apidoc.txt from the tree. It is prety outdated and
only promotes confusion. We have a module for API documentation and it
is available online as well.

-Andrei   http://www.gravitonic.com/

Computers are useless. They can only give you answers.
   --Pablo Picasso

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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Rasmus Lerdorf
 On Thu, Oct 17, 2002 at 09:43:02AM -0700, Rasmus Lerdorf wrote:
  My main worry with such a hack would be breaking a script like this:
 
?php
  function xml() {
  echo Hello World;
  }
?
...
?xml ()?
...

 The hadler I suggest will no break any old code. Even
 ?xml_php_function_that_starts_with_xml(); ? will continue to work.
 It would only trigger on ?xml[whitespace].

?xml ()? has whitespace.


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




Re: [PHP-DEV] Re: OCI extension - OCIQuery() ?

2002-10-18 Thread Thies C. Arntzen
On Thu, Oct 17, 2002 at 01:36:26PM +0200, Maxim Maletsky wrote:
 
 Thies C. Arntzen [EMAIL PROTECTED] wrote... :
 
   Hope to see someone to anser, commenting my thoughts on this. I am very 
   much willing contributing to the PHP's Oracle support development. 
  
  that always appreciated. wher do you want to start?
  tc
 
 
 Thies, what do you thik of adding an OCIQuery function?
 
 e.g: 
 
 ?php
 
   $query   = SELECT to_char(sysdate) FROM dual;
 
   // this:
   $stmt= OCIParse($conn, $query);
   $result  = OCIExecute($stmt, OCI_DEFAULT);
 
 
   // can be this:
   $result  = OCIQuery($conn, $query, OCI_DEFAULT);
 
 ?
 
 It could be a nice shortcut for those who use this combo always together
 and, plus, it would be a very elementary thing to implement.
 
 What do you think of it?
 
 I could start from this one, to warm up :) It's been I while I thought
 OCIQuery() could have been implemented.

i don't really think it's a needed function as it won't
support binding of variables and setting the execute mode.
also writing:

$s = ociparse($d, ...); ociexecute($s);

is short enough for most things.

also, cause you loose the statement handle you cannot reuse
it. so adding ociquery will make things less optimal.

re,
tc

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




[PHP-DEV] No CLI and install-headers/build/programs

2002-10-18 Thread Sascha Schumann
Could someone explain to me why install-headers, programs,
build are treated as if they cannot be separately installed
from the pear scripts?

if test $PHP_PEAR != no  test $disable_cli != 1; then
  install_pear=install-pear install-build install-headers install-programs
  PEAR_INSTALLDIR=$PHP_PEAR
fi

More specifically, if I disable the CLI, why should not the
aforementioned targets be invoked?  Only install-pear depends
on the availability of the CLI..

- Sascha


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Stanislav Malyshev
TDJ Thanks for your response!  While it does not cause a crash, your
TDJ function doesn't do what I expected.  Do you know where I went
TDJ wrong?

You are right, this doesn't work. I'll look a bit more into it...

-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109



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




Re: [PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread Ilia A.
On October 17, 2002 07:06 pm, Yasuo Ohgaki wrote:
 Andrei Zmievski wrote:
  Hi,
 
  We have 10 critical bugs in the list currently. If you could please see
  about fixing at least one of them, we'd be that much closer to a release
  candidate.

 Summary: Apache2 sending 304 - not modified header
 http://bugs.php.net/bug.php?id=17098

 This is serious problem for serious sites.
 (Serious sites shouldn't use Apache2, though)

This looks like an Apache 2 bug, rather then aPHP one. I am guessing the fix 
they made did not work properly.

Ilia

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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Steph
 They are _not_ the same person!

I'm not convinced.  Have you never seen Fight Club?

 On Thu, 17 Oct 2002, Zeev Suraski wrote:
  Well, I differ with you on that.  I don't think there's anything in
the
  same class as ?xml.
 
  Zeev
 
  At 18:08 17/10/2002, Andi Gutmans wrote:
  I don't think we should add special hacks to the scanner. Soon
we're going
  to have a zillion hacks for other XML/SGML/foobar documents.
  
  Andi
  
  At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
  Since the general consensus by the developers is not to remove the
  short_tags
  or even disable them. Perhaps we should consider alternate
solutions to
  this
  problem. Given the buzzword popularity of XML and its slowly
growing
  popularity among website designers (XHTML) this issue is likely to
come
  up in
  the future yet again.
  The solution I would like to offer, is a patch that adds special
handling
  for
  ?xml. Thus preventing the language parser from attempting to
parse data
  inside ?xml as PHP source.
  
  Ilia
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php



 -Andrei
http://www.gravitonic.com/

 Claiming Java is easier than C++ is like
  saying that K2 is shorter than Everest.
  -- Larry O'Brien (editor, Software Development)

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




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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Stanislav Malyshev
TDJ Thanks for your response!  While it does not cause a crash, your
TDJ function doesn't do what I expected.  Do you know where I went
TDJ wrong?

OK, looking again on the matter in depth, it seems to me that you cannot 
do it from C function either, due to the way in which parameters are 
passed in the engine. What you can do is to pass names and then work with 
symbols tables (either global or local) directly. You'll also have to take 
care to properly destroy old destination value and properly separate the 
source value. You can look on ASSIGN_REF opcode in zend_execute.c for 
example (yes, it's a bit messy, I know). 

-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109



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




Re: [PHP-DEV] [PATCH] Changing entity charset

2002-10-18 Thread Yasuo Ohgaki
Wez Furlong wrote:

Err, I suggest you read that patch again.
The default will be the mbstring.internal_charset

That's not the same thing!


Since the guess code is in #if, PHP is changing
behavior without the patch according to the
compiled environment.

How about add current guess code if internal_encoding
=NULL?

Is there any other concerns?

--
Yasuo Ohgaki




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




Re: [PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread Yasuo Ohgaki
Ilia A. wrote:

Summary: Apache2 sending 304 - not modified header
http://bugs.php.net/bug.php?id=17098

This is serious problem for serious sites.
(Serious sites shouldn't use Apache2, though)



This looks like an Apache 2 bug, rather then aPHP one. I am guessing the fix 
they made did not work properly.

Great!
Then we can just wait their fix :)

--
Yasuo Ohgaki



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




[PHP-DEV] $_ENV[] != getenv()

2002-10-18 Thread Andrew Sitnikov
Hello php-dev,

?
echo getenv('REMOTE_ADDR'): .getenv('REMOTE_ADDR').\n;
echo \$_ENV['REMOTE_ADDR']: .$_ENV['REMOTE_ADDR'].\n;;

echo getenv('PATH'): .getenv('PATH').\n;
echo \$_ENV['PATH']: .$_ENV['PATH'].\n;;
?

Output:

getenv('REMOTE_ADDR'): 212.7.15.36
$_ENV['REMOTE_ADDR']:
getenv('PATH'): /usr/bin/X11:/usr/games:/usr/bin:/bin:/usr/local/bin:
$_ENV['PATH']: /usr/bin/X11:/usr/games:/usr/bin:/bin:/usr/local/bin:

Any comments please ?

P.S. I know that 'REMOTE_ADDR' exists in $_SERVER[]

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


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




Re: [PHP-DEV] trying to understand zvals

2002-10-18 Thread Stanislav Malyshev
TDJ Sorry, I wasn't clear.  I mean ref_assign to be a C function, in my
TDJ extension.

Ah. Then you need to accept the first parameter by reference (this is 
defined in ZEND_FE definition, put first_arg_force_ref as second 
parameter). Then you get parameters the usual way (zend_get_parameters_ex, 
etc.) and have to zval ** variables, something like this:

zval **dest, src;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, dest, src)) {
WRONG_PARAM_COUNT;
}

Then if src wasn't reference, you need to separate it:

SEPARATE_ZVAL_TO_MAKE_IS_REF(src);
(*src)-refcount++;

This will also make src a reference. 
Then you have to free old value of dest:

zval_ptr_dtor(dest);

Then assign:

*dest = *src;

I think this should be enough...
Note that refcount is increased before calling dtor - to avoid problems 
with something like assign_ref($foo, $foo) (it's not wise to do this, but 
this way it won't crash/produce garbage). 
 
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.109



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




Re: [PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread Ryo Takagi
, the
If-Modified-Since: header is not properly processed.

After the patch is applied, the problem disappears:

--- Telnet servername http requests and results after patch ---
[rt@ns rt]$ telnet localhost http
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD /test.phtml HTTP/1.1
Host: localhost.localdomain

HTTP/1.1 200 OK
Date: Fri, 18 Oct 2002 09:18:00 GMT
Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g PHP/4.3.0-dev
Accept-Ranges: bytes
X-Powered-By: PHP/4.3.0-dev
Last-Modified: Fri, 18 Oct 2002 09:10:00 GMT
Content-Type: text/html; charset=ISO-8859-1

HEAD /test.phtml HTTP/1.1
Host: localhost.localdomain
If-Modified-Since: Fri, 18 Oct 2002 09:09:00 GMT

HTTP/1.1 200 OK
Date: Fri, 18 Oct 2002 09:18:19 GMT
Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g PHP/4.3.0-dev
Accept-Ranges: bytes
X-Powered-By: PHP/4.3.0-dev
Last-Modified: Fri, 18 Oct 2002 09:10:00 GMT
Content-Type: text/html; charset=ISO-8859-1

--- End Telnet ---

The test result was obtained using CVS 20021018 (today's one). The
system used is Red Hat Linux 6.2.

Regards
Ryo

-- 
R Takagi [EMAIL PROTECTED]


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Zeev Suraski
At 10:32 18/10/2002, Andi Gutmans wrote:

Why for a couple of years? Oh because we might end up finding out it 
wasn't such a good idea after all? :)

No, because in a couple of years maybe ?xml will be yesterday's news, and 
?fooml will be the New Thang :)

Well anyway, as far as I'm concerned, it's not such a big deal either way 
and it's always fun to be able to say I told you so so I'll retire from 
this discussion. Admittedly there are good points to both sides.

I can only argue with myself so much, eh? :)

Zeev


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Jan Lehnardt
Hi,
On Fri, Oct 18, 2002 at 11:50:12AM +0200, Zeev Suraski wrote:
 I can only argue with myself so much, eh? :)
yeah, just keep pretending dude... :)

Jan
-- 
Q: Thank Jan? A: http://geschenke.an.dasmoped.net/
Got an old and spare laptop? Please send me a mail.
Key7BCC EB86 8313 DDA9 25DF  
Fingerprint1805 ECA5 BCB7 BB96 56B0

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




Re: [PHP-DEV] Re: OCI extension - OCIQuery() ?

2002-10-18 Thread Maxim Maletsky

Thies C. Arntzen [EMAIL PROTECTED] wrote... :

 i don't really think it's a needed function as it won't
 support binding of variables and setting the execute mode.

True, you cannot use it for binding variables. Only these who often do
plain queries would find it useful. 

 also, cause you loose the statement handle you cannot reuse
 it. so adding ociquery will make things less optimal.

Oh yeah? I thought you don't: Statement handle is returned by OCIParse.
Now, if OCIParse is contained within OCIQuery we can still return the
Statement on success or False on failure. Just the way both functions
behave internally.

I agree that OCIQuery would not be a big feature, but could be useful. At
the end, I think some sort of *query() function for Oracle will be needed
in order to look closer to the way other DBs behave.  It might be
something like ora_do(), but ora_do() is also fetching and that is not
very optimal since one still needs to loop through fetched result set,
why doubling the loops?

Just my thoughts.

--
Maxim Maletsky
[EMAIL PROTECTED]


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




Re: [PHP-DEV] Re: $_GET, $_POST, $_COOKIE, $_FILES == $_REQUEST?

2002-10-18 Thread Andi Gutmans
At 05:45 AM 10/16/2002 +0300, Jani Taskinen wrote:

On Wed, 16 Oct 2002, Yasuo Ohgaki wrote:

Another option.

How about remove $_FILES contents from $_REQUEST?
It seems it has less impact.

+1 for this option. There's really no need it for to
be in $_REQUEST..


+1 from me too. I think it's fine not to have $_FILES in $_REQUEST. The 
main purpose of $_REQUEST was to have get/post/cookie in the same structure 
and always work with that. $_FILES is anyway a special case because its 
format is different.

Andi


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



Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andi Gutmans
I don't think we should add special hacks to the scanner. Soon we're going 
to have a zillion hacks for other XML/SGML/foobar documents.

Andi

At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
Since the general consensus by the developers is not to remove the short_tags
or even disable them. Perhaps we should consider alternate solutions to this
problem. Given the buzzword popularity of XML and its slowly growing
popularity among website designers (XHTML) this issue is likely to come up in
the future yet again.
The solution I would like to offer, is a patch that adds special handling for
?xml. Thus preventing the language parser from attempting to parse data
inside ?xml as PHP source.

Ilia



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




[PHP-DEV] new OCI brainstorm

2002-10-18 Thread Maxim Maletsky


Thies C. Arntzen [EMAIL PROTECTED] wrote... :

 On Wed, Oct 16, 2002 at 10:26:46AM +0200, [EMAIL PROTECTED] wrote:
  Oh, and just to be clear about it: I am absolutely positive on
  a completely new (perhaps unified) extension for PHP 5, and
  would gladly participate.
 
 hmm, sure - why not. we could start to brainstoorm about that
 and decide if we need to rewrite or just add to what's there.

Ok then, here we go and try to brainstorm the ppl here with this ideas.

 what are your plans, what features do you want to see?

Ok, first of all, I picture a succesfull extension being called something
like this:

oracle_* ... Now, this is because ora_* already exist and we don't want
to mess with it. It doesn't really matter the actual extension name.
This new extension could be slight rewrite of what OCI already has,
so OCI* can be the aliases to these functions. At this point, we have
one extension that we call oracle extension and two other extensions
that serve there for compatibility purpose in PECL slowly fading out.

This extension can we closely understood as all other DB functions
within PHP.

Now, there are pluses and minuses in doing this. In my head now are:

+1: It stabilizes database compatibility for PHP

+1: It creates a one-stop resource for Oracle users (over v8)

+1: There is less efforts maintaining, things can be very transparent

+1: It will be a change in PHP5, gaining so the credibility of new PHP
release for Oracle users. In a way, other languages support oracle
better than PHP does right now, thus such change will mean the
progress from both technological and marketing point of view. Keep
in mind, these who use Oracle, are almost always big enterprises or
organization

+1: Can add better chances to be added into the official and unofficial
DB abstraction layer

+1: Easier to find, use and document. It would be more intuitive for the
users that interact with more DB besides Oracle within PHP.


-1: Adds to confusion. For some time there will be lots of hassle why we
have three Oracle extension. That is why, I think, new extension
should start from PHP5. Gives us also more time

-1: Headaches with compatibility support. Some functions might not work
the same now as the Oracle might change in the feature, but that's
inevitable anyways and other DBs handle that too.

-1: There will be difficulties on choosing and migrating for the two
extensions supporting same DB version. For instance, many will
wonder better using oracle_connect() or OCILogon?. A problem?


As of features I see:

1. the closest datatypes support as possible

2. full PLSQL support

3. simpler and less restrictive variable binding

4. better query handling. being able to retrieve results number without
   fetching the whole statement etc
   
5. closer interaction with the server. There are a few things that only
   Oracle does and they might be nice to have. For instance like Abdul's
   patch
   
6. query shortcuts like in ora: (oracle_query())? This could be a
   simple2use way for querying the DB and getting the results instantly,
   without parsing and executing. An easy thing to do


 i have things like failover and connection pooling (for
 threaded servers) that i'd like to see in the future.

Threaded servers? That is awesome! 

-- 
Maxim Maletsky
[EMAIL PROTECTED]

www.PHPBeginner.com  // where PHP Begins



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Zeev Suraski
Well, I differ with you on that.  I don't think there's anything in the 
same class as ?xml.

Zeev

At 18:08 17/10/2002, Andi Gutmans wrote:
I don't think we should add special hacks to the scanner. Soon we're going 
to have a zillion hacks for other XML/SGML/foobar documents.

Andi

At 12:17 PM 10/16/2002 -0400, Ilia A. wrote:
Since the general consensus by the developers is not to remove the short_tags
or even disable them. Perhaps we should consider alternate solutions to this
problem. Given the buzzword popularity of XML and its slowly growing
popularity among website designers (XHTML) this issue is likely to come up in
the future yet again.
The solution I would like to offer, is a patch that adds special handling for
?xml. Thus preventing the language parser from attempting to parse data
inside ?xml as PHP source.

Ilia



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




[PHP-DEV] Identify Server

2002-10-18 Thread ^|CoOL|^ cRþSH
How can i identify what server is using an Ip...
 eg, 64.88.33.24 ---  apache..



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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Andrei Zmievski
On Thu, 17 Oct 2002, Derick Rethans wrote:
 On Thu, 17 Oct 2002, Andrei Zmievski wrote:
 
  I. Am. So. Tired. Of. Seeing. This. Come. Up. Over. And. Over. Again.
  
  The next time someone mentions this on the list, I'm grabbing a LART[1] and
  heading over to their house.
 
 So we're not going to turn it off by default? 

Come here, dear, I've got a present for you.

-Andrei   http://www.gravitonic.com/

Don't sweat it -- it's not real life.  It's only ones and zeroes.
   -- Gene Spafford

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




Re: [PHP-DEV] Identify Server

2002-10-18 Thread Derick Rethans
On Thu, 17 Oct 2002, ^|CoOL|^ cRþSH wrote:

 How can i identify what server is using an Ip...
  eg, 64.88.33.24 ---  apache..

lynx -dump -head http://$1/ | grep Server | cut  -d ':' -f 2 | sed 's/^[ ]//'

But this is the _wrong_ list for asking these questsions, see 
php.net/support.php.

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-DEV] parse_url still broken!

2002-10-18 Thread Thies C. Arntzen

url:
file:/bla/test

4.2.x output:
array(2) {
  [scheme]=
  string(4) file
  [path]=
  string(9) /bla/test
}

HEAD:
array(3) {
  [scheme]=
  string(4) file
  [host]=
  string(3) bla
  [path]=
  string(5) /test
}

re,
tc

-- 
Thies C. Arntzen   -   Looking for all sorts of freelance work  -   just ask..
  http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ

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




[PHP-DEV] OCI patch

2002-10-18 Thread predator79

Thies, Maxim, if you could hang on for a few hours I'll be back with a few ideas and a 
cleaned up version of the patches + a switch for oracle 9+ to enable the new nls 
functions.

Abdul


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




Re: [PHP-DEV] [PATCH] Changing entity charset

2002-10-18 Thread Wez Furlong
Err, I suggest you read that patch again.
The default will be the mbstring.internal_charset

That's not the same thing!

--Wez.

On Thu, 17 Oct 2002, Yasuo Ohgaki wrote:

 Wez Furlong wrote:
  Search for htmlentities charset.  Both myself and thies (and probably others
  were discussing this).
  In short: there are many, many, many people who have scripts that rely
  on htmlentities defaulting to iso-8859-1 (the documented default for ever).
 
 With the patch, ISO 8859-1 is default still.
 Therefore, I don't see problems.
 
 Do you see any problems other than this?
 
 I'm going to read archives more carefully, though I think even handling 
 the charset in phpinfo() will yield the same discussion in the future.
  
  
  This is a separate issue and nothing to do with changing the behaviour of
  htmlentities().
 
 Please no automatic entity conversion for phpinfo(), it's
 for debugging. i.e. It does not need 100% conformance to
 standards to be useful...
 
 --
 Yasuo Ohgaki
 
 
 


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




RE: [PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread James Cox
; charset=ISO-8859-1

 HEAD /test.phtml HTTP/1.1
 Host: localhost.localdomain
 If-Modified-Since: Fri, 18 Oct 2002 09:01:00 GMT

 HTTP/1.1 304 Not Modified
 Date: Fri, 18 Oct 2002 09:22:41 GMT
 Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g PHP/4.3.0-dev
 ETag: 8598-1e2-ca628400

 --- End Telnet ---

 As is evident in the last response from the server, the
 If-Modified-Since: header is not properly processed.

 After the patch is applied, the problem disappears:

 --- Telnet servername http requests and results after patch ---
 [rt@ns rt]$ telnet localhost http
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 HEAD /test.phtml HTTP/1.1
 Host: localhost.localdomain

 HTTP/1.1 200 OK
 Date: Fri, 18 Oct 2002 09:18:00 GMT
 Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g PHP/4.3.0-dev
 Accept-Ranges: bytes
 X-Powered-By: PHP/4.3.0-dev
 Last-Modified: Fri, 18 Oct 2002 09:10:00 GMT
 Content-Type: text/html; charset=ISO-8859-1

 HEAD /test.phtml HTTP/1.1
 Host: localhost.localdomain
 If-Modified-Since: Fri, 18 Oct 2002 09:09:00 GMT

 HTTP/1.1 200 OK
 Date: Fri, 18 Oct 2002 09:18:19 GMT
 Server: Apache/2.0.43 (Unix) mod_ssl/2.0.43 OpenSSL/0.9.6g PHP/4.3.0-dev
 Accept-Ranges: bytes
 X-Powered-By: PHP/4.3.0-dev
 Last-Modified: Fri, 18 Oct 2002 09:10:00 GMT
 Content-Type: text/html; charset=ISO-8859-1

 --- End Telnet ---

 The test result was obtained using CVS 20021018 (today's one). The
 system used is Red Hat Linux 6.2.

 Regards
 Ryo

 --
 R Takagi [EMAIL PROTECTED]


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




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




Re: [PHP-DEV] Re: [4.3] Current critical bugs

2002-10-18 Thread Ryo Takagi
 What actual patch did you add to ap2filter?
 
  -- james


The one with the look that you did not like... :-)

This patch was created based on 4.2.3 code but could successfully be
applied to the current CVS one as well.

--- sapi/apache2filter/sapi_apache2.c~  Fri Aug 16 07:27:03 2002
+++ sapi/apache2filter/sapi_apache2.c   Mon Oct 14 23:27:26 2002
@@ -558,14 +558,24 @@
return OK;
 }

+static int includes_setup(ap_filter_t *f)
+{
+/* We will ALWAYS set the no_local_copy value to 1 so
+ * that we will not send 304s.
+ */
+f-r-no_local_copy = 1;
+
+return OK;
+}
+
 static void php_register_hook(apr_pool_t *p)
 {
ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_insert_filter(php_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_read_request(php_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
-   ap_register_output_filter(PHP, php_output_filter, NULL, AP_FTYPE_RESOURCE);
-   ap_register_input_filter(PHP, php_input_filter, NULL, AP_FTYPE_RESOURCE);
+   ap_register_output_filter(PHP, php_output_filter, includes_setup, 
+AP_FTYPE_RESOURCE);
+   ap_register_input_filter(PHP, php_input_filter, includes_setup, 
+AP_FTYPE_RESOURCE);
 }

 AP_MODULE_DECLARE_DATA module php4_module = {

Regards
Ryo

-- 
R Takagi [EMAIL PROTECTED]


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/standard info.c

2002-10-18 Thread Marcus Börger
At 16:24 17.10.2002, Colin Viebrock wrote:

 Why did you remove the charset info?

 I want my charset back since it enables correct handling of the output.
 Everything these lines commented out by you do is telling the receiver
 what charset he gets. That is compareable to http charset info which
 will be generated by those modules also. This way you can enable
 mbsting or iconv with any charset you like.

 This has nothing to do with the other thing you did in this patch:
 changing behaviour of php_escape_html_entities(). I guess you did
 not understand what you removed?

No, I do understand what I did.  Every browser I tested displayed the
phpinfo() page correctly when the charset was not specified ... i.e.,
they guessed the right charset.

If you explicitly specify a charset, then you need to encode the
characters according to that character set.  The problem is, that
encodings such as eacute; and Auml; (which show up on the credits
page), don't work under all charsets/encodings.


We only show what we do this way. In other way we declare the
charset used in the TRANSPORT LAYER.

Please read w3c documentation:
http://www.w3.org/TR/html401/struct/global.html#adef-http-equiv
[...]
META and default information
The META element may be used to specify the default information for a 
document in the following instances:
[...]
·   The document character encoding.
The following example specifies the character encoding for a document as 
being ISO-8859-5
META http-equiv=Content-Type content=text/html; charset=ISO-8859-5
[...]

and also the referred document:
http://www.w3.org/TR/html401/charset.html#doc-char-set
[...]
For example, to specify that the character encoding of the current document 
is EUC-JP, a document should include the following META declaration:

META http-equiv=Content-Type content=text/html; charset=EUC-JP

The META declaration must only be used when the character encoding is 
organized such that ASCII-valued bytes stand for ASCII characters (at least 
until the META element is parsed). META declarations should appear as early 
as possible in the HEAD element.
For cases where neither the HTTP protocol nor the META element provides 
information about the character encoding of a document, HTML also provides 
the charset attribute on several elements. By combining these mechanisms, 
an author can greatly improve the chances that, when the user retrieves a 
resource, the user agent will recognize the character encoding.

To sum up, conforming user agents must observe the following priorities 
when determining a document's character encoding (from highest priority to 
lowest):
1. An HTTP charset parameter in a Content-Type field.
2. A META declaration with http-equiv set to Content-Type and a value 
set for charset.
3. The charset attribute set on an element that designates an external 
resource.
[...]


I will test it again, with the charset declaration back in, but I'm
relying on people with non-Western browsers and charsets for some
feedback on how the choice of charset affects the rendering of the pages.

- Colin



[PHP-DEV] #19771 - patch

2002-10-18 Thread Tal Peer
hello,
this patch tries to fix the performance issues described in bug #19771.
i cannot benchmark this at the moment, so if anyone can, please do.
the patch is available at http://tal.madcode.org/file.c.patch

and thanks to wez :)

Tal


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




[PHP-DEV] Re: #19771 - patch

2002-10-18 Thread Yasuo Ohgaki
Tal Peer wrote:

hello,
this patch tries to fix the performance issues described in bug #19771.
i cannot benchmark this at the moment, so if anyone can, please do.
the patch is available at http://tal.madcode.org/file.c.patch

and thanks to wez :)


Getting better, but it still too slow somehow...

[yohgakidev DEV]$ ./sapi/cli/php  t.php
-
markertime indexex time   perct
-
Start 1034946698.39588300   -   0.00%
-
fread 1034946698.41885300   0.022970080375671   4.36%
-
file  1034946698.82063700   0.40178394317627   76.32%
-
file_get_contents 1034946698.90671300   0.086076021194458  16.35%
-
fgets 1034946698.92197300   0.015259981155396   2.90%
-
Stop  1034946698.92232000   0.00034701824188232 0.07%
-
total - 0.52643704414368  100.00%
-

[yohgakidev DEV]$ cat t.php
?php
$filename = '/var/log/httpd/error_log.1';

require(Benchmark/Timer.php);
$time = new Benchmark_Timer;

$time - setMarker('Start');

$fp = fopen($filename,'r');
for ($i = 0; $i100; $i++)
  $s = explode(\n, fread($fp, filesize($filename)));
fclose($fp);

$time - setMarker('fread');

for ($i = 0; $i100; $i++)
  $s = file($filename);
$time - setMarker('file');

for ($i = 0; $i100; $i++)
  $s = file_get_contents($filename);
$time - setMarker('file_get_contents');

$fp = fopen($filename,'r');
for ($i = 0; $i100; $i++)
  $s = explode(\n, fgets($fp,filesize($filename)));
$time - setMarker('fgets');
fclose($fp);

$time - setMarker('Stop');
$time - display();
?


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




Re: [PHP-DEV] Re: #19771 - patch

2002-10-18 Thread Derick Rethans
On Fri, 18 Oct 2002, Yasuo Ohgaki wrote:

 Tal Peer wrote:
  hello,
  this patch tries to fix the performance issues described in bug #19771.
  i cannot benchmark this at the moment, so if anyone can, please do.
  the patch is available at http://tal.madcode.org/file.c.patch
  
  and thanks to wez :)
 
 Getting better, but it still too slow somehow...

How big is that file you tested?

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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




[PHP-DEV] Re: #19771 - patch

2002-10-18 Thread Yasuo Ohgaki
Yasuo Ohgaki wrote:

Tal Peer wrote:


hello,
this patch tries to fix the performance issues described in bug #19771.
i cannot benchmark this at the moment, so if anyone can, please do.
the patch is available at http://tal.madcode.org/file.c.patch

and thanks to wez :)



Getting better, but it still too slow somehow...


Never mind. There is stupid mistake in the script...
It should be Ok.

[yohgakidev DEV]$ ./sapi/cli/php  t.php
-
markertime indexex time   perct
-
Start 1034947649.40024700   -   0.00%
-
fread 1034947649.82932800   0.42908096313477   44.84%
-
file  1034947650.23224900   0.40292108058929   42.11%
-
file_get_contents 1034947650.32007600   0.087826967239389.18%
-
fgets 1034947650.35698600   0.036910057067871   3.86%
-
Stop  1034947650.35716300   0.00017690658569336 0.02%
-
total - 0.956915974617100.00%
-


[yohgakidev DEV]$ cat t.php
?php
$filename = '/var/log/httpd/error_log.1';

require(Benchmark/Timer.php);
$time = new Benchmark_Timer;

$time - setMarker('Start');

for ($i = 0; $i100; $i++) {
  $fp = fopen($filename,'r');
  $s = explode(\n, fread($fp, filesize($filename)));
  fclose($fp);
}

$time - setMarker('fread');

for ($i = 0; $i100; $i++)
  $s = file($filename);
$time - setMarker('file');

for ($i = 0; $i100; $i++)
  $s = file_get_contents($filename);
$time - setMarker('file_get_contents');

for ($i = 0; $i100; $i++) {
  $fp = fopen($filename,'r');
  //$s = explode(\n, fgets($fp,filesize($filename)));
  $s = explode(\n, fgets($fp));
  fclose($fp);
}
$time - setMarker('fgets');

$time - setMarker('Stop');
$time - display();
?


[yohgakidev DEV]$


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




[PHP-DEV] Re: #19771 - patch

2002-10-18 Thread Yasuo Ohgaki
Tal Peer wrote:

hello,
this patch tries to fix the performance issues described in bug #19771.
i cannot benchmark this at the moment, so if anyone can, please do.
the patch is available at http://tal.madcode.org/file.c.patch

and thanks to wez :)



It's not related to file(), but I found another problem.
Sorry, I don't have time look into.


[yohgakidev DEV]$ ./sapi/cli/php t.php
-
markertime indexex time   perct
-
Start 1034948606.60534400   -   0.00%
-
Stop  1034948607.94562700   1.3402829170227   100.00%
-
total - 1.3402829170227   100.00%
-


/home/yohgaki/cvs/php.net/DEV/Zend/zend_hash.c(406) :  Freeing 0x08E84D74 (35 bytes), script=t.php
Last leak repeated 47438 times
/home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(846) :  Freeing 0x08E84D3C (1 bytes), script=t.php
Last leak repeated 47438 times
/home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(845) :  Freeing 0x08E84CFC (12 bytes), script=t.php
Last leak repeated 47438 times
/home/yohgaki/cvs/php.net/DEV/Zend/zend_hash.c(440) :  Freeing 0x08E3E5EC (32768 bytes), script=t.php
Last leak repeated 8 times
/home/yohgaki/cvs/php.net/DEV/ext/standard/string.c(796) :  Freeing 0x08AED524 (44 bytes), script=t.php
/home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(565) : Actual location (location was relayed)
Last leak repeated 8 times
[yohgakidev DEV]$ cat t.php
?php
$filename = 'libtool';

require(Benchmark/Timer.php);
$time = new Benchmark_Timer;

$time - setMarker('Start');

$s = '';
for ($i = 0; $i10; $i++) {
  $fp = fopen($filename,'r');
  while (!feof($fp))
 $s .= fgets($fp);
  $s = explode(\n, $s);
  fclose($fp);
}

$time - setMarker('Stop');
$time - display();
?


[yohgakidev DEV]$


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Tom Sommer
Andi Gutmans wrote:

I don't see why it's such a big deal for people who are creating xml to 
turn-off short tags?

Me neither, I use short tags all the time, but thats just me :)


--
* Tom Sommer
* http://www.tsn.dk | webmaster(a)tsn.dk
* Any sufficiently advanced bug is indistinguishable from a feature


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Rasmus Lerdorf
On Fri, 18 Oct 2002, Andi Gutmans wrote:

 At 01:09 AM 10/18/2002 +0200, Zeev Suraski wrote:
 At 18:49 17/10/2002, Rasmus Lerdorf wrote:
 ?xml ()? has whitespace.
 
 And I personally think it's a bit pushing it.  How likely is it for
 someone to have a function called xml(), and then call it without a space
 from the ? tag, and then add a space before the parentheses?  I think we
 can safely ignore that one...

 I don't see why it's such a big deal for people who are creating xml to
 turn-off short tags?

The big deal is not really XML.  It is XHTML and authoring tools that try
to be too smart and stick an XML character encoding tag at the top of a
file automatically.

-Rasmus


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




Re: [PHP-DEV] short_open_tag

2002-10-18 Thread Melvyn Sopacua
At 18:08 18-10-2002, Rasmus Lerdorf wrote:


On Fri, 18 Oct 2002, Andi Gutmans wrote:

 At 01:09 AM 10/18/2002 +0200, Zeev Suraski wrote:
 At 18:49 17/10/2002, Rasmus Lerdorf wrote:
 ?xml ()? has whitespace.
 
 And I personally think it's a bit pushing it.  How likely is it for
 someone to have a function called xml(), and then call it without a space
 from the ? tag, and then add a space before the parentheses?  I think we
 can safely ignore that one...

 I don't see why it's such a big deal for people who are creating xml to
 turn-off short tags?

The big deal is not really XML.



Well - apart from this:
/foo.xml:
?xml version=1.0 encoding=ISO-8859-1?timestamp?php echo 
$timestamp; ?/timestamp

bar.php:
include('foo.xml');

This is a simple example, but results of transformations using the 'php PI' 
are not uncommon
For instanse to solve problems, xslt's simplicity can't solve (variable 
scope's mostly) or process pre-processed documents to gain speed, but rely 
on the current request for some parts of the page (like profiling or simple 
stuff like banners).

But really: should a novice be dealing with XML, when he/she cannot 
understand why short tags can be a problem and thus - is it wise to 'aid' 
novices by making it easier? Are they not helped more, when ?xml fails and 
short tags are on?

I know that this will not apply to a hosting situation, but isn't that what 
the new ini file structure is for? So that hosting companies have the 
ability to set options on a per-user basis?

And yes - this thread is way too long :)

P.S. Andi/Zeev - please keep an 18 minute lag when you argue with eachother 
- it cannot be healthy to switch personalities more often than that -:)



Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua


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



[PHP-DEV] Understanding build on Win32

2002-10-18 Thread Maxim Maletsky

Hi,

I am trying to understand better about building Win32 copy correctly
with Visual Studio 6 Enterprise. The only documentation I found so far
was

http://www.php.net/manual/en/install.windows.php#install.windows.manual

which, besides not really being what I need, looks also a bit outdated
(isn't it?).


Can anyone help me out with some tips for this? My main need is
testing the extension's changes.

Things I am unsure of:

1. What dsp should I start compiling from for testing?

2. What VC settings do I need to make?

3. Is there any documentation for compiling and testing on Win32?

4. Any batch file samples for a frequent use?

5. Any more good advices, best practices or things that I should know?

I rarely see it covered (which in a way makes sense :)

Cheers,
 
Maxim Maletsky
[EMAIL PROTECTED]


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




Re: [PHP-DEV] Understanding build on Win32

2002-10-18 Thread Markus Fischer
On Fri, Oct 18, 2002 at 10:17:21PM +0200, Maxim Maletsky wrote : 
 1. What dsp should I start compiling from for testing?

php4ts.dsw
 
 2. What VC settings do I need to make?

Select the target you like to compile, apache sapi or
php4ts_cli for example.

 
 3. Is there any documentation for compiling and testing on Win32?

Just hit F7 and compile the standard distribution. Maybe some
libs are required, but I think you can figure them out. Just
don't forget to proper set up
http://www.php.net/extra/win32build.zip before.

If you want to compile additional extension, they usually
have their own *.dsp in their directory and require certain
kind of libs/headers. Where to put them or what to configure
is most of the them gathered from the *.dsp itself ...

 
 4. Any batch file samples for a frequent use?

Nope, MSVC makefiels.

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
$ grep docref_root php.ini
docref_root = 
http://landonize.it/?how=urltheme=classicfilter=RichyHuser=imajesurl=http%3A%2F%2Fphp.net%2F/;

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




Re: [PHP-DEV] Understanding build on Win32

2002-10-18 Thread Maxim Maletsky

Thanks, Markus, that was helpful.

Would you like to also explain me more about the 'testsuite' dsw? i
couldn't figure it out because all i could see about it is the compile
logs over the archives :)


-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Fri, 18 Oct 2002 23:20:45 +0200 Markus Fischer [EMAIL PROTECTED] wrote:

 On Fri, Oct 18, 2002 at 10:17:21PM +0200, Maxim Maletsky wrote : 
  1. What dsp should I start compiling from for testing?
 
 php4ts.dsw
  
  2. What VC settings do I need to make?
 
 Select the target you like to compile, apache sapi or
 php4ts_cli for example.
 
  
  3. Is there any documentation for compiling and testing on Win32?
 
 Just hit F7 and compile the standard distribution. Maybe some
 libs are required, but I think you can figure them out. Just
 don't forget to proper set up
 http://www.php.net/extra/win32build.zip before.
 
 If you want to compile additional extension, they usually
 have their own *.dsp in their directory and require certain
 kind of libs/headers. Where to put them or what to configure
 is most of the them gathered from the *.dsp itself ...
 
  
  4. Any batch file samples for a frequent use?
 
 Nope, MSVC makefiels.
 
 -- 
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 $ grep docref_root php.ini
 docref_root = 
http://landonize.it/?how=urltheme=classicfilter=RichyHuser=imajesurl=http%3A%2F%2Fphp.net%2F/;
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP-DEV] duplicate string, no dupe, ?

2002-10-18 Thread Rasmus Lerdorf
I'm trying to optimize some code for an *extremely* busy site.  This site
has a bunch of data in shared memory to make it available across all the
httpd's.  I need to provide this data in the form of arrays to user-space
PHP through an extension obviously.  Rather trivial to do, but my problem
is that I need to estrndup() this stuff to make PHP happy.  This is
slowing me down.  If I don't dupe the data then PHP will try to efree() it
which is a no-no since this is an external pointer.

Instead of a normal array_init(return_value) could I zend_hash_init() my
own hash and still set it to be an array but provide my own DTOR function
which will not free these pointers?

-Rasmus


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




Re: [PHP-DEV] duplicate string, no dupe, ?

2002-10-18 Thread Rasmus Lerdorf
On Fri, 18 Oct 2002, Rasmus Lerdorf wrote:

 I'm trying to optimize some code for an *extremely* busy site.  This site
 has a bunch of data in shared memory to make it available across all the
 httpd's.  I need to provide this data in the form of arrays to user-space
 PHP through an extension obviously.  Rather trivial to do, but my problem
 is that I need to estrndup() this stuff to make PHP happy.  This is
 slowing me down.  If I don't dupe the data then PHP will try to efree() it
 which is a no-no since this is an external pointer.

 Instead of a normal array_init(return_value) could I zend_hash_init() my
 own hash and still set it to be an array but provide my own DTOR function
 which will not free these pointers?

Never mind, I had made a dumb mistake in my test code.  This approach does
work.

-Rasmus


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




Re: [PHP-DEV] parse_url still broken!

2002-10-18 Thread Ilia A.
Also fixed.

Ilia

On October 18, 2002 06:37 am, Thies C. Arntzen wrote:
 url:
 file:/bla/test

 4.2.x output:
 array(2) {
   [scheme]=
   string(4) file
   [path]=
   string(9) /bla/test
 }

 HEAD:
 array(3) {
   [scheme]=
   string(4) file
   [host]=
   string(3) bla
   [path]=
   string(5) /test
 }

 re,
 tc


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




[PHP-DEV] CVS Account Request: iwakiri

2002-10-18 Thread Youichi Iwakiri
I would like to help i18n related development
including mbstring, manual maintenance (English
and Japanese) and maintain some PECL module like
namazu.

Access requested: php4, pear, phpdoc and phpdoc-ja

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




Re: [PHP-DEV] Re: Apache 2 incorrect 304 response to If-Modified-Since

2002-10-18 Thread TAKAGI Ryo
Sorry, I found the CVS snapshot extracted on 20021016, but I now found
the problem not fixed. Either my test environment is not good, or my
ability to check all through it is insufficient...

Anyway,

 I don't particularly like the look of this patch... we should fix 304's
 properly...

However, the patch resolved the problem also on the 20021016 snapshot.

  
   --- sapi/apache2filter/sapi_apache2.c~  Fri Aug 16 07:27:03 2002
   +++ sapi/apache2filter/sapi_apache2.c   Mon Oct 14 23:27:26 2002
   @@ -558,14 +558,24 @@
   return OK;
}
  
   +static int includes_setup(ap_filter_t *f)
   +{
   +/* We will ALWAYS set the no_local_copy value to 1 so
   + * that we will not send 304s.
   + */
   +f-r-no_local_copy = 1;
   +
   +return OK;
   +}
   +
static void php_register_hook(apr_pool_t *p)
{
   ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
   ap_hook_post_config(php_apache_server_startup, NULL,
  NULL, APR_HOOK_MIDDLE);
   ap_hook_insert_filter(php_insert_filter, NULL, NULL,
  APR_HOOK_MIDDLE);
   ap_hook_post_read_request(php_post_read_request, NULL,
  NULL, APR_HOOK_MIDDLE);
   -   ap_register_output_filter(PHP, php_output_filter,
  NULL, AP_FTYPE_RESOURCE);
   -   ap_register_input_filter(PHP, php_input_filter, NULL,
  AP_FTYPE_RESOURCE);
   +   ap_register_output_filter(PHP, php_output_filter,
  includes_setup, AP_FTYPE_RESOURCE);
   +   ap_register_input_filter(PHP, php_input_filter,
  includes_setup, AP_FTYPE_RESOURCE);
}
  
AP_MODULE_DECLARE_DATA module php4_module = {
  
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


-- 
TAKAGI Ryo [EMAIL PROTECTED]



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