Re: [PHP-DEV] PHP web farms (i.e. why msession or something like it)

2002-05-29 Thread Steve Meyers

[EMAIL PROTECTED] wrote:

 At 10:20 25/05/2002 -0400, [EMAIL PROTECTED] wrote:
 Marginalizing this capability IMHO is not the right direction, I think
 there should, in fact, be a stronger push for this sort of capability to
 be built in by default.
 
 Agree with that too... but if something like this should be
 mainstream, all components should in be in the PHP source tree, including
 the daemon.
 

I personally think the best solution would be something like the postgresql 
session extension, except generalized to work with any (or at least 
several) databases.  Built-in MySQL session support is definitely needed.

Right now I don't run any web farms, but I used to work for a company with 
125+ web servers, so I understand the problem.

Steve Meyers

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




[PHP-DEV] CVS Account Request: archiweb

2002-05-29 Thread archiweb

help

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




Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to bepassed by reference]

2002-05-29 Thread Stig S. Bakken

If this patch doesn't break anything, and it doesn't give us any
difficulties with ZE2 or major design issues, I'm +1.

 - Stig

On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
 Due to this patch being sent during the msession discussion, it has not
 been noticed, so I am resending.
 
 
 -Jason
 
 

 From: Jason Greene [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed by reference
 Date: 25 May 2002 02:18:52 -0500
 
 Problem
 ---
 
 There are some scenarios where a function requires the ability to modify
 parameters that may also be optional. Optional parameters work well,
 except in the scenario where all of the pass by reference parameters can
 be optional. ex the socket_select() function. Since select is
 argument-result, all three arrays that are taken as input must be passed
 by reference, yet any can be excluded. So for example if you were
 calling socket_select with a read socket array, a write socket array,
 yet no exception array (quite common), you are currently forced to do
 something like the following:
 
 $wfds = array($sock1, $sock2);
 $rfds = array($sock3, $sock4);
 $null = NULL;
 
 socket_select($rfds, $wfds, $null);
 
 
 I have ran into this problem before several times while developing in
 user space. (Especially when passing around semi-complex data
 structures)
 
 Proposed Solution
 --
 
 Allow all expressions to be passed by reference. This will allow
 something like the following
 
 function  normalize($element_tree, $node_mapping, $max_depth){
 //Code
 }
 
 normalize($my_tree, NULL, 25000);
 
 
 Patch
 --
 
 I have attached a patch against ZE2 that accomplishes this. 
 
 
 Thanks,
 -Jason
 
 
 
 
 
 
 

 Index: zend_compile.c
 ===
 RCS file: /repository/ZendEngine2/zend_compile.c,v
 retrieving revision 1.285
 diff -u -r1.285 zend_compile.c
 --- zend_compile.c23 Apr 2002 18:06:53 -  1.285
 +++ zend_compile.c25 May 2002 06:45:21 -
 @@ -1271,7 +1271,7 @@
   op = ZEND_SEND_REF;
   break;
   default:
 - zend_error(E_COMPILE_ERROR, Only variables can be 
passed by reference);
 + op = ZEND_SEND_VAR;
   break;
   }
   }
 Index: zend_execute.c
 ===
 RCS file: /repository/ZendEngine2/zend_execute.c,v
 retrieving revision 1.341
 diff -u -r1.341 zend_execute.c
 --- zend_execute.c8 May 2002 18:43:19 -   1.341
 +++ zend_execute.c25 May 2002 06:45:25 -
 @@ -2292,10 +2292,6 @@
   NEXT_OPCODE();
   }
   case ZEND_SEND_VAL: 
 - if (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
 -  
ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc), 
EX(fbc)-common.arg_types)) {
 - zend_error(E_ERROR, Cannot pass 
parameter %d by reference, EX(opline)-op2.u.opline_num);
 - }
   {
   zval *valptr;
   zval *value;
 @@ -2329,7 +2325,8 @@
   
zend_ptr_stack_push(EG(argument_stack), varptr);
   NEXT_OPCODE();
   }
 - zend_error(E_ERROR, Only variables can be 
passed by reference);
 + /* Should only occur with an uninitialized 
variable */
 + goto send_by_var;
   }
   NEXT_OPCODE();
   case ZEND_SEND_VAR:
 
 
 

 -- 
 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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP linux binary and Super global variables

2002-05-29 Thread Alessandro Astarita

Stig S. Bakken wrote:
 Are you sure that it is in fact the CGI binary you are using?  The CLI
 version of PHP will not register these variables. 

I have php 4.2.1 binary installed as CLI and $_SERVER is registered.

[asterix@apenguin asterix]$ php -v
4.2.1
[asterix@apenguin asterix]$ php -r 'var_dump(PHP_SAPI);'
string(3) cli
[asterix@apenguin asterix]$ php -r 'var_dump($_SERVER);' | head
array(32) {
  [PWD]=
  string(13) /home/asterix
  [XAUTHORITY]=
  string(25) /home/asterix/.Xauthority
  [KONSOLE_DCOP]=
  string(29) DCOPRef(konsole-1482,konsole)
  [GS_LIB]=
  string(30) /home/asterix/.kde/share/fonts
  [HOSTNAME]=
[asterix@apenguin asterix]$

-- 
Alessandro 'Asterix' Astarita [EMAIL PROTECTED]
Unix IS user friendly. It's just selective about who its friends are

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




Re: [PHP-DEV] PHP web farms (i.e. why msession or something like it)

2002-05-29 Thread mlwmohawk

 [EMAIL PROTECTED] wrote: 
  
 At 10:20 25/05/2002 -0400, [EMAIL PROTECTED] wrote: 
 Marginalizing this capability IMHO is not the right direction, I 
 think there should, in fact, be a stronger push for this sort of 
 capability to be built in by default. 
  
 Agree with that too... but if something like this should be 
 mainstream, all components should in be in the PHP source tree, 
 including the daemon. 
  
  
 I personally think the best solution would be something like the 
 postgresql  session extension, except generalized to work with any (or 
 at least  several) databases.  Built-in MySQL session support is 
 definitely needed. 
 
The problem with using databases are they they are expensive and they are slow. 
 
A generalized PostgreSQL session manager would be cool, I have actually been thinking 
about such an 
extension. Using the schema from the PG msession plugin, it would be fairly easy. 
Alas, the problems with 
PostgreSQL as a session manager are many. MySQL is just as bad, but for different 
reasons. :-) 
 
It is because the databases fall flat as session managers that I wrote msession in the 
first place. 
 
  
 Right now I don't run any web farms, but I used to work for a company 
 with  125+ web servers, so I understand the problem. 
 
125??!! All serving the same content? All maintaining a coherent environment? What did 
you use for session 
data?  
 
 


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




[PHP-DEV] Client socket

2002-05-29 Thread Vinod Panicker

Hi,

Continuing with the problem that I've been having...

I made changes to the php_apache.c file and added a new php function of
my own, which is supposed to return the client socket when called from a
php script.  Here is the code for the function - 

---

/* {{{ proto int apache_client_socket()
   Get the client socket */
PHP_FUNCTION(apache_client_socket)
{
RETURN_LONG(((request_rec
*)SG(server_context))-connection-client-fd);
}

---

I recompiled php and made a module out of it.  Worked perfectly.  Now, I
wrote a php script with the following code - 

---
?
echo apache_client_socket();
?
---

This script I call from the browser, and everytime it displays a '3'.  I
even called it from different browser windows, still the same.

That cant be alright since if the fd is 3 as shown in one browser
window, it has to be something different in the other window since the
browser defaults to a keep-alive connection, and the fd's have to be
different.

I'll would tell you why I need the socket, but I've described it so many
times that I'm gonna die :(  I'll forward you a mail if you are really
interested.

Tx,
Vinod.

---
Vinod Panicker [EMAIL PROTECTED]
Sr. Software Designer
Geodesic Information Systems Ltd. 


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




Re: [PHP-DEV] SOAP, XMLRPC and WSDL

2002-05-29 Thread ahristov

 As phpsuft said Brad Lafountain is working on the php_soap module. I'm
writing my bachelor thesis on its basis and I can say that it is quite
stable for alpha(Brad says it is alpha). I have not tested interoperability
with other SOAP enoviroments but PHP to PHP is working very well. I had
problems when wanted to transfer Cyrilic text from the server to the
client - the communication fails. Also there is a problem with oupt
buffering - if the programmer does not close every ob_start() the module
crashes. This is because Brad wants to suppress any output from the script
and does this by using ob_start() ob_end_clean() in the module space.
The speed is not bad. I've tested a simple Hello World examples and the
result is thata php_SOAP is 3 times faster than XMLRPC extension and many
many times than SOAPx4 now called NuSOAP (of course it is in the user
space). If the service method is fast than most of the time is spent in the
Zend part - compiling the PHP. I've tested my sources and can say that it
tooks Zend to start presence.php 15 and the time to enter in the method is
16ms - so 1ms to process the request.

Best regards,
Andrey Hristov

- Original Message -
From: Lukas Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 23, 2002 4:57 PM
Subject: [PHP-DEV] SOAP, XMLRPC and WSDL


Aloha,

What is the current status in terms of SOAP, XMLRPC and WSDL in php?

How mature are the solutions?
When will they be ready for primetime?
Does anyone already use them in production (that can be used to show off
how great the support is) or are there any other prominent examples? (I
know the pear installer uses XMLRPC and Sebastian did something with
Googles Webservices)

I think getting a status on this might be of general interest, but if
you don't feel so you can send an email to me directly.

The reason I am asking is because a while back I used a Java Tool for a
presentation. I later talked to some of the developers via mail and they
asked me to keep them posted on the development inside PHP.

Best regards,
Lukas Smith
[EMAIL PROTECTED]
___
 DybNet Internet Solutions GbR
 Reuchlinstr. 10-11
 Gebäude 4 1.OG Raum 6 (4.1.6)
 10553 Berlin
 Germany
 Tel. : +49 30 83 22 50 00
 Fax  : +49 30 83 22 50 07
 www.dybnet.de [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




[PHP-DEV] Re: Client socket

2002-05-29 Thread J Smith


Since apache is multi-processed rather than multi-threaded, I'd imagine that 
you're getting the same socket file descriptor since each new connection 
means a new fork of httpd, resulting in three file descriptors by the time 
you get to what you're doing.

Are you trying to get ahold of the socket/port number itself? Or connect to 
the actual socket? 

J


Vinod Panicker wrote:

 Hi,
 
 Continuing with the problem that I've been having...
 
 I made changes to the php_apache.c file and added a new php function of
 my own, which is supposed to return the client socket when called from a
 php script.  Here is the code for the function -
 
 ---
 
 /* {{{ proto int apache_client_socket()
Get the client socket */
 PHP_FUNCTION(apache_client_socket)
 {
 RETURN_LONG(((request_rec
 *)SG(server_context))-connection-client-fd);
 }
 
 ---
 
 I recompiled php and made a module out of it.  Worked perfectly.  Now, I
 wrote a php script with the following code -
 
 ---
 ?
 echo apache_client_socket();
 ?
 ---
 
 This script I call from the browser, and everytime it displays a '3'.  I
 even called it from different browser windows, still the same.
 
 That cant be alright since if the fd is 3 as shown in one browser
 window, it has to be something different in the other window since the
 browser defaults to a keep-alive connection, and the fd's have to be
 different.
 
 I'll would tell you why I need the socket, but I've described it so many
 times that I'm gonna die :(  I'll forward you a mail if you are really
 interested.
 
 Tx,
 Vinod.
 
 ---
 Vinod Panicker [EMAIL PROTECTED]
 Sr. Software Designer
 Geodesic Information Systems Ltd.


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




[PHP-DEV] CVS Account Request: surfmax

2002-05-29 Thread Taniel Silva Franklin

I should like to participate of the manual Pt_BR translation. I want have acess the 
PHP-doc, PHP_pt_BR, and other directories necessary for to do translation.

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




[PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread Andi Gutmans

I don't see any reason to allow passing non-variables by reference.
It is semantically incorrect.

Andi

At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:
If this patch doesn't break anything, and it doesn't give us any
difficulties with ZE2 or major design issues, I'm +1.

  - Stig

On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
  Due to this patch being sent during the msession discussion, it has not
  been noticed, so I am resending.
 
 
  -Jason
  
 

  From: Jason Greene [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
  Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed 
 by reference
  Date: 25 May 2002 02:18:52 -0500
 
  Problem
  ---
 
  There are some scenarios where a function requires the ability to modify
  parameters that may also be optional. Optional parameters work well,
  except in the scenario where all of the pass by reference parameters can
  be optional. ex the socket_select() function. Since select is
  argument-result, all three arrays that are taken as input must be passed
  by reference, yet any can be excluded. So for example if you were
  calling socket_select with a read socket array, a write socket array,
  yet no exception array (quite common), you are currently forced to do
  something like the following:
 
  $wfds = array($sock1, $sock2);
  $rfds = array($sock3, $sock4);
  $null = NULL;
 
  socket_select($rfds, $wfds, $null);
 
 
  I have ran into this problem before several times while developing in
  user space. (Especially when passing around semi-complex data
  structures)
 
  Proposed Solution
  --
 
  Allow all expressions to be passed by reference. This will allow
  something like the following
 
  function  normalize($element_tree, $node_mapping, $max_depth){
  //Code
  }
 
  normalize($my_tree, NULL, 25000);
 
 
  Patch
  --
 
  I have attached a patch against ZE2 that accomplishes this.
 
 
  Thanks,
  -Jason
 
 
 
 
 
  
 

  Index: zend_compile.c
  ===
  RCS file: /repository/ZendEngine2/zend_compile.c,v
  retrieving revision 1.285
  diff -u -r1.285 zend_compile.c
  --- zend_compile.c23 Apr 2002 18:06:53 -  1.285
  +++ zend_compile.c25 May 2002 06:45:21 -
  @@ -1271,7 +1271,7 @@
op = ZEND_SEND_REF;
break;
default:
  - zend_error(E_COMPILE_ERROR, Only 
 variables can be passed by reference);
  + op = ZEND_SEND_VAR;
break;
}
}
  Index: zend_execute.c
  ===
  RCS file: /repository/ZendEngine2/zend_execute.c,v
  retrieving revision 1.341
  diff -u -r1.341 zend_execute.c
  --- zend_execute.c8 May 2002 18:43:19 -   1.341
  +++ zend_execute.c25 May 2002 06:45:25 -
  @@ -2292,10 +2292,6 @@
NEXT_OPCODE();
}
case ZEND_SEND_VAL:
  - if 
 (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
  -  
 ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc), 
 EX(fbc)-common.arg_types)) {
  - zend_error(E_ERROR, 
 Cannot pass parameter %d by reference, EX(opline)-op2.u.opline_num);
  - }
{
zval *valptr;
zval *value;
  @@ -2329,7 +2325,8 @@
  
 zend_ptr_stack_push(EG(argument_stack), varptr);
NEXT_OPCODE();
}
  - zend_error(E_ERROR, Only 
 variables can be passed by reference);
  + /* Should only occur with an 
 uninitialized variable */
  + goto send_by_var;
}
NEXT_OPCODE();
case ZEND_SEND_VAR:
 
  
 

  --
  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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PHP web farms (i.e. why msession or something like it)

2002-05-29 Thread Steve Meyers

[EMAIL PROTECTED] wrote:
 The problem with using databases are they they are expensive and they are
 slow.
  
 A generalized PostgreSQL session manager would be cool, I have actually
 been thinking about such an extension. Using the schema from the PG
 msession plugin, it would be fairly easy. Alas, the problems with
 PostgreSQL as a session manager are many. MySQL is just as bad, but for
 different reasons. :-)
  
 It is because the databases fall flat as session managers that I wrote
 msession in the first place.
  
I agree that msession is better than using MySQL or PostgreSQL as a session 
manager.  However, most people who use PHP on web farms already have some 
sort of database set up, so it seems logical to me to be able to use it for 
storing sessions.  MySQL actually isn't too bad, as long as you use HASH 
(in-memory) tables.

  
 Right now I don't run any web farms, but I used to work for a company
 with  125+ web servers, so I understand the problem.
  
 125??!! All serving the same content? All maintaining a coherent
 environment? What did you use for session data?

MySQL.  They weren't all serving the same content, but almost all of them 
were sharing a session.

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




RE: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread phpsurf

the problem is that if you define some function :

function someFunc(myParam) {
 ...
 }

then you can call :
someFunc($someVar);

but not :
define(MY_CONSTANT, 0);
someFunc(MY_CONSTANT);

the goal is not to pass a constant by reference, but to be allowed to
(exceptionnaly) pass a constant as a parameter to a function that was
designed to receive parameters by reference.

and this could also let people define default values for params and still
have them passed by reference ...

 -Original Message-
 From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
 Sent: mercredi 29 mai 2002 17:26
 To: Stig S. Bakken; Jason T. Greene
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH]
 Allow constants / expressions to be passed by reference]


 I don't see any reason to allow passing non-variables by reference.
 It is semantically incorrect.

 Andi

 At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:
 If this patch doesn't break anything, and it doesn't give us any
 difficulties with ZE2 or major design issues, I'm +1.
 
   - Stig
 
 On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
   Due to this patch being sent during the msession discussion,
 it has not
   been noticed, so I am resending.
  
  
   -Jason
   
  
 
   From: Jason Greene [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed
  by reference
   Date: 25 May 2002 02:18:52 -0500
  
   Problem
   ---
  
   There are some scenarios where a function requires the
 ability to modify
   parameters that may also be optional. Optional parameters work well,
   except in the scenario where all of the pass by reference
 parameters can
   be optional. ex the socket_select() function. Since select is
   argument-result, all three arrays that are taken as input
 must be passed
   by reference, yet any can be excluded. So for example if you were
   calling socket_select with a read socket array, a write socket array,
   yet no exception array (quite common), you are currently forced to do
   something like the following:
  
   $wfds = array($sock1, $sock2);
   $rfds = array($sock3, $sock4);
   $null = NULL;
  
   socket_select($rfds, $wfds, $null);
  
  
   I have ran into this problem before several times while developing in
   user space. (Especially when passing around semi-complex data
   structures)
  
   Proposed Solution
   --
  
   Allow all expressions to be passed by reference. This will allow
   something like the following
  
   function  normalize($element_tree, $node_mapping, $max_depth){
   //Code
   }
  
   normalize($my_tree, NULL, 25000);
  
  
   Patch
   --
  
   I have attached a patch against ZE2 that accomplishes this.
  
  
   Thanks,
   -Jason
  
  
  
  
  
   
  
 
   Index: zend_compile.c
   ===
   RCS file: /repository/ZendEngine2/zend_compile.c,v
   retrieving revision 1.285
   diff -u -r1.285 zend_compile.c
   --- zend_compile.c23 Apr 2002 18:06:53 -  1.285
   +++ zend_compile.c25 May 2002 06:45:21 -
   @@ -1271,7 +1271,7 @@
 op = ZEND_SEND_REF;
 break;
 default:
   - zend_error(E_COMPILE_ERROR, Only
  variables can be passed by reference);
   + op = ZEND_SEND_VAR;
 break;
 }
 }
   Index: zend_execute.c
   ===
   RCS file: /repository/ZendEngine2/zend_execute.c,v
   retrieving revision 1.341
   diff -u -r1.341 zend_execute.c
   --- zend_execute.c8 May 2002 18:43:19 -   1.341
   +++ zend_execute.c25 May 2002 06:45:25 -
   @@ -2292,10 +2292,6 @@
 NEXT_OPCODE();
 }
 case ZEND_SEND_VAL:
   - if
  (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
   - 
  ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc),
  EX(fbc)-common.arg_types)) {
   - zend_error(E_ERROR,
  Cannot pass parameter %d by reference, EX(opline)-op2.u.opline_num);
   - }
 {
 zval *valptr;
 zval *value;
   @@ -2329,7 +2325,8 @@
  
  zend_ptr_stack_push(EG(argument_stack), varptr);
 NEXT_OPCODE();
 }
   - zend_error(E_ERROR, Only
  variables can be passed by reference);
   + /* Should only occur with an
  

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread brad lafountain

I have ran into this limitation too

or something like

foo();
or
foo($bar);

function foo($bar = null)
{
}


--- Andi Gutmans [EMAIL PROTECTED] wrote:
 I don't see any reason to allow passing non-variables by reference.
 It is semantically incorrect.
 
 Andi
 
 At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:
 If this patch doesn't break anything, and it doesn't give us any
 difficulties with ZE2 or major design issues, I'm +1.
 
   - Stig
 
 On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
   Due to this patch being sent during the msession discussion, it has not
   been noticed, so I am resending.
  
  
   -Jason
   
  
 
   From: Jason Greene [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed 
  by reference
   Date: 25 May 2002 02:18:52 -0500
  
   Problem
   ---
  
   There are some scenarios where a function requires the ability to modify
   parameters that may also be optional. Optional parameters work well,
   except in the scenario where all of the pass by reference parameters can
   be optional. ex the socket_select() function. Since select is
   argument-result, all three arrays that are taken as input must be passed
   by reference, yet any can be excluded. So for example if you were
   calling socket_select with a read socket array, a write socket array,
   yet no exception array (quite common), you are currently forced to do
   something like the following:
  
   $wfds = array($sock1, $sock2);
   $rfds = array($sock3, $sock4);
   $null = NULL;
  
   socket_select($rfds, $wfds, $null);
  
  
   I have ran into this problem before several times while developing in
   user space. (Especially when passing around semi-complex data
   structures)
  
   Proposed Solution
   --
  
   Allow all expressions to be passed by reference. This will allow
   something like the following
  
   function  normalize($element_tree, $node_mapping, $max_depth){
   //Code
   }
  
   normalize($my_tree, NULL, 25000);
  
  
   Patch
   --
  
   I have attached a patch against ZE2 that accomplishes this.
  
  
   Thanks,
   -Jason
  
  
  
  
  
   
  
 
   Index: zend_compile.c
   ===
   RCS file: /repository/ZendEngine2/zend_compile.c,v
   retrieving revision 1.285
   diff -u -r1.285 zend_compile.c
   --- zend_compile.c23 Apr 2002 18:06:53 -  1.285
   +++ zend_compile.c25 May 2002 06:45:21 -
   @@ -1271,7 +1271,7 @@
 op = ZEND_SEND_REF;
 break;
 default:
   - zend_error(E_COMPILE_ERROR, Only 
  variables can be passed by reference);
   + op = ZEND_SEND_VAR;
 break;
 }
 }
   Index: zend_execute.c
   ===
   RCS file: /repository/ZendEngine2/zend_execute.c,v
   retrieving revision 1.341
   diff -u -r1.341 zend_execute.c
   --- zend_execute.c8 May 2002 18:43:19 -   1.341
   +++ zend_execute.c25 May 2002 06:45:25 -
   @@ -2292,10 +2292,6 @@
 NEXT_OPCODE();
 }
 case ZEND_SEND_VAL:
   - if 
  (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
   -  
  ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc), 
  EX(fbc)-common.arg_types)) {
   - zend_error(E_ERROR, 
  Cannot pass parameter %d by reference, EX(opline)-op2.u.opline_num);
   - }
 {
 zval *valptr;
 zval *value;
   @@ -2329,7 +2325,8 @@
   
  zend_ptr_stack_push(EG(argument_stack), varptr);
 NEXT_OPCODE();
 }
   - zend_error(E_ERROR, Only 
  variables can be passed by reference);
   + /* Should only occur with an 
  uninitialized variable */
   + goto send_by_var;
 }
 NEXT_OPCODE();
 case ZEND_SEND_VAR:
  
   
  
 
   --
   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 Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?

Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allowconstants / expressions to be passed by reference]

2002-05-29 Thread Sebastian Bergmann

Andi Gutmans wrote:
 I don't see any reason to allow passing non-variables by reference.
 It is semantically incorrect.

  +1

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread Sebastian Bergmann

brad lafountain wrote:
 function foo($bar = null)
 {
 }

  This has already been fixed for the Zend Engine 2:

* Parameters that are passed by reference to a function
  may now have default values.

  Example:

?php
function my_function($var = null) {
 if ($var === null) {
 die('$var needs to have a value');
 }
}
?

  (Source: /ZendEngine2/ZEND_CHANGES)

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




[PHP-DEV] Question about print_r

2002-05-29 Thread Garland foster

Hi all,

Does anyone know any problem related to print_r($foo) if $foo is a resource,
I'm developing a module where a function returns a resource, that is then
used by other functions, if I use a print_r($resource) in the middle things
change. I'm starting to think that print_r changes the resource in some
way, do you know if this might be right?

Garland.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.362 / Virus Database: 199 - Release Date: 5/16/02



Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH]Allow constants / expressions to be passed by reference]

2002-05-29 Thread Jason T. Greene

Andi, 

I do not see how this is semantically incorrect, or how it is that much
different than allowing default values for pass by reference arguments.
IMO The only useful reason to deny passing a constant/expression in a
function is to provide a warning message. Some of the problems I
outlined in my post can be solved using default values(only using ZE2,
which allows defaults on reference args); however, default values only
solve rightmost optional parameters. i.e. there is no way to do:

function a($arg1, $arg2=blah, $arg3=blah){}


a(1, ,3)

In respect to not passing by reference, this problem is solved by doing
the following 

function magic_function($var1, $var2, $var3) {
// Note just an example - I would usually use func_get_args...
if ($var2 === NULL) {
$var2 = blah;
}
}

magic_function(1, NULL, 3);

This technique of course will not work with the current semantics of not
allowing constants/expressions to pass by reference.

-Jason





On Wed, 2002-05-29 at 10:26, Andi Gutmans wrote:
 I don't see any reason to allow passing non-variables by reference.
 It is semantically incorrect.
 
 Andi
 
 At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:
 If this patch doesn't break anything, and it doesn't give us any
 difficulties with ZE2 or major design issues, I'm +1.
 
   - Stig
 
 On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
   Due to this patch being sent during the msession discussion, it has not
   been noticed, so I am resending.
  
  
   -Jason
   
  
 
   From: Jason Greene [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed 
  by reference
   Date: 25 May 2002 02:18:52 -0500
  
   Problem
   ---
  
   There are some scenarios where a function requires the ability to modify
   parameters that may also be optional. Optional parameters work well,
   except in the scenario where all of the pass by reference parameters can
   be optional. ex the socket_select() function. Since select is
   argument-result, all three arrays that are taken as input must be passed
   by reference, yet any can be excluded. So for example if you were
   calling socket_select with a read socket array, a write socket array,
   yet no exception array (quite common), you are currently forced to do
   something like the following:
  
   $wfds = array($sock1, $sock2);
   $rfds = array($sock3, $sock4);
   $null = NULL;
  
   socket_select($rfds, $wfds, $null);
  
  
   I have ran into this problem before several times while developing in
   user space. (Especially when passing around semi-complex data
   structures)
  
   Proposed Solution
   --
  
   Allow all expressions to be passed by reference. This will allow
   something like the following
  
   function  normalize($element_tree, $node_mapping, $max_depth){
   //Code
   }
  
   normalize($my_tree, NULL, 25000);
  
  
   Patch
   --
  
   I have attached a patch against ZE2 that accomplishes this.
  
  
   Thanks,
   -Jason
  
  
  
  
  
   
  
 
   Index: zend_compile.c
   ===
   RCS file: /repository/ZendEngine2/zend_compile.c,v
   retrieving revision 1.285
   diff -u -r1.285 zend_compile.c
   --- zend_compile.c23 Apr 2002 18:06:53 -  1.285
   +++ zend_compile.c25 May 2002 06:45:21 -
   @@ -1271,7 +1271,7 @@
 op = ZEND_SEND_REF;
 break;
 default:
   - zend_error(E_COMPILE_ERROR, Only 
  variables can be passed by reference);
   + op = ZEND_SEND_VAR;
 break;
 }
 }
   Index: zend_execute.c
   ===
   RCS file: /repository/ZendEngine2/zend_execute.c,v
   retrieving revision 1.341
   diff -u -r1.341 zend_execute.c
   --- zend_execute.c8 May 2002 18:43:19 -   1.341
   +++ zend_execute.c25 May 2002 06:45:25 -
   @@ -2292,10 +2292,6 @@
 NEXT_OPCODE();
 }
 case ZEND_SEND_VAL:
   - if 
  (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
   -  
  ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc), 
  EX(fbc)-common.arg_types)) {
   - zend_error(E_ERROR, 
  Cannot pass parameter %d by reference, EX(opline)-op2.u.opline_num);
   - }
 {
 zval *valptr;
 zval *value;
   @@ -2329,7 +2325,8 @@
   
  zend_ptr_stack_push(EG(argument_stack), varptr);
 

[Fwd: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]]

2002-05-29 Thread Sebastian Bergmann

  Hamster ate my mail? Resent, just in case.

Sebastian Bergmann wrote:
 brad lafountain wrote:
 function foo($bar = null)
 {
 }

  This has already been fixed for the Zend Engine 2:

 * Parameters that are passed by reference to a function
   may now have default values.

   Example:

 ?php
 function my_function($var = null) {
  if ($var === null) {
  die('$var needs to have a value');
  }
 }
 ?

   (Source: /ZendEngine2/ZEND_CHANGES)

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




Re: [Fwd: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT][PATCH] Allow constants / expressions to be passed by reference]]

2002-05-29 Thread Jason T. Greene

Yes and as I said in my argument, this solves some of the problems but
does not solve a non-rightmost parameter being optional.

-Jason

On Wed, 2002-05-29 at 11:43, Sebastian Bergmann wrote:
   Hamster ate my mail? Resent, just in case.
 
 Sebastian Bergmann wrote:
  brad lafountain wrote:
  function foo($bar = null)
  {
  }
 
   This has already been fixed for the Zend Engine 2:
 
  * Parameters that are passed by reference to a function
may now have default values.
 
Example:
 
  ?php
  function my_function($var = null) {
   if ($var === null) {
   die('$var needs to have a value');
   }
  }
  ?
 
(Source: /ZendEngine2/ZEND_CHANGES)
 
 -- 
   Sebastian Bergmann
   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
 
   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
 
 -- 
 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: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allowconstants / expressions to be passed by reference]

2002-05-29 Thread Jason T. Greene

Even if it is semantically incorrect( which I disagree.)

How is allowing a constant/expression to be passed by reference more
semantically incorrect  than allowing a default (which is a constant)
on a pass by reference argument?

-Jason


On Wed, 2002-05-29 at 10:53, Sebastian Bergmann wrote:
 Andi Gutmans wrote:
  I don't see any reason to allow passing non-variables by reference.
  It is semantically incorrect.
 
   +1
 
 -- 
   Sebastian Bergmann
   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
 
   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
 
 -- 
 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] bundling libxml2 / bundling locations

2002-05-29 Thread brad lafountain

Hello all,

 It was mentioned before about bundling libxml2 with php with expat or instead
of expat. Where do we stand with this? I emailed the developer asking
permission to bundle it if we choose to do it (no response yet).


Also I remember reading on here before someone suggested putting bundled
libaries in a common place so many extensions can use the bundled software. Is
this something we want to persue too?

 php4/bundled/libxml2
 php4/bundled/mysql
 php4/bundled/gd

you get the point.. 

 This will be usefull if i am writing an extension that maybe does database
replication (just a stupid sample) and i want to create nice graphics for my
stastics i can just write some gd code and link against the bundled libary.

 - Brad


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Christian Stocker

On Wed, 29 May 2002, brad lafountain wrote:

 Hello all,

  It was mentioned before about bundling libxml2 with php with expat or instead
 of expat. Where do we stand with this? I emailed the developer asking
 permission to bundle it if we choose to do it (no response yet).

öhm, libxml2 is a relatively huge project with a fast developement cycle..
I don't see the point in bundling that with php. It's actively maintained
(not as for example gd), we don't need any patches to get it running and
it comes with most (all?) distros (not installed by default everywhere,
but it's available). And installation from source is also no pain at
all...

chregu



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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread brad lafountain

Ok, 

 But take ext/domxml it requires a newerversion of libxml2. I didn't have it
installed on my machine when i installed php. If we bundle say a specfic
version of libxml2 that domxml depends on, then it won't matter how fast pased
the development is, ext/domxml won't use it. We can obvisouly peridocially
upgrade the version that is bundled and you can have an override if you want to
use a different version that is installed on a system. As xml gets more and
more popular i feel that domxml will be more and more popular.

 Build outta the box

 - Brad

--- Christian Stocker [EMAIL PROTECTED] wrote:
 On Wed, 29 May 2002, brad lafountain wrote:
 
  Hello all,
 
   It was mentioned before about bundling libxml2 with php with expat or
 instead
  of expat. Where do we stand with this? I emailed the developer asking
  permission to bundle it if we choose to do it (no response yet).
 
 öhm, libxml2 is a relatively huge project with a fast developement cycle..
 I don't see the point in bundling that with php. It's actively maintained
 (not as for example gd), we don't need any patches to get it running and
 it comes with most (all?) distros (not installed by default everywhere,
 but it's available). And installation from source is also no pain at
 all...
 
 chregu
 
 
 
 --
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




[PHP-DEV] Re: [Zend Engine 2] RE: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV][RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread Shane Caraveo

Ahh yes, I've been bitten by this limitation a few times, quite 
agravating.  I would definitly like to have this work.
Shane


phpsurf wrote:
 the problem is that if you define some function :
 
 function someFunc(myParam) {
  ...
  }
 
 then you can call :
 someFunc($someVar);
 
 but not :
 define(MY_CONSTANT, 0);
 someFunc(MY_CONSTANT);
 
 the goal is not to pass a constant by reference, but to be allowed to
 (exceptionnaly) pass a constant as a parameter to a function that was
 designed to receive parameters by reference.
 
 and this could also let people define default values for params and still
 have them passed by reference ...
 
 
-Original Message-
From: Andi Gutmans [mailto:[EMAIL PROTECTED]]
Sent: mercredi 29 mai 2002 17:26
To: Stig S. Bakken; Jason T. Greene
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH]
Allow constants / expressions to be passed by reference]


I don't see any reason to allow passing non-variables by reference.
It is semantically incorrect.

Andi

At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:

If this patch doesn't break anything, and it doesn't give us any
difficulties with ZE2 or major design issues, I'm +1.

 - Stig

On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:

Due to this patch being sent during the msession discussion,

it has not

been noticed, so I am resending.


-Jason



From: Jason Greene [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed

by reference

Date: 25 May 2002 02:18:52 -0500

Problem
---

There are some scenarios where a function requires the

ability to modify

parameters that may also be optional. Optional parameters work well,
except in the scenario where all of the pass by reference

parameters can

be optional. ex the socket_select() function. Since select is
argument-result, all three arrays that are taken as input

must be passed

by reference, yet any can be excluded. So for example if you were
calling socket_select with a read socket array, a write socket array,
yet no exception array (quite common), you are currently forced to do
something like the following:

$wfds = array($sock1, $sock2);
$rfds = array($sock3, $sock4);
$null = NULL;

socket_select($rfds, $wfds, $null);


I have ran into this problem before several times while developing in
user space. (Especially when passing around semi-complex data
structures)

Proposed Solution
--

Allow all expressions to be passed by reference. This will allow
something like the following

function  normalize($element_tree, $node_mapping, $max_depth){
//Code
}

normalize($my_tree, NULL, 25000);


Patch
--

I have attached a patch against ZE2 that accomplishes this.


Thanks,
-Jason








Index: zend_compile.c
===
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.285
diff -u -r1.285 zend_compile.c
--- zend_compile.c23 Apr 2002 18:06:53 -  1.285
+++ zend_compile.c25 May 2002 06:45:21 -
@@ -1271,7 +1271,7 @@
  op = ZEND_SEND_REF;
  break;
  default:
- zend_error(E_COMPILE_ERROR, Only

variables can be passed by reference);

+ op = ZEND_SEND_VAR;
  break;
  }
  }
Index: zend_execute.c
===
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.341
diff -u -r1.341 zend_execute.c
--- zend_execute.c8 May 2002 18:43:19 -   1.341
+++ zend_execute.c25 May 2002 06:45:25 -
@@ -2292,10 +2292,6 @@
  NEXT_OPCODE();
  }
  case ZEND_SEND_VAL:
- if

(EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME

- 

ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc),
EX(fbc)-common.arg_types)) {

- zend_error(E_ERROR,

Cannot pass parameter %d by reference, EX(opline)-op2.u.opline_num);

- }
  {
  zval *valptr;
  zval *value;
@@ -2329,7 +2325,8 @@


zend_ptr_stack_push(EG(argument_stack), varptr);

  NEXT_OPCODE();
  }
- zend_error(E_ERROR, Only

variables can be passed by reference);

+ /* Should only occur with an

uninitialized variable */

+ goto send_by_var;
  }
  

Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Alexander Wagner

brad lafountain wrote:
 Ok,

  But take ext/domxml it requires a newerversion of libxml2. I didn't
 have it installed on my machine when i installed php. If we bundle
 say a specfic version of libxml2 that domxml depends on, then it
 won't matter how fast pased the development is, ext/domxml won't use
 it. We can obvisouly peridocially upgrade the version that is bundled
 and you can have an override if you want to use a different version
 that is installed on a system. As xml gets more and more popular i
 feel that domxml will be more and more popular.

I'd make it an optional download, because there are always people like 
me who have all the libraries already installed with their distro.

People with non-deb distros or who are lacking skills with Linux but 
want to do it anyway would definately benefit from this.
It would be for pure convinience, like all the precompiled libraries 
bundled with the Windows-download, gdlib is an entirely different 
matter.

regards
Wagner

-- 
When did ignorance become a point of view?

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




Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]

2002-05-29 Thread Andi Gutmans

Okay I'll try and look at your patch in the next couple of days.
It's quite sensitive code which this changes (has harmless as it might 
seem) so I need some time to read over it.

Andi

At 11:37 29/05/2002 -0500, Jason T. Greene wrote:
Andi,

I do not see how this is semantically incorrect, or how it is that much
different than allowing default values for pass by reference arguments.
IMO The only useful reason to deny passing a constant/expression in a
function is to provide a warning message. Some of the problems I
outlined in my post can be solved using default values(only using ZE2,
which allows defaults on reference args); however, default values only
solve rightmost optional parameters. i.e. there is no way to do:

function a($arg1, $arg2=blah, $arg3=blah){}


a(1, ,3)

In respect to not passing by reference, this problem is solved by doing
the following

function magic_function($var1, $var2, $var3) {
 // Note just an example - I would usually use func_get_args...
 if ($var2 === NULL) {
 $var2 = blah;
 }
}

magic_function(1, NULL, 3);

This technique of course will not work with the current semantics of not
allowing constants/expressions to pass by reference.

-Jason





On Wed, 2002-05-29 at 10:26, Andi Gutmans wrote:
  I don't see any reason to allow passing non-variables by reference.
  It is semantically incorrect.
 
  Andi
 
  At 09:40 29/05/2002 +0200, Stig S. Bakken wrote:
  If this patch doesn't break anything, and it doesn't give us any
  difficulties with ZE2 or major design issues, I'm +1.
  
- Stig
  
  On Tue, 2002-05-28 at 21:12, Jason T. Greene wrote:
Due to this patch being sent during the msession discussion, it has not
been noticed, so I am resending.
   
   
-Jason

   
  
From: Jason Greene [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: [PHP-DEV] [PATCH] Allow constants / expressions to be passed
   by reference
Date: 25 May 2002 02:18:52 -0500
   
Problem
---
   
There are some scenarios where a function requires the ability to 
 modify
parameters that may also be optional. Optional parameters work well,
except in the scenario where all of the pass by reference 
 parameters can
be optional. ex the socket_select() function. Since select is
argument-result, all three arrays that are taken as input must be 
 passed
by reference, yet any can be excluded. So for example if you were
calling socket_select with a read socket array, a write socket array,
yet no exception array (quite common), you are currently forced to do
something like the following:
   
$wfds = array($sock1, $sock2);
$rfds = array($sock3, $sock4);
$null = NULL;
   
socket_select($rfds, $wfds, $null);
   
   
I have ran into this problem before several times while developing in
user space. (Especially when passing around semi-complex data
structures)
   
Proposed Solution
--
   
Allow all expressions to be passed by reference. This will allow
something like the following
   
function  normalize($element_tree, $node_mapping, $max_depth){
//Code
}
   
normalize($my_tree, NULL, 25000);
   
   
Patch
--
   
I have attached a patch against ZE2 that accomplishes this.
   
   
Thanks,
-Jason
   
   
   
   
   

   
  
Index: zend_compile.c
===
RCS file: /repository/ZendEngine2/zend_compile.c,v
retrieving revision 1.285
diff -u -r1.285 zend_compile.c
--- zend_compile.c23 Apr 2002 18:06:53 -  1.285
+++ zend_compile.c25 May 2002 06:45:21 -
@@ -1271,7 +1271,7 @@
  op = ZEND_SEND_REF;
  break;
  default:
- zend_error(E_COMPILE_ERROR, Only
   variables can be passed by reference);
+ op = ZEND_SEND_VAR;
  break;
  }
  }
Index: zend_execute.c
===
RCS file: /repository/ZendEngine2/zend_execute.c,v
retrieving revision 1.341
diff -u -r1.341 zend_execute.c
--- zend_execute.c8 May 2002 18:43:19 -   1.341
+++ zend_execute.c25 May 2002 06:45:25 -
@@ -2292,10 +2292,6 @@
  NEXT_OPCODE();
  }
  case ZEND_SEND_VAL:
- if
   (EX(opline)-extended_value==ZEND_DO_FCALL_BY_NAME
- 
   ARG_SHOULD_BE_SENT_BY_REF(EX(opline)-op2.u.opline_num, EX(fbc),
   EX(fbc)-common.arg_types)) {
- zend_error(E_ERROR,
   Cannot pass parameter %d 

Re: [PHP-DEV] PHP web farms (i.e. why msession or something like it)

2002-05-29 Thread mlwmohawk

 [EMAIL PROTECTED] wrote: 
 The problem with using databases are they they are expensive and they 
 are slow. 
   
 A generalized PostgreSQL session manager would be cool, I have 
 actually been thinking about such an extension. Using the schema from 
 the PG msession plugin, it would be fairly easy. Alas, the problems 
 with PostgreSQL as a session manager are many. MySQL is just as bad, 
 but for different reasons. :-) 
   
 It is because the databases fall flat as session managers that I wrote 
 msession in the first place. 
   
 I agree that msession is better than using MySQL or PostgreSQL as a 
 session  manager.  However, most people who use PHP on web farms 
 already have some  sort of database set up, so it seems logical to me 
 to be able to use it for  storing sessions.  MySQL actually isn't too 
 bad, as long as you use HASH  (in-memory) tables. 
 
That is where I disagree. At my last gig we used a combination of Oracle and 
PostgreSQL. The session 
management was a bigger Oracle hit than the rest of the site. It was horrible. It was 
partially some of 
this experience that encouraged me to do msession. 
 
The msession daemon can be setup on a backend box and completely forgotten. No table 
space worries, no 
query optimizaton. 
 
  
   
 Right now I don't run any web farms, but I used to work for a company 
 with  125+ web servers, so I understand the problem. 
   
 125??!! All serving the same content? All maintaining a coherent 
 environment? What did you use for session data? 
  
 MySQL.  They weren't all serving the same content, but almost all of 
 them  were sharing a session. 
 
How many session transactions did you get per second? (i.e. select session data, 
update/insert session 
data) 
 
I would not suspect that MySQL could do this very well because it does not support 
NVCC and updates lock 
the entire table. 


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




Re: [PHP-DEV] PHP web farms (i.e. why msession or something like it)

2002-05-29 Thread Steve Meyers

[EMAIL PROTECTED] wrote:

 I agree that msession is better than using MySQL or PostgreSQL as a
 session  manager.  However, most people who use PHP on web farms
 already have some  sort of database set up, so it seems logical to me
 to be able to use it for  storing sessions.  MySQL actually isn't too
 bad, as long as you use HASH  (in-memory) tables.
  
 That is where I disagree. At my last gig we used a combination of Oracle
 and PostgreSQL. The session management was a bigger Oracle hit than the
 rest of the site. It was horrible. It was partially some of this
 experience that encouraged me to do msession.
  
 The msession daemon can be setup on a backend box and completely
 forgotten. No table space worries, no query optimizaton.
  
Well, you didn't try it with MySQL, which is significantly faster than 
Oracle and Postgres for most stuff.  In any case, I agree that msession is 
probably a better solution -- I just think that having built-in MySQL 
session support would be a good thing for PHP.

  
 MySQL.  They weren't all serving the same content, but almost all of
 them  were sharing a session.
  
 How many session transactions did you get per second? (i.e. select session
 data, update/insert session data)
  
 I would not suspect that MySQL could do this very well because it does not
 support NVCC and updates lock the entire table.

I have no idea -- I do know that we never had any troubles with the box 
that had the session database on it.

Incidentally, MySQL using InnoDB tables supports MVCC and row-level 
locking.  However, I suspect that in this case the InnoDB tables would 
actually be slower than the table-locking MyISAM tables.

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




Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH]Allow constants / expressions to be passed by reference]

2002-05-29 Thread Jason T. Greene

On Wed, 2002-05-29 at 13:53, Andi Gutmans wrote:
 Okay I'll try and look at your patch in the next couple of days.
 It's quite sensitive code which this changes (has harmless as it might 
 seem) so I need some time to read over it.
Thanks, I did test this very thoroughly. However, due to its possible
far reaching effects, I would appreciate someone else taking their time
on a careful review.

I understand if it takes you awhile to get to it

-Jason

 Andi
 



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




[PHP-DEV] CVS Account Request: arzt

2002-05-29 Thread Pelle Boese

Helping you to translate parts of the php docu will be a good thing imho, so phpdoc 
would be a nice repository for me.

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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Yasuo Ohgaki

Brad Lafountain wrote:
 Ok, 
 
  But take ext/domxml it requires a newerversion of libxml2. I didn't have it
 installed on my machine when i installed php. If we bundle say a specfic
 version of libxml2 that domxml depends on, then it won't matter how fast pased
 the development is, ext/domxml won't use it. We can obvisouly peridocially
 upgrade the version that is bundled and you can have an override if you want to
 use a different version that is installed on a system. As xml gets more and
 more popular i feel that domxml will be more and more popular.
 
  Build outta the box

+1 for libxml2 bundle. This already discussed, isn't this?

ext/xml/libxml2 ?
Odd location, but domxml support without xml does not
make much sense to me.

--
Yasuo Ohgaki









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




[PHP-DEV] Fwd: Re: libxml2 - php

2002-05-29 Thread brad lafountain


--- Daniel Veillard [EMAIL PROTECTED] wrote:
 Date: Wed, 29 May 2002 23:28:11 +0200
 From: Daniel Veillard [EMAIL PROTECTED]
 To: brad lafountain [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: libxml2 - php
 Reply-to: [EMAIL PROTECTED]
 
 On Wed, May 29, 2002 at 10:35:44AM -0700, brad lafountain wrote:
  Hello,
  
   I'm a developer for php. We were recently talking about bundling libxml2
 with
  the php distribution. I'm not to sure about the licensing issues involved
 here
  but I figured I'd just ask you and get your permission. Let me know your
  thoughts/concerns.
 
   libxml2 is licenced under the MIT Licence, I honnestly don't
 think bundling would be a problem at that level.
   However on a practical basis it would be better that you use
 the existing shared library if libxml2 is already installed on the
 system rather than always including it in the PHP module/binary.
 Others Apache modules may use libxml2 too and sharing the same instance
 can make a big change. for maintainance too !
 
 Daniel
 
 -- 
 Daniel Veillard  | Red Hat Network http://redhat.com/products/network/
 [EMAIL PROTECTED]  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
 http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP-DEV] Fwd: Re: libxml2 - php

2002-05-29 Thread Markus Fischer

Hello,

as you see he also gave the good reasons why NOT bundling it
with PHP for which I am too.

- Markus

On Wed, May 29, 2002 at 04:53:48PM -0700, brad lafountain wrote : 
 
 --- Daniel Veillard [EMAIL PROTECTED] wrote:
  Date: Wed, 29 May 2002 23:28:11 +0200
  From: Daniel Veillard [EMAIL PROTECTED]
  To: brad lafountain [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: libxml2 - php
  Reply-to: [EMAIL PROTECTED]
  
  On Wed, May 29, 2002 at 10:35:44AM -0700, brad lafountain wrote:
   Hello,
   
I'm a developer for php. We were recently talking about bundling libxml2
  with
   the php distribution. I'm not to sure about the licensing issues involved
  here
   but I figured I'd just ask you and get your permission. Let me know your
   thoughts/concerns.
  
libxml2 is licenced under the MIT Licence, I honnestly don't
  think bundling would be a problem at that level.
However on a practical basis it would be better that you use
  the existing shared library if libxml2 is already installed on the
  system rather than always including it in the PHP module/binary.
  Others Apache modules may use libxml2 too and sharing the same instance
  can make a big change. for maintainance too !
  
  Daniel
  
  -- 
  Daniel Veillard  | Red Hat Network http://redhat.com/products/network/
  [EMAIL PROTECTED]  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
  http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
Wishlist:  http://guru.josefine.at/~mfischer/wishlist

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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Markus Fischer

On Thu, May 30, 2002 at 08:12:27AM +0900, Yasuo Ohgaki wrote : 
 Brad Lafountain wrote:
 Ok, 
 
  But take ext/domxml it requires a newerversion of libxml2. I didn't have 
  it
 installed on my machine when i installed php. If we bundle say a specfic
 version of libxml2 that domxml depends on, then it won't matter how fast 
 pased
 the development is, ext/domxml won't use it. We can obvisouly peridocially
 upgrade the version that is bundled and you can have an override if you 
 want to
 use a different version that is installed on a system. As xml gets more and
 more popular i feel that domxml will be more and more popular.
 
  Build outta the box
 
 +1 for libxml2 bundle. This already discussed, isn't this?

-1

It's very actively developed. What is the reason of shared
libraries if we don't use it?! GD is a completely different
story. I even think it's not necessary to bundle
libmysqlclient because it's really installed everywhere where
mysql is available.

- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
Wishlist:  http://guru.josefine.at/~mfischer/wishlist

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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Markus Fischer

On Thu, May 30, 2002 at 09:58:31AM +0900, Yasuo Ohgaki wrote : 
 Markus Fischer wrote:
 Build outta the box
 
 +1 for libxml2 bundle. This already discussed, isn't this?
 
 
 -1
 
 It's very actively developed. What is the reason of shared
 libraries if we don't use it?! GD is a completely different
 story. I even think it's not necessary to bundle
 libmysqlclient because it's really installed everywhere where
 mysql is available.
 
 
 I undstand libxml2 develpment is very active. That's the
 one of the reason why I prefer to bundle.
 
 For example, I have to build libxml RPM by myself to
 install PHP 4.3.0, since it requires too new libxml2 :(
 Just another RPM build, though.

So? What is wrong with that?!

 I don't install compiler to servers just in case cracker
 got access to my boxes. I think most of us don't install
 compiler to servers.

If we go with this paradigm we'ld have to bundle everything
with PHP. Typically, administrators of such systems already
live with that they have to rebuild and update packages.

- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
Wishlist:  http://guru.josefine.at/~mfischer/wishlist

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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Yasuo Ohgaki

Markus Fischer wrote:
 On Thu, May 30, 2002 at 09:58:31AM +0900, Yasuo Ohgaki wrote : 
 
Markus Fischer wrote:

Build outta the box

+1 for libxml2 bundle. This already discussed, isn't this?


   -1

   It's very actively developed. What is the reason of shared
   libraries if we don't use it?! GD is a completely different
   story. I even think it's not necessary to bundle
   libmysqlclient because it's really installed everywhere where
   mysql is available.


I undstand libxml2 develpment is very active. That's the
one of the reason why I prefer to bundle.

 For example, I have to build libxml RPM by myself to
 install PHP 4.3.0, since it requires too new libxml2 :(
 Just another RPM build, though.
 
 
  So? What is wrong with that?!

Just a pain to install :)

 
 
 I don't install compiler to servers just in case cracker
 got access to my boxes. I think most of us don't install
 compiler to servers.
 
 
  If we go with this paradigm we'ld have to bundle everything
  with PHP. Typically, administrators of such systems already
  live with that they have to rebuild and update packages.
 

Not really, we just need to bundle libs that may have
conflicts. GD is one, and libxml2 is another.
(libxml2 changes too frequently and PHP requires
specific version including patch level release.
I think we can remove expat bundle now.)

Most of us here have not problems to create custom
packages for ourselves. Just matter of ease of use.

--
Yasuo Ohgaki








__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread brad lafountain

My point of view is domxml does require a newish version of libxml2. It't not
going to hurt if we bundle that version with php. The configure script can even
detect a version that is installed on the system. If its greater than the
packaged one then it can use that one instead alsogive the user to overide the
bundled libxml2 --enable-domxml=/path/to/new/xml. I really don't see any ill
effects with bundling. We bundle for the people don't regulary upgrade software
and we allow auto config/overriding for people that do. Why do you think that
.net will do so good (becides m$ forcing it on us). They run one installer and
bingo everything works. People will say its easy to setup. 

 - Brad

--- Markus Fischer [EMAIL PROTECTED] wrote:
 On Thu, May 30, 2002 at 08:12:27AM +0900, Yasuo Ohgaki wrote : 
  Brad Lafountain wrote:
  Ok, 
  
   But take ext/domxml it requires a newerversion of libxml2. I didn't have 
   it
  installed on my machine when i installed php. If we bundle say a specfic
  version of libxml2 that domxml depends on, then it won't matter how fast 
  pased
  the development is, ext/domxml won't use it. We can obvisouly peridocially
  upgrade the version that is bundled and you can have an override if you 
  want to
  use a different version that is installed on a system. As xml gets more
 and
  more popular i feel that domxml will be more and more popular.
  
   Build outta the box
  
  +1 for libxml2 bundle. This already discussed, isn't this?
 
 -1
 
 It's very actively developed. What is the reason of shared
 libraries if we don't use it?! GD is a completely different
 story. I even think it's not necessary to bundle
 libmysqlclient because it's really installed everywhere where
 mysql is available.
 
 - Markus
 
 -- 
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 Wishlist:  http://guru.josefine.at/~mfischer/wishlist


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP-DEV] PHP web farms (i.e. why msession or something likeit)

2002-05-29 Thread Chris Shiflett

I agree. Though I know we want to stay well away from bundling anything 
unnecessary with a base PHP installation, more sophisticated session 
support seems well warranted, possibly even enough to extend the 
capabilities of PHP's current built-in session management *and* include 
msession in some way.

Chris

Steve Meyers wrote:

Well, you didn't try it with MySQL, which is significantly faster than 
Oracle and Postgres for most stuff.  In any case, I agree that msession is 
probably a better solution -- I just think that having built-in MySQL 
session support would be a good thing for PHP.



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




Re: [PHP-DEV] PHP web farms (i.e. why msession or something likeit)

2002-05-29 Thread Yasuo Ohgaki

Steve Meyers wrote:
 Well, you didn't try it with MySQL, which is significantly faster than 
 Oracle and Postgres for most stuff.  In any case, I agree that msession is 
 probably a better solution -- I just think that having built-in MySQL 
 session support would be a good thing for PHP.

You can easily port session pgsql for mysql.

BTW, as far as my benchmarks on session pgsql and files
handler, they are almost equal. I didn't benchmark
in detail, but I doubt mysql could be much faster than
PostgreSQL. Just my guess.

--
Yasuo Ohgaki



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




Re: [PHP-DEV] PHP web farms (i.e. why msession or something like

2002-05-29 Thread mlwmohawk

 Steve Meyers wrote: 
 Well, you didn't try it with MySQL, which is significantly faster than 
  Oracle and Postgres for most stuff.  In any case, I agree that 
 msession is  probably a better solution -- I just think that having 
 built-in MySQL  session support would be a good thing for PHP. 
  
 You can easily port session pgsql for mysql. 
  
 BTW, as far as my benchmarks on session pgsql and files 
 handler, they are almost equal. I didn't benchmark 
 in detail, but I doubt mysql could be much faster than 
 PostgreSQL. Just my guess. 
 
MySQL's table locking during update pretty much make sure that  
performance will degrade under heavy load with many connections. 
 
PostgreSQL has a different problem. It doesn't lock the table  
except when you perform vacuum. Instead of locking, for updates, 
PostgreSQL simply adds a new row to the table. For every update 
a session value gets, a new physical tuple is added. If  
you have an active site, the table space grows to some number 
times the number of sessions times the size of your session 
data.  
 
In a database, each session update will incur (at a minimum) 
an fsync() call. 
  
 -- 
 Yasuo Ohgaki 
  
  
  
 --  
 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] PHP web farms (i.e. why msession or something like

2002-05-29 Thread mlwmohawk

 [EMAIL PROTECTED] wrote: 
 MySQL's table locking during update pretty much make sure that 
 performance will degrade under heavy load with many connections. 
  
 It's not actually as bad as you think.  With a table like this, the 
 table  locking actually has a very minimal effect on it. 
  
 In any case, I'm not arguing that using a database would perform better 
  than using msession.  I'm simply arguing that it would be good to have 
 the  built-in session management support databases.  It might also be  
 advantageous to add msession support to the core session support. 
 
I think my position on msession is misunderstood. Of course *I* like it because *I* 
wrote it, however, if I 
had it to do over again, I probably wouldn't do it the way I did, and I would have 
more reservations about 
submiting it to the group. Participation in this group has certainly been a mixed bag. 
 
When all is said and done, the reason I wrote msession still exists. There is a need 
for something which 
links multiple PHP systems together. Databases incur a disk I/O, the same as the file 
based session module, 
so maximums are controled by the disk subsystem. Msession is most similar to the 
mod_mm session manager, it 
has no disk I/O, although it does have network I/O latency. 
 
I don't know what *the* answer is. I have contributed msession as *an* answer. 
 
Idealy, there would be a mod_net which performs similarly to the session extension 
portion of msession. 
 
 


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




[PHP-DEV] Dynamically loaded extensions and PHP sessions

2002-05-29 Thread mlwmohawk

Is it possible to configure the PHP session system to use a dynamically loaded session 
manager? 
 
I am loading the extension, but the session extension seems to try to initialize 
itself prior to the 
dynamic extension being loaded. 


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




[PHP-DEV] Re: Dynamically loaded extensions and PHP sessions

2002-05-29 Thread Yasuo Ohgaki

[EMAIL PROTECTED] wrote:
 Is it possible to configure the PHP session system to use a dynamically loaded 
session manager? 
  
 I am loading the extension, but the session extension seems to try to initialize 
itself prior to the 
 dynamic extension being loaded. 
 

This is the one of the main reason why I insisted session_pgsql
should be in php4 source tree at first.

We need smart ini parser/module loader to address this issue.

--
Yasuo Ohgaki





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




Re: [PHP-DEV] bundling libxml2 / bundling locations

2002-05-29 Thread Andi Gutmans

I think that XML is a core technology and giving plugplay access to our 
users is important. Having bundled the MySQL library made it easier for 
people to get started with MySQL. Does that mean I think every library 
should be bundled with PHP? No, I don't.
But if libxml2 is a moving target and it's hard to stay in sync then it 
certainly sounds beneficial to take away this headache from our users. It 
also means that other XML based extensions could use it by default.
Of course it also depends how big it is. If we can strip it down a lot I'd 
be a +1. If it'd add 1 MB to our .tar.gz I would be against.

Andi

At 18:35 29/05/2002 -0700, brad lafountain wrote:
My point of view is domxml does require a newish version of libxml2. It't not
going to hurt if we bundle that version with php. The configure script can 
even
detect a version that is installed on the system. If its greater than the
packaged one then it can use that one instead alsogive the user to overide the
bundled libxml2 --enable-domxml=/path/to/new/xml. I really don't see any ill
effects with bundling. We bundle for the people don't regulary upgrade 
software
and we allow auto config/overriding for people that do. Why do you think that
.net will do so good (becides m$ forcing it on us). They run one installer and
bingo everything works. People will say its easy to setup.

  - Brad

--- Markus Fischer [EMAIL PROTECTED] wrote:
  On Thu, May 30, 2002 at 08:12:27AM +0900, Yasuo Ohgaki wrote :
   Brad Lafountain wrote:
   Ok,
   
But take ext/domxml it requires a newerversion of libxml2. I didn't 
 have
it
   installed on my machine when i installed php. If we bundle say a specfic
   version of libxml2 that domxml depends on, then it won't matter how 
 fast
   pased
   the development is, ext/domxml won't use it. We can obvisouly 
 peridocially
   upgrade the version that is bundled and you can have an override if you
   want to
   use a different version that is installed on a system. As xml gets more
  and
   more popular i feel that domxml will be more and more popular.
   
Build outta the box
  
   +1 for libxml2 bundle. This already discussed, isn't this?
 
  -1
 
  It's very actively developed. What is the reason of shared
  libraries if we don't use it?! GD is a completely different
  story. I even think it's not necessary to bundle
  libmysqlclient because it's really installed everywhere where
  mysql is available.
 
  - Markus
 
  --
  GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
  Wishlist:  http://guru.josefine.at/~mfischer/wishlist


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
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] Unified XML Extension

2002-05-29 Thread Sebastian Bergmann

  I think the best solution would be to do what Sterling proposes in
  http://bumblebury.com/phptodo/xmsl.html.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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




RE: [PHP-DEV] Re: Client socket

2002-05-29 Thread Vinod Panicker

Makes sense.  Dunno why it didn't occur to me before - the '3' says it
all.

I need the actual socket - which when written to will send data to the
client.  Is it there in the request_rec structure?

Or can I get it some other way?

Tx,
Vinod.

---
Vinod Panicker [EMAIL PROTECTED]
Sr. Software Designer
Geodesic Information Systems Ltd. 



-Original Message-
From: J Smith [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 29, 2002 8:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] Re: Client socket



Since apache is multi-processed rather than multi-threaded, I'd imagine
that 
you're getting the same socket file descriptor since each new connection

means a new fork of httpd, resulting in three file descriptors by the
time 
you get to what you're doing.

Are you trying to get ahold of the socket/port number itself? Or connect
to 
the actual socket? 

J


Vinod Panicker wrote:

 Hi,
 
 Continuing with the problem that I've been having...
 
 I made changes to the php_apache.c file and added a new php function 
 of my own, which is supposed to return the client socket when called 
 from a php script.  Here is the code for the function -
 
 ---
 
 /* {{{ proto int apache_client_socket()
Get the client socket */
 PHP_FUNCTION(apache_client_socket)
 {
 RETURN_LONG(((request_rec 
 *)SG(server_context))-connection-client-fd);
 }
 
 ---
 
 I recompiled php and made a module out of it.  Worked perfectly.  Now,

 I wrote a php script with the following code -
 
 ---
 ?
 echo apache_client_socket();
 ?
 ---
 
 This script I call from the browser, and everytime it displays a '3'.

 I even called it from different browser windows, still the same.
 
 That cant be alright since if the fd is 3 as shown in one browser 
 window, it has to be something different in the other window since the

 browser defaults to a keep-alive connection, and the fd's have to be 
 different.
 
 I'll would tell you why I need the socket, but I've described it so 
 many times that I'm gonna die :(  I'll forward you a mail if you are 
 really interested.
 
 Tx,
 Vinod.
 
 ---
 Vinod Panicker [EMAIL PROTECTED]
 Sr. Software Designer
 Geodesic Information Systems Ltd.


-- 
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] Unified XML Extension

2002-05-29 Thread Christian Stocker

On Thu, 30 May 2002, Sebastian Bergmann wrote:

   I think the best solution would be to do what Sterling proposes in
   http://bumblebury.com/phptodo/xmsl.html.

that sounds interesting :) The DOM-ZVAL Transformation is really a
problem and gives us much headache in domxml with memleaks and all those
nasty things... but i didn't look much into ZE2 until now, so can't
comment on this object overloading stuff.

libxml2 supports almost every technology mentioned on sterlings page (not
sure about XInclude, but soon it will support xsl:schema for example as
well) and a lot is already in ext/domxml (but maybe not in the best
way...)

chregu


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