[PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Derick Rethans

Hello Tanes,

would it be possible for you to make a patch to this function?

regards,
Derick

On 26 Aug 2002 [EMAIL PROTECTED] wrote:

  ID:   18412
  Comment by:   [EMAIL PROTECTED]
  Reported By:  [EMAIL PROTECTED]
  Status:   Open
  Bug Type: Unknown/Other Function
  Operating System: win98
  PHP Version:  4.2.1
  New Comment:
 
 SUGGESTION
 ==
 
 After looking in source code (printer.c) carefully, I beleive that
 whatever you have set through has no effect. (I could be wrong if the
 source code I saw is too old. Anyway, it is the only one I can find.)
 The problem is that the steps of setting printing properties
 recommended by Microsoft are not followed. The printer_open() simply
 get current settings by calling DocumentProperties() with
 DM_OUT_BUFFER. Subsequent setting using printer_set_option() simply
 modifies these setting parameters in the buffer. Lacking of 2 steps in
 order to make setting printing options working, 
 (1) modify resource-device-dmFields bit to indicate which parameters
 have been changed
 (2) Call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. The
 resource-device must be passed to the function also.
 
 I suggest modify printer_set_option() to modify
 resource-device-dmFields bit as well as resource-device-dmXXX and
 create another option parameter - PRINTER_SET_OPTION_NOW that will call
 DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER.
 
 Regards,
 Tanes Sriviroolchai
 
 
 Previous Comments:
 
 
 [2002-08-25 23:28:51] [EMAIL PROTECTED]
 
 I have the same problem with Win2000/IIS too. There is no effect on
 using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE.
 
 Regards.
 
 
 
 [2002-07-18 09:15:39] [EMAIL PROTECTED]
 
 I use
 
 printer_set_option($handle, PRINTER_ORIENTATION,
 PRINTER_ORIENTATION_LANDSCAPE);
 
 to set the printer option and try to print some text in landscape
 (value=2) but the output still shows up in portrait (value=1).
 
 (printer_get_option($handle, PRINTER_ORIENTATION ) = 2);
 
 Thanks.
 
 
 
 
 
 -- 
 Edit this bug report at http://bugs.php.net/?id=18412edit=1
 

---
 Derick Rethans   http://www.derickrethans.nl/ 
 JDI Media Solutions   http://www.jdimedia.nl/
---



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




[PHP-DEV] Shopping Cart

2002-08-26 Thread [W]

i got a script for a shopping cart, like this :
?php
/*
Basket class for e-commerce purpose

Version : 0.4
Type:Class
Category:Shopping Carts
License: GNU General Public License

Description: This class provides methods for add, remove, update and remove
all items
from a basket. The basket works with a session cookie, saving the product ID
and quantity in an array for simple accesing it.
There's an example in this category... called Basket example using basket
class
*/

class basket {
 var $items;
 var $empty;

 function basket()
 {
  global $cart;
  if(isset($cart))
  {
   $this-items=unserialize(stripslashes($cart));
   if ( gettype($this-items) == array )
   {
$this-empty=false;
   }
   else
$this-empty=true;
  }
  else
   $this-empty=true;
}

function additem($id, $name, $count, $prix)
{
 if ($this-items[$id][1]  0 )
 {
  $this-items[$id][1]+=$count;
 }
 else
 {
  $this-items[$id][0]=$name;
  $this-items[$id][1]=$count;
  $this-items[$id][2]=$prix;
  $this-items[$id][3]=stripslashes($name);
 }
 setcookie(cart,serialize($this-items),0,/);
 $this-empty=false;
}

function removeitem($id) {
 if(!$this-empty)
 while(list($x,$y)=each($this-items)){
  if($x!=$id) $tmp[$x]=$y;
 }
 $this-items=$tmp;
 setcookie(cart,serialize($this-items),0,/);
 if(count($this-items)==0) $this-empty=true;
}

function resetArray($basket)
{
 reset($basket-items);
}

function countItems($basket)
{
 if(!$basket-empty)
 {
  while ( list($x,$y,) = each($basket-items) )
  {
   $ant++;
  }
 }
 return $ant;
}
function sumItems($basket)
{
 if(!$basket-empty)
 {
  while ( list($x,$y,) = each($basket-items) )
  {
   $ant = $ant + $y[1];
  }
 }
 return $ant;
}
function printItems($b)
{
 if(!$b-empty)
 {
  while ( list($x,$y,) = each($b-items) )
  {
   echo $x .$y[0].   .$y[1].  a
href=\$PHP_SELF?action=Rid=$x\Remove/abr;
  }
 }
}
function updateitem($id,$count){
 $this-items[$id][1]=$count;
 setcookie(cart,serialize($this-items),0,/);
}

function removeall(){
 setcookie(cart,NULL,0,/);
 $this-empty=true;
}

}
?
the problem is, i dont know how to use it. how to call the function, how to
display the cart..etc...anybody help me the novice :(

regards

[W]



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




[PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Derick Rethans

Tanes,

On Mon, 26 Aug 2002, Tanes Sriviroolchai wrote:

If you point me out where I can get latest sources in php4/ext/printer, I 
 would love to provide a patch for this problem. I don't know why source 
 codes of this module (printer) is not included in php distribution source 
 code.

It was moved to pear/PECL:

http://cvs.php.net/cvs.php/pear/PECL/printer

regards,
Derick

 From: Derick Rethans [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 CC: PHP Developers Mailing List [EMAIL PROTECTED]
 Subject: Re: #18412 [Com]: PRINTER_ORIENTATION
 Date: Mon, 26 Aug 2002 08:29:17 +0200 (CEST)
 
 Hello Tanes,
 
 would it be possible for you to make a patch to this function?
 
 regards,
 Derick
 
 On 26 Aug 2002 [EMAIL PROTECTED] wrote:
 
ID:   18412
Comment by:   [EMAIL PROTECTED]
Reported By:  [EMAIL PROTECTED]
Status:   Open
Bug Type: Unknown/Other Function
Operating System: win98
PHP Version:  4.2.1
New Comment:
  
   SUGGESTION
   ==
  
   After looking in source code (printer.c) carefully, I beleive that
   whatever you have set through has no effect. (I could be wrong if the
   source code I saw is too old. Anyway, it is the only one I can find.)
   The problem is that the steps of setting printing properties
   recommended by Microsoft are not followed. The printer_open() simply
   get current settings by calling DocumentProperties() with
   DM_OUT_BUFFER. Subsequent setting using printer_set_option() simply
   modifies these setting parameters in the buffer. Lacking of 2 steps in
   order to make setting printing options working,
   (1) modify resource-device-dmFields bit to indicate which parameters
   have been changed
   (2) Call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. The
   resource-device must be passed to the function also.
  
   I suggest modify printer_set_option() to modify
   resource-device-dmFields bit as well as resource-device-dmXXX and
   create another option parameter - PRINTER_SET_OPTION_NOW that will call
   DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER.
  
   Regards,
   Tanes Sriviroolchai
  
  
   Previous Comments:
   
  
   [2002-08-25 23:28:51] [EMAIL PROTECTED]
  
   I have the same problem with Win2000/IIS too. There is no effect on
   using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE.
  
   Regards.
  
   
  
   [2002-07-18 09:15:39] [EMAIL PROTECTED]
  
   I use
  
   printer_set_option($handle, PRINTER_ORIENTATION,
   PRINTER_ORIENTATION_LANDSCAPE);
  
   to set the printer option and try to print some text in landscape
   (value=2) but the output still shows up in portrait (value=1).
  
   (printer_get_option($handle, PRINTER_ORIENTATION ) = 2);
  
   Thanks.
  
  
   
  
  
   --
   Edit this bug report at http://bugs.php.net/?id=18412edit=1
  
 
 ---
   Derick Rethans   http://www.derickrethans.nl/
   JDI Media Solutions   http://www.jdimedia.nl/
 ---
 
 
 
 
 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com
 

---
 Derick Rethans   http://www.derickrethans.nl/ 
 JDI Media Solutions   http://www.jdimedia.nl/
---



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




Re: [PHP-DEV] UTF-8 encoding

2002-08-26 Thread Stefan Esser

On Sun, Aug 25, 2002 at 09:21:01PM +0200, Stig Venaas wrote:
 Great, I've been wondering why UTF-8 wasn't defined like that
 in the first place. Could you please give me a pointer to the
 addition?

It is defined in RFC 2279.

Regards,
Stefan


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




[PHP-DEV] JOIN for FREE ... Learn and Earn

2002-08-26 Thread Charles Cedeno

Hello:

My name is Charles Cedeno. I am now focusing in one online
opportunity.I have tried several of these opportunities full of hype
promising us thousands of dollars every month. I would get all excited and
run to my family and friends with another Great Money Maker .  It is a
sad fact that many people who are in need of additional income, are being
victimized by these fly by night scam artists. 
As a result of trying all these opportunities, I finally found the
company which is true to their words. Not full of hype, but consistently
send me the monthly check. They have given me the best compensation plan
with their high % commission. I didn't have to perform some juggling act
to maintain some 60 to 40% balance in my legs. It is not a pyramid, so
there are no legs. It is not one of those binary compensation plan
failures either. Everyone earns commissions here. They are providing a
real service not the one that simply transfers wealth from the new signups
to the people at the top.
When you join, you will have a team of up line sponsors who will help
you succeed every step of the way. Instead of being left alone, you will
be guided step by step by real people, not those auto responders. Only you
can make your own success together with the help of your sponsors. If you
have 2 to 3 hours a day, you will be able to earn a full income in a few
months. And there is absolutely no limit as to how much you can earn. It
is designed to gain momentum after some time. But I prefer to avoid such
statements as You will get rich. I read it everywhere and will not allow
myself to sound like them. I experienced it personally, you can be
comfortable. 
To get your FREE membership ID, send email to [EMAIL PROTECTED] and
put REGISTER ME FOR FREE in the subject and your full name in the body
of your email. Also include the statement below in the body of your email.
By submitting a request for a FREE DHS Club membership I agree to receive
emails from DHS Club for both their Consumer and Business Opportunities.
I will then register you into the system. You will receive a confirmation
email asking you to verify. Open it up and activate your free membership
immediately. Then set back and watch as your new business explodes.


Best regards,


Charles Cedeno


Note: You don't need to request for removal. This is a one-time email.
Your email address will be automatically de-activated in our list if you
don't respond to this mail.

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




[PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Tanes Sriviroolchai


Derick,
   If you point me out where I can get latest sources in php4/ext/printer, I 
would love to provide a patch for this problem. I don't know why source 
codes of this module (printer) is not included in php distribution source 
code.

Regards,
Tanes Sriviroolchai

From: Derick Rethans [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: PHP Developers Mailing List [EMAIL PROTECTED]
Subject: Re: #18412 [Com]: PRINTER_ORIENTATION
Date: Mon, 26 Aug 2002 08:29:17 +0200 (CEST)

Hello Tanes,

would it be possible for you to make a patch to this function?

regards,
Derick

On 26 Aug 2002 [EMAIL PROTECTED] wrote:

   ID:   18412
   Comment by:   [EMAIL PROTECTED]
   Reported By:  [EMAIL PROTECTED]
   Status:   Open
   Bug Type: Unknown/Other Function
   Operating System: win98
   PHP Version:  4.2.1
   New Comment:
 
  SUGGESTION
  ==
 
  After looking in source code (printer.c) carefully, I beleive that
  whatever you have set through has no effect. (I could be wrong if the
  source code I saw is too old. Anyway, it is the only one I can find.)
  The problem is that the steps of setting printing properties
  recommended by Microsoft are not followed. The printer_open() simply
  get current settings by calling DocumentProperties() with
  DM_OUT_BUFFER. Subsequent setting using printer_set_option() simply
  modifies these setting parameters in the buffer. Lacking of 2 steps in
  order to make setting printing options working,
  (1) modify resource-device-dmFields bit to indicate which parameters
  have been changed
  (2) Call DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER. The
  resource-device must be passed to the function also.
 
  I suggest modify printer_set_option() to modify
  resource-device-dmFields bit as well as resource-device-dmXXX and
  create another option parameter - PRINTER_SET_OPTION_NOW that will call
  DocumentProperties() with DM_OUT_BUFFER | DM_IN_BUFFER.
 
  Regards,
  Tanes Sriviroolchai
 
 
  Previous Comments:
  
 
  [2002-08-25 23:28:51] [EMAIL PROTECTED]
 
  I have the same problem with Win2000/IIS too. There is no effect on
  using printer_set_option with PRINTER_ORIENTATION_LANDSCAPE.
 
  Regards.
 
  
 
  [2002-07-18 09:15:39] [EMAIL PROTECTED]
 
  I use
 
  printer_set_option($handle, PRINTER_ORIENTATION,
  PRINTER_ORIENTATION_LANDSCAPE);
 
  to set the printer option and try to print some text in landscape
  (value=2) but the output still shows up in portrait (value=1).
 
  (printer_get_option($handle, PRINTER_ORIENTATION ) = 2);
 
  Thanks.
 
 
  
 
 
  --
  Edit this bug report at http://bugs.php.net/?id=18412edit=1
 

---
  Derick Rethans   http://www.derickrethans.nl/
  JDI Media Solutions   http://www.jdimedia.nl/
---




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP-DEV] Re: Transparent SID support

2002-08-26 Thread Giancarlo Pinerolo

There is a flagrant bug there that allows anyone to chose a session ID
of his choice, instead of relying on the random device.

I think this breaks some POSIX-MIT-RFC somewhere and can be the cause
of easy exploits.

I would then say hat for a bugfix release it should be reasonabe to
fix it,.
I am not saying that user choice of the unpredictable session-id
couldn't be a valid method in some cases, as well as other method as
suggested, but this the programmer must decide when and where.

If you are talking about usecurity of trans_sid, then letting anyone
decide it by an url, is even worse.

Giancarlo


Zeev Suraski wrote:
 
 - Transparent sid support is now disabled by default. (Yasuo)
 
 I haven't followed the trans-sid discussion closely, but did we decide to
 change the behavior within a bug-fix release??
 
 Zeev

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




[PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Tanes Sriviroolchai


Derick,
   Here are the patch files (printer.c.patch to be applied on printer.c and 
printer.php.patch to be applied on printer.php). In order to make settings 
effect, the printer_set_option($handle,PRINTER_SET_OPTIONS,0) should be 
called after send a series of settings. The third parameter in this case is 
ignored (but it must be supplied since I didn't change the way original 
printer_set_option() check parameters. I'd love to take a look on any 
problems my change might cause. Just mail me.

Regards,
Tanes Sriviroolchai


From: Derick Rethans [EMAIL PROTECTED]

TSIf you point me out where I can get latest sources in 
php4/ext/printer, I
TS would love to provide a patch for this problem. I don't know why source
TS codes of this module (printer) is not included in php distribution 
source
TS code.

DRIt was moved to pear/PECL:
DR
DRhttp://cvs.php.net/cvs.php/pear/PECL/printer
DR
DRregards,
DRDerick


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


*** org\printer.c   Fri May 17 18:49:42 2002
--- printer.c   Mon Aug 26 15:11:08 2002
***
*** 17,22 
--- 17,36 
 
+--+
   */

+ /*
+  * Modified by Tanes Sriviroolchai
+  * On Aug 26, 2002
+  *
+  * Modified function: printer_set_option()
+  * Reason: To make setting options working, the printer_set_option() must
+  * call Win32 API DocumentProperties() with DM_OUT_BUFFER |
+  * DM_IN_BUFFER in order for all settings in resource-device to
+  * be effected. Also, while setting parameters dmXXX in resource-
+  * device, a bit mask resource-dmFields of correspondent setting
+  * should be set too.
+  *
+  */
+
  /* $Id: printer.c,v 1.23 2002/05/17 18:49:42 fmk Exp $ */

  #ifdef HAVE_CONFIG_H
***
*** 146,151 
--- 160,166 
  #define TEXT_ALIGN12
  #define DEVICENAME13
  #define DRIVER_VERSION14
+ #define SET_OPTIONS   99
  #define BRUSH_SOLID   -1
  #define BRUSH_CUSTOM  -2

***
*** 176,181 
--- 191,197 
REGP_CONSTANT(PRINTER_TITLE,  TITLE);
REGP_CONSTANT(PRINTER_DEVICENAME, DEVICENAME);
REGP_CONSTANT(PRINTER_DRIVERVERSION,  DRIVER_VERSION);
+   REGP_CONSTANT(PRINTER_SET_OPTIONS,SET_OPTIONS);
REGP_CONSTANT(PRINTER_RESOLUTION_Y,   YRESOLUTION);
REGP_CONSTANT(PRINTER_RESOLUTION_X,   XRESOLUTION);
REGP_CONSTANT(PRINTER_SCALE,  SCALE);
***
*** 484,489 
--- 500,506 
case COPIES:
convert_to_long_ex(arg3);
resource-device-dmCopies  = 
(short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_COPIES;
break;

case MODE:
***
*** 501,536 
--- 518,560 
case ORIENTATION:
convert_to_long_ex(arg3);
resource-device-dmOrientation = (short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_ORIENTATION;
break;

case YRESOLUTION:
convert_to_long_ex(arg3);
resource-device-dmYResolution = (short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_YRESOLUTION;
break;

case XRESOLUTION:
convert_to_long_ex(arg3);
resource-device-dmPrintQuality= (short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_PRINTQUALITY;
break;

case PAPER_FORMAT:
convert_to_long_ex(arg3);
resource-device-dmPaperSize   = (short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_PAPERSIZE;
break;

case PAPER_LENGTH:
convert_to_long_ex(arg3);
resource-device-dmPaperLength = Z_LVAL_PP(arg3) * 10;
+   resource-device-dmFields |= DM_PAPERLENGTH;
break;

case PAPER_WIDTH:
convert_to_long_ex(arg3);
resource-device-dmPaperWidth  = Z_LVAL_PP(arg3) * 10;
+   resource-device-dmFields |= DM_PAPERWIDTH;
break;

case SCALE:
convert_to_long_ex(arg3);
resource-device-dmScale   = 
(short)Z_LVAL_PP(arg3);
+   resource-device-dmFields |= DM_SCALE;
break;

case 

[PHP-DEV] [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Lukas Schroeder

hi,

here's another shot of the current apache_hooks code.

there are some issues with startup and cleanup currently.
and the patch messes a bit with php's startup procedure.

still missing is access to array_header (think headers_in, headers_out,
headers_err) and table slot in request_rec, as is access to the
whole connection structure of the request.

but the string and int fields can be read and where appropriate written
to. and there are some methods that wrap the ap_ family.



regards,
  -lukas

PS: it's still not doing too useful things.

PPS: but if you configure your .htaccess appropriately you can use the access
handler.

,-
| error_log('access handler');
| 
| $type = $request-auth_type();
| $name = $request-auth_name();
| $pw = ;
| $s = $request-basic_auth_pw($pw);
| 
| error_log(T $type; N $name; P $pw);
| if ($pw == f0ofoo) return OK;
|
| return AUTH_REQUIRED;
`



Index: sapi/apache/mod_php4.c
===
RCS file: /repository/php4/sapi/apache/mod_php4.c,v
retrieving revision 1.138
diff -u -r1.138 mod_php4.c
--- sapi/apache/mod_php4.c  19 Aug 2002 15:52:21 -  1.138
+++ sapi/apache/mod_php4.c  26 Aug 2002 09:26:53 -
 -34,6 +34,7 
 /* {{{ Prototypes
  */
 int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC);
+int apache_php_module_hook(request_rec *r, char *filename, zval **ret TSRMLS_DC);
 void php_save_umask(void);
 void php_restore_umask(void);
 int sapi_apache_read_post(char *buffer, uint count_bytes TSRMLS_DC);
 -45,6 +46,7 
 static int send_parsed_php_source(request_rec * r);
 int php_xbithack_handler(request_rec * r);
 void php_init_handler(server_rec *s, pool *p);
+
 /* }}} */
 
 #if MODULE_MAGIC_NUMBER = 19970728
 -70,6 +72,7 
 module MODULE_VAR_EXPORT php4_module;
 
 int saved_umask;
+//static int setup_env = 0;
 static unsigned char apache_php_initialized;
 
 typedef struct _php_per_dir_entry {
 -296,6 +299,9 
AP(in_request) = 0;
php_request_shutdown(dummy);
}
+if(AP(setup_env)) {
+AP(setup_env) = 0;
+}
 }
 /* }}} */
 
 -649,13 +655,13 
 static void *php_create_dir(pool *p, char *dummy)
 {
HashTable *per_dir_info;
-
per_dir_info = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(per_dir_info, 5, NULL, (void (*)(void *)) 
destroy_per_dir_entry, 1, 0);
register_cleanup(p, (void *) per_dir_info, (void (*)(void *)) 
php_destroy_per_dir_info, (void (*)(void *)) zend_hash_destroy);
 
return per_dir_info;
 }
+
 /* }}} */
 
 /* {{{ php_merge_dir
 -668,6 +674,7 
 }
 /* }}} */
 
+
 /* {{{ php_apache_value_handler_ex
  */
 CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char 
*arg1, char *arg2, int mode)
 -835,6 +842,82 
 }
 /* }}} */
 
+static int php_run_hook(request_rec *r, char *handler)
+{
+   zval *ret = NULL;
+   HashTable *conf;
+
+   TSRMLS_FETCH();
+
+   if (!AP(apache_config_loaded)) {
+   conf = (HashTable *) get_module_config(r-per_dir_config, 
+php4_module);
+   if (conf)
+  zend_hash_apply((HashTable *)conf, (apply_func_t) 
+php_apache_alter_ini_entries TSRMLS_CC);
+   AP(apache_config_loaded) = 1;
+   }
+
+   if (!handler)
+   return DECLINED;
+   
+   hard_timeout(send, r);
+   SG(server_context) = r;
+   php_save_umask();
+   if (!AP(setup_env)) {
+   add_common_vars(r);
+   add_cgi_vars(r);
+   AP(setup_env) = 1;
+   }
+   init_request_info(TSRMLS_C);
+   apache_php_module_hook(r, handler, ret TSRMLS_CC);
+   php_restore_umask();
+   kill_timeout(r);
+   
+   if (ret) {
+   convert_to_long(ret);
+   return Z_LVAL_P(ret);
+   }
+
+   return HTTP_INTERNAL_SERVER_ERROR;
+}
+
+
+static int php_uri_translation(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(uri_handler));
+}
+
+static int php_auth_hook(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(auth_handler));
+}
+
+static int php_access_hook(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(access_handler));
+}
+
+static int php_type_hook(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(type_handler));
+}
+
+static int php_fixup_hook(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(fixup_handler));
+}
+
+static int php_logger_hook(request_rec *r)
+{
+   fprintf(stderr, HOOK: %s\n, __FUNCTION__);
+   return php_run_hook(r, AP(logger_handler));
+}
+ 
+
 /* {{{ handler_rec php_handlers[]
  */
 handler_rec php_handlers[] =
 -858,7 +941,7 
 };
 /* }}} */
 
-/* {{{ odule MODULE_VAR_EXPORT php4_module
+/* 

Re: [PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Wez Furlong

Hi Tanes,

I think it would make sense to bring that PRINTER_SET_OPTIONS code
within printer_start_doc() so that this problem is fixed more transparently,
as it seems like something that will always be called, so why force the
user to have an extra line of code?

--Wez.





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




RE: [PHP-DEV] imap_mail_compose() for 4.2.3?

2002-08-26 Thread Lukas Smith

 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
On
 Behalf Of Jani Taskinen
 Sent: Monday, August 26, 2002 3:59 AM
 
 On Sun, 25 Aug 2002, Lukas Smith wrote:
 
 Anyways with the current version of php we have some problems with
the
 imap support. Mainly with imap_mail_compose(). Those issues seem to
be
 fixed in the cvs version of php 4.3, but that fix is not in 4.2.3 (we
 tried and it did not work).
 
 I think Jani Taskinen said that he did some changes to imap a while
back
 when I asked about imap_mail_compose(), so maybe he knows some
further
 details.
 
 Please try the PHP_4_2_0 branch now. I've merged some of the fixes
 from HEAD now.
 
 --Jani
 

Great, that fixed our issues.
 
Thx,
Lukas


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




Re: [PHP-DEV] Re: #18412 [Com]: PRINTER_ORIENTATION

2002-08-26 Thread Tanes Sriviroolchai




From: Wez Furlong [EMAIL PROTECTED]


I think it would make sense to bring that PRINTER_SET_OPTIONS code
within printer_start_doc() so that this problem is fixed more 
transparently,
as it seems like something that will always be called, so why force the
user to have an extra line of code?

--Wez.


Wez,
   If the changes was made within printer_start_doc() that meaned every time 
you called printer_start_doc(), the DC should be recreated. For my first 
proposed solution, an extra (one line of code) must be added. (I think it is 
alright since the code has never worked before!) I'm not sure which way is 
the right way. Anyone? I'm ok with either way.

Regards,
Tanes Sriviroolchai


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP-DEV] Reading PDF

2002-08-26 Thread Yuri Generalov

Hi,

Is it possible to read the contents of PDF files from PHP?

Yuri Generalov
http://bookle.com/
http://cactus-books.com/



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




[PHP-DEV] error_log() and output buffering

2002-08-26 Thread Sebastian Bergmann

Sebastian Bergmann wrote:
 Marcus Boerger wrote:
 To have ob_start() working again i first allowed
 array(object,method).

 Thanks, XML_Transformer works again with HEAD.

  With HEAD, the server offers me the script's result as a download in 
  both Mozilla 1.0.0 and MSIE 6 when XML_Transformer runs in debug mode.

  If XML_Transformer's debug mode is disabled, it works just fine.

  The only difference between the two modes is that in debug mode
  error_log() is used to collect debugging information.

  Is error_log() affected by any of the recent output buffering patches?

-- 
  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] error_log() and output buffering

2002-08-26 Thread Marcus Börger

At 17:16 26.08.2002, Sebastian Bergmann wrote:
Sebastian Bergmann wrote:
  Marcus Boerger wrote:
  To have ob_start() working again i first allowed
  array(object,method).
 
  Thanks, XML_Transformer works again with HEAD.

   With HEAD, the server offers me the script's result as a download in
   both Mozilla 1.0.0 and MSIE 6 when XML_Transformer runs in debug mode.

   If XML_Transformer's debug mode is disabled, it works just fine.

   The only difference between the two modes is that in debug mode
   error_log() is used to collect debugging information.

   Is error_log() affected by any of the recent output buffering patches?

Which SAPI do you use mod_apache or cgi?


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




Re: [PHP-DEV] error_log() and output buffering

2002-08-26 Thread Sebastian Bergmann

Marcus Börger wrote:
 Which SAPI do you use mod_apache or cgi?

  CGI

-- 
  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] ISAPI Crash Debugging Notes

2002-08-26 Thread Michael Sisolak

I've been doing some debugging of the crashes when running PHP under
the ISAPI sapi.  Is anybody else currently looking at this?  If you are
let's talk - here are my notes so far.

I can make my install of PHP (4.2.1, a debug build) throw an exception
on the first load after an IISReset 90% of the time.  My code is a PHP
page that loads another PHP page as the stylesheet - so I end up with
two PHP page loads running at the same time.  The exception is thrown
in the php_request_shutdown call at the end of the HttpExtensionProc. 
I'm working on tracking down where the exception is coming from, but
one thing I've noticed so far is that the first thread that gets to the
shutdown_memory_manager call (inside php_request_shutdown) reports a
lot of leaks.  I find this to be quite odd, and am beginning to wonder
if it is mis-reporting the memory of the second thread as if they were
leaks of the first.  It's just a hunch so far - I haven't been able to
come up with any evidence, and my understanding of the thread-safe
memory managment is quite shallow.

Having done some more work I believe that the exception I'm getting is
coming from inside the zend_hash_reverse_apply call in
shutdown_executor.  The one to clear the function_table completes
correctly, but then the class_table one fails (my main PHP file does
include a series of classes).

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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




Re: [PHP-DEV] error_log() and output buffering

2002-08-26 Thread Marcus Börger

At 17:16 26.08.2002, Sebastian Bergmann wrote:
Sebastian Bergmann wrote:
  Marcus Boerger wrote:
  To have ob_start() working again i first allowed
  array(object,method).
 
  Thanks, XML_Transformer works again with HEAD.

   With HEAD, the server offers me the script's result as a download in
   both Mozilla 1.0.0 and MSIE 6 when XML_Transformer runs in debug mode.

   If XML_Transformer's debug mode is disabled, it works just fine.

   The only difference between the two modes is that in debug mode
   error_log() is used to collect debugging information.

   Is error_log() affected by any of the recent output buffering patches?


In mod_apache this maps to either aplog_error() or to log_error() which are
apache functions.

In cgi this simply maps fprintf(stderr,...). I must see if this can cause the
problem...that'll take some time becaause i have to change my sapi...

marcus


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




[PHP-DEV] error_log()

2002-08-26 Thread Marcus Boerger

During analysis of error_log i remembered it's lack to be integrated in
php_error() mechanism.

We could implement behaviour 5 and emit an E_USER_xxx message
with the name of the user function being executed.

Any comments?

marcus



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




Re: [PHP-DEV] error_log() and output buffering

2002-08-26 Thread Sebastian Bergmann

Marcus Börger wrote:
 In cgi this simply maps fprintf(stderr,...). I must see if this can 
 cause the problem.

  Just tested it with the Apache 2.0 Filter SAPI and it works fine.
  I guess this answers the question of whether or not it's sapi/cgi
  related.

-- 
  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] Apache 2.0 Filter SAPI and error_log()

2002-08-26 Thread Sebastian Bergmann

  I just noticed that when using error_log() in a Apache 2.0 Filter
  environment error.log entries are not prefixed with a stamp like

[Mon Aug 26 18:33:13 2002] [error] [client 192.168.0.1] ... text ...

-- 
  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] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread George Schlossnagle

Here's an incremental patch on Lukas' patch which tries to address a 
couple issues:

o  The startup sequence has been changed to allow for post-data to make 
it through if any hooks before full post-data is read are called
o  works under register_globals Off ($request is now available in the 
SERVER var hash when register globals is enabled)
o  all hooks and the 'main' content handler all share a common scope 
(there is only one call to zend_startup, and only one shutdown).  This 
is significantly cheaper plus it allows for handy stuff like creating 
data structures in a hook and magicall passing them to other hooks or 
into the main script.  This is experimental and may break some of the 
other sapi modules as-is (though that clearly wasn't the intention ;)

George


Lukas Schroeder wrote:

hi,

here's another shot of the current apache_hooks code.

there are some issues with startup and cleanup currently.
and the patch messes a bit with php's startup procedure.

still missing is access to array_header (think headers_in, headers_out,
headers_err) and table slot in request_rec, as is access to the
whole connection structure of the request.

but the string and int fields can be read and where appropriate written
to. and there are some methods that wrap the ap_ family.



regards,
  -lukas





diff -u3 -r php4-lucas3/main/SAPI.c php4-george/main/SAPI.c
--- php4-lucas3/main/SAPI.c Mon Aug 26 11:44:12 2002
+++ php4-george/main/SAPI.c Mon Aug 26 12:05:51 2002
 -382,6 +382,7 
SG(sapi_headers).mimetype = NULL;
}
sapi_send_headers_free(TSRMLS_C);
+SG(sapi_started) = 0;
 }
 
 
diff -u3 -r php4-lucas3/main/SAPI.h php4-george/main/SAPI.h
--- php4-lucas3/main/SAPI.h Mon Aug 26 11:44:12 2002
+++ php4-george/main/SAPI.h Mon Aug 26 12:04:04 2002
 -117,6 +117,7 
HashTable *rfc1867_uploaded_files;
long post_max_size;
 int options;
+zend_bool sapi_started;
 } sapi_globals_struct;
 
 
diff -u3 -r php4-lucas3/main/main.c php4-george/main/main.c
--- php4-lucas3/main/main.c Mon Aug 26 11:45:03 2002
+++ php4-george/main/main.c Mon Aug 26 12:42:10 2002
 -816,54 +816,52 
 /* {{{ php_request_startup
  */
 int php_request_startup(TSRMLS_D)
-{
-   int retval = SUCCESS;
-
+{   
+int retval = SUCCESS;
 #if PHP_SIGCHILD
-   signal(SIGCHLD, sigchld_handler);
-#endif
-
-   zend_try {
-   PG(during_request_startup) = 1;
-   
-   php_output_activate(TSRMLS_C);
-
-   /* initialize global variables */
-   PG(modules_activated) = 0;
-   PG(header_is_being_sent) = 0;
-   PG(connection_status) = PHP_CONNECTION_NORMAL;
-   
-   zend_activate(TSRMLS_C);
-   sapi_activate(TSRMLS_C);
-
-   zend_set_timeout(EG(timeout_seconds));
-
-   if (PG(expose_php)) {
-   sapi_add_header(SAPI_PHP_VERSION_HEADER, 
sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);
-   }
-
-   if (PG(output_handler)  PG(output_handler)[0]) {
-   php_start_ob_buffer_named(PG(output_handler), 0, 1 TSRMLS_CC);
-   }
-   else if (PG(output_buffering)) {
-   php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
-   }
-   else if (PG(implicit_flush)) {
-   php_start_implicit_flush(TSRMLS_C);
-   }
-
-   /* We turn this off in php_execute_script() */
-   /* PG(during_request_startup) = 0; */
-
-   php_hash_environment(TSRMLS_C);
-   zend_activate_modules(TSRMLS_C);
-   PG(modules_activated)=1;
-   } zend_catch {
-   retval = FAILURE;
-   } zend_end_try();
+signal(SIGCHLD, sigchld_handler);
+#endif  
+if(!SG(sapi_started)) {
+zend_try {
+PG(during_request_startup) = 1;
+
+/* initialize global variables */
+PG(modules_activated) = 0;
+PG(header_is_being_sent) = 0;
+PG(connection_status) = PHP_CONNECTION_NORMAL;
+
+zend_activate(TSRMLS_C);
+zend_set_timeout(EG(timeout_seconds));
+zend_activate_modules(TSRMLS_C);
+PG(modules_activated)=1;
+} zend_catch {
+retval = FAILURE;
+} zend_end_try();
+SG(sapi_started) = 1;
+}   
+php_output_activate(TSRMLS_C);
+sapi_activate(TSRMLS_C);
+php_hash_environment(TSRMLS_C);
+zend_try {
+if (PG(expose_php)) {
+sapi_add_header(SAPI_PHP_VERSION_HEADER, 
+sizeof(SAPI_PHP_VERSION_HEADER)-1, 1);
+}
+if (PG(output_handler)  PG(output_handler)[0]) {
+php_start_ob_buffer_named(PG(output_handler), 0, 1 TSRMLS_CC);
+}
+else if (PG(output_buffering)) {
+php_start_ob_buffer(NULL, 0, 1 TSRMLS_CC);
+}

Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Rasmus Lerdorf

I say commit it.  This stuff is very experimental as it is and lives in
its own branch.  You are not going to destabilize anything.

(I just made sure you had enough karma for the commit)

-Rasmus

On Mon, 26 Aug 2002, George Schlossnagle wrote:

 Here's an incremental patch on Lukas' patch which tries to address a
 couple issues:

 o  The startup sequence has been changed to allow for post-data to make
 it through if any hooks before full post-data is read are called
 o  works under register_globals Off ($request is now available in the
 SERVER var hash when register globals is enabled)
 o  all hooks and the 'main' content handler all share a common scope
 (there is only one call to zend_startup, and only one shutdown).  This
 is significantly cheaper plus it allows for handy stuff like creating
 data structures in a hook and magicall passing them to other hooks or
 into the main script.  This is experimental and may break some of the
 other sapi modules as-is (though that clearly wasn't the intention ;)

 George


 Lukas Schroeder wrote:

 hi,
 
 here's another shot of the current apache_hooks code.
 
 there are some issues with startup and cleanup currently.
 and the patch messes a bit with php's startup procedure.
 
 still missing is access to array_header (think headers_in, headers_out,
 headers_err) and table slot in request_rec, as is access to the
 whole connection structure of the request.
 
 but the string and int fields can be read and where appropriate written
 to. and there are some methods that wrap the ap_ family.
 
 
 
 regards,
   -lukas
 





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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread George Schlossnagle

All of this work was off HEAD.  Should a  new_apache_hooks branch be tagged?

Rasmus Lerdorf wrote:

I say commit it.  This stuff is very experimental as it is and lives in
its own branch.  You are not going to destabilize anything.

(I just made sure you had enough karma for the commit)

-Rasmus




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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Rasmus Lerdorf

I think if we put this in 4.3 we are going to delay 4.3 even further.
Although, I suppose if we are careful and make sure we #ifdef it nicely
and only turn it on with a configure option, we can put it in HEAD.

So, is your patch my apache_hooks stuff + Lukas's work and then your stuff
on top?

On Mon, 26 Aug 2002, George Schlossnagle wrote:

 All of this work was off HEAD.  Should a  new_apache_hooks branch be tagged?

 Rasmus Lerdorf wrote:

 I say commit it.  This stuff is very experimental as it is and lives in
 its own branch.  You are not going to destabilize anything.
 
 (I just made sure you had enough karma for the commit)
 
 -Rasmus
 




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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread George Schlossnagle

I wasn't proposing putting it in HEAD, just that the work was done 
against HEAD not against your apache_hooks.  Lukas redid all the 
php-apache request object work fresh off of head, and I made changes 
off of that, so it contains nothing from your apache_hooks branch.

Rasmus Lerdorf wrote:

I think if we put this in 4.3 we are going to delay 4.3 even further.
Although, I suppose if we are careful and make sure we #ifdef it nicely
and only turn it on with a configure option, we can put it in HEAD.

So, is your patch my apache_hooks stuff + Lukas's work and then your stuff
on top?

On Mon, 26 Aug 2002, George Schlossnagle wrote:

All of this work was off HEAD.  Should a  new_apache_hooks branch be tagged?

Rasmus Lerdorf wrote:

I say commit it.  This stuff is very experimental as it is and lives in
its own branch.  You are not going to destabilize anything.

(I just made sure you had enough karma for the commit)

-Rasmus








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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Rasmus Lerdorf

Well, the problem with doing it on a branch, the way I did, and as Lukas
found out, is that it goes rather stale after a while.  So I guess that I
am actually proposing putting it in HEAD but #ifdef'ed out and perhaps not
even providing a user-visible config option for it yet.  You'd need to set
a CFLAGS -DHOOKS=1 to activate it for now.

-Rasmus

On Mon, 26 Aug 2002, George Schlossnagle wrote:

 I wasn't proposing putting it in HEAD, just that the work was done
 against HEAD not against your apache_hooks.  Lukas redid all the
 php-apache request object work fresh off of head, and I made changes
 off of that, so it contains nothing from your apache_hooks branch.

 Rasmus Lerdorf wrote:

 I think if we put this in 4.3 we are going to delay 4.3 even further.
 Although, I suppose if we are careful and make sure we #ifdef it nicely
 and only turn it on with a configure option, we can put it in HEAD.
 
 So, is your patch my apache_hooks stuff + Lukas's work and then your stuff
 on top?
 
 On Mon, 26 Aug 2002, George Schlossnagle wrote:
 
 All of this work was off HEAD.  Should a  new_apache_hooks branch be tagged?
 
 Rasmus Lerdorf wrote:
 
 I say commit it.  This stuff is very experimental as it is and lives in
 its own branch.  You are not going to destabilize anything.
 
 (I just made sure you had enough karma for the commit)
 
 -Rasmus
 
 
 
 





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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread derick

On Mon, 26 Aug 2002, Rasmus Lerdorf wrote:

 Yeah, but the point, at least for now is that the code really isn't meant
 to even be used by QA folks yet.  It is work targeted for PHP 5.

hmm... starting with a PHP5 branch would be a little early now don't you 
think? Well, after 4.3.0 is branched I guess the next release would be 
PHP 5 so it's not that far away. If only Stig would start with the 
branch :) Anyway, I'm more in favor of having this nice hook stuff 
in a seperate branch than with 'magic' things like setting defines.

Derick

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



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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Rasmus Lerdorf

 On Mon, 26 Aug 2002, Rasmus Lerdorf wrote:

  Yeah, but the point, at least for now is that the code really isn't meant
  to even be used by QA folks yet.  It is work targeted for PHP 5.

 hmm... starting with a PHP5 branch would be a little early now don't you
 think?

Yup - hence the confusion on where to stick this stuff.

 Well, after 4.3.0 is branched I guess the next release would be
 PHP 5 so it's not that far away. If only Stig would start with the
 branch :) Anyway, I'm more in favor of having this nice hook stuff
 in a seperate branch than with 'magic' things like setting defines.

We can do that, it's just more work to keep it current and as we all know,
merging branches in CVS just is not a good thing to do.

-Rasmus


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




[PHP-DEV] Username change or alias

2002-08-26 Thread Erica Douglass

Hi,

I signed up as SlashChick to join the php-doc team. I didn't realize
that this would result in a [EMAIL PROTECTED] email forward! 

I'd like to request a username change to Erica, since that's my real
name. Thus, I would like the forward to be [EMAIL PROTECTED] and my login
name to be erica as well.

Please let me know whether or not this is possible!

Thanks,
Erica Douglass


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




Re: [PHP-DEV] Username change or alias

2002-08-26 Thread Rasmus Lerdorf

Submit a new request through www.php.net/cvs-php.php and I will remove the
old one.

On Mon, 26 Aug 2002, Erica Douglass wrote:

 Hi,

 I signed up as SlashChick to join the php-doc team. I didn't realize
 that this would result in a [EMAIL PROTECTED] email forward!

 I'd like to request a username change to Erica, since that's my real
 name. Thus, I would like the forward to be [EMAIL PROTECTED] and my login
 name to be erica as well.

 Please let me know whether or not this is possible!

 Thanks,
 Erica Douglass


 --
 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] CVS Account Request: erica

2002-08-26 Thread Erica Douglass

Duplicate -- please remove SlashChick

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




[PHP-DEV] Thread safety failure in EG(function_table)?

2002-08-26 Thread Michael Sisolak

I believe that I can reproduce a thread safety failure in init_executor
(as called from the ISAPI sapi).  I have a PHP script page that loads
the stylesheet as a PHP page - thus causing two almost simultaneous
page loads.  I assume that if in init_executor() directly after
EG(function_table) = CG(function_table); I dump out any non-internal
functions in the function_table I shouldn't find any (as no script page
has been loaded yet in that thread).  That's how it works when my main
page loads, but when the second page load happens the functions from
the first page show up in the function_table for the second!  Once one
of the threads releases it's local functions, the other still believes
they are valid and tries to release them also creating quite a mess.

Is there any legitimate way this could happen?  I'm pretty much at the
end of my ability to debug much deeper into the Zend Engine code and
still be able to understand what's going on, but this looks really odd
to me.

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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




Re: [PHP-DEV] apache 2.40

2002-08-26 Thread Rasmus Lerdorf

 Is it now safe to set up apache 2 with php in a production server?

Nope

 When will it be safe?

Depends which Apache2 MPM you use.  Hopefully by PHP 4.3 it should be safe
for the prefork MPM.  For any other MPM, perhaps never.  We should be able
to get the threaded ones stable with a limited set of extensions
eventually, but don't hold your breath on that one.

 When will next version of php  be relised?

When we finish it.

-Rasmus


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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Lukas Schroeder


On Mon, Aug 26, 2002 at 11:18:38AM -0700, Rasmus Lerdorf wrote:
  Well, after 4.3.0 is branched I guess the next release would be
  PHP 5 so it's not that far away. If only Stig would start with the
  branch :) Anyway, I'm more in favor of having this nice hook stuff
  in a seperate branch than with 'magic' things like setting defines.
 
 We can do that, it's just more work to keep it current and as we all know,
 merging branches in CVS just is not a good thing to do.

i offer to do the ugly work.
i put it into the branch for now, so i dont even have to think i tiny
bit about breaking anything. and if time comes, i'll prepare the
necessary patch sets to merge into the php5 branch, without having to
use the dreaded cvs merge branch 'feature'.

would that be a deal?
if so, i'll commit it to apache_hooks today...


regards,
  -lukas



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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Rasmus Lerdorf

 i offer to do the ugly work.
 i put it into the branch for now, so i dont even have to think i tiny
 bit about breaking anything. and if time comes, i'll prepare the
 necessary patch sets to merge into the php5 branch, without having to
 use the dreaded cvs merge branch 'feature'.

 would that be a deal?
 if so, i'll commit it to apache_hooks today...

Go for it.  Having it in a branch is the safest approach.

-Rasmus


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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Lukas Schroeder

On Mon, Aug 26, 2002 at 02:59:01PM -0400, George Schlossnagle wrote:
 I actually just made a 'new_apache_hooks' branch and am about to commit 
 it all there

argh. so, what now?
i don't like having two branches for this.




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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread George Schlossnagle

If you want to pull everything into the apche_hooks branch, I can do 
that as well.  But if we do that, it would probably wise to update 
everything in that branch to HEAD.


George Schlossnagle wrote:

 I haven't committed anything yet.  It seems like the benefit of 
 starting with a fresh copy of HEAD is taht, well, it's a fresh copy of 
 HEAD. Since there is nothing used from the old apache_hooks branch it 
 makes sense to me to start afresh.  new name/old name makes no 
 difference to me.

 Lukas Schroeder wrote:

 On Mon, Aug 26, 2002 at 02:59:01PM -0400, George Schlossnagle wrote:

 I actually just made a 'new_apache_hooks' branch and am about to 
 commit it all there


 argh. so, what now?
 i don't like having two branches for this.












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




RE: [PHP-DEV] apache 2.40

2002-08-26 Thread Preston L. Bannister

Might depend on their usage.

Using Apache 2 with PHP through CGI or FastCGI should be OK.

PHP as an Apache 2 module you'd expect to take a bit longer to settle down -
especially if threading is involved.


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 11:50 AM
To: Jonas Eriksson

 Is it now safe to set up apache 2 with php in a production server?

Nope

 When will it be safe?

Depends which Apache2 MPM you use.  Hopefully by PHP 4.3 it should be safe
for the prefork MPM.  For any other MPM, perhaps never.  We should be able
to get the threaded ones stable with a limited set of extensions
eventually, but don't hold your breath on that one.

 When will next version of php  be relised?

When we finish it.

-Rasmus


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




Re: [PHP-DEV] apache 2.40

2002-08-26 Thread Aaron Bannert

On Mon, Aug 26, 2002 at 12:27:34PM -0700, Preston L. Bannister wrote:
 Might depend on their usage.
 
 Using Apache 2 with PHP through CGI or FastCGI should be OK.
 
 PHP as an Apache 2 module you'd expect to take a bit longer to settle down -
 especially if threading is involved.

It most definately depends on their usage. I have had no problems
with the postgres connector under php 4.2.2 and apache 2.0 w/ the
apache2filter sapi module, under fairly consistent load, for the
last few months. I doubt, however, that I would be so lucky if
I threw in a few other 3rd party modules.

-aaron

p.s. I'm using the threaded worker MPM under Linux 2.2.

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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread George Schlossnagle

Ok, this has all been added to the apache_hooks branch, which is now 
up-to-date.

George Schlossnagle wrote:

 If you want to pull everything into the apche_hooks branch, I can do 
 that as well.  But if we do that, it would probably wise to update 
 everything in that branch to HEAD.


 George Schlossnagle wrote:

 I haven't committed anything yet.  It seems like the benefit of 
 starting with a fresh copy of HEAD is taht, well, it's a fresh copy 
 of HEAD. Since there is nothing used from the old apache_hooks branch 
 it makes sense to me to start afresh.  new name/old name makes no 
 difference to me.

 Lukas Schroeder wrote:

 On Mon, Aug 26, 2002 at 02:59:01PM -0400, George Schlossnagle wrote:

 I actually just made a 'new_apache_hooks' branch and am about to 
 commit it all there


 argh. so, what now?
 i don't like having two branches for this.
















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




Re: [PHP-DEV] Re: [rfc] apache_hooks update (yet incomplete)

2002-08-26 Thread Edin Kadribasic

 Ok, this has all been added to the apache_hooks branch, which is now
 up-to-date.

Very nice. IMHO this should be merged into HEAD as soon as PHP_4_3_0 is
branched off.

Edin


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




[PHP-DEV] New config.m4 for ext/xmlrpc

2002-08-26 Thread Brian France

I tried to build xmlrpc as a shared extension (phpize, ./configure, 
make), but when it builds it didn't have dependences for libexpat and 
libiconv, but the expat, libiconv and XMLRPC_ functions are undefined.

While trying to fix this I rewrote the config.m4 to handle all the 
following build cases:

1)  built-in to PHP with libxmlrpc included from extension directory
 --with-xmlrpc

2)  built-in to PHP with shared libxmlrpc
 --with-xmlrpc --with-libxmlrpc=/usr/local

3)  built shared with libxmlrpc included from extension directory
 --with-xmlrpc=shared

4)  built shared with shared libxmlrpc
 --with-xmlrpc=shared --with-libxmlrpc=/usr/local


There is one part I don't like and that is the new option of 
--with-libxmlrpc is only used in a state where it is not equal to 
'yes' or 'no'.  It would have a directory value, but I don't like how 
it I did it.

Is this the best way to handle it?  Comments? Should I open a bug and 
submit this?

For the new config.m4 to work, xmlrpc-epi-php.c needs this changed:

#ifndef PHP_WIN32
#include php_config.h
#endif

to:

#ifdef HAVE_CONFIG_H
#include config.h
#endif

Also what does PHP_FAST_OUTPUT do?

Thanks,

Brian

--

sinclude(ext/xmlrpc/libxmlrpc/acinclude.m4)
sinclude(ext/xmlrpc/libxmlrpc/xmlrpc.m4)
sinclude(libxmlrpc/acinclude.m4)
sinclude(libxmlrpc/xmlrpc.m4)

PHP_ARG_WITH(xmlrpc, for XMLRPC-EPI support,
[  --with-xmlrpc Include XMLRPC-EPI support.])

PHP_ARG_WITH(libxmlrpc, Use shared libxmlrpc for XMLRPC-EPI,
[  --with-libxmlrpc[=DIR]   Will build and include the local copy of 
XMLRPC-EPI,
 unless the DIR is set. ])

PHP_ARG_WITH(expat-dir, libexpat dir for XMLRPC-EPI,
[  --with-expat-dir=DIR  XMLRPC-EPI: libexpat dir for XMLRPC-EPI.])


if test $PHP_XMLRPC != no; then

 PHP_EXTENSION(xmlrpc, $ext_shared)
 PHP_SUBST(XMLRPC_SHARED_LIBADD)

 if test $PHP_LIBXMLRPC = no || test $PHP_LIBXMLRPC = yes; then
 XMLRPC_CHECKS
 XMLRPC_SHARED_LIBADD=libxmlrpc/libxmlrpc.la
 XMLRPC_LIBADD=libxmlrpc/libxmlrpc.la
 XMLRPC_SUBDIRS=libxmlrpc
 PHP_SUBST(XMLRPC_LIBADD)
 PHP_SUBST(XMLRPC_SUBDIRS)
 AC_DEFINE(HAVE_BUNDLED_XMLRPC, 1, [ ])
 dnl  PHP_FAST_OUTPUT($ext_builddir/libxmlrpc/Makefile)
 LIB_BUILD($ext_builddir/libxmlrpc,$ext_shared,yes)

 PHP_ADD_INCLUDE($ext_srcdir/libxmlrpc)
 else
 if test -r $PHP_XMLRPC/include/xmlrpc.h; then
   XMLRPC_DIR=$PHP_XMLRPC
 else
   AC_MSG_CHECKING([for XMLRPC-EPI in default path])
   for i in /usr/local /usr; do
 if test -r $i/include/xmlrpc.h; then
   XMLRPC_DIR=$i
   AC_MSG_RESULT(found in $i)
 fi
   done
 fi

 if test -z $XMLRPC_DIR; then
   AC_MSG_ERROR([XMLRPC-EPI not found, please reinstall the 
XMLRPC-EPI distribution])
 fi

 PHP_ADD_INCLUDE($XMLRPC_DIR/include)
 PHP_ADD_LIBRARY_WITH_PATH(xmlrpc, $XMLRPC_DIR/lib, 
XMLRPC_SHARED_LIBADD)
 fi

 PHP_SUBST(EXPAT_SHARED_LIBADD)
 AC_DEFINE(HAVE_LIBEXPAT,  1, [ ])

 for i in $PHP_XML $PHP_EXPAT_DIR; do
   if test -f $i/lib/libexpat.a -o -f 
$i/lib/libexpat.$SHLIB_SUFFIX_NAME ; then
 EXPAT_DIR=$i
   fi
 done

 if test -z $EXPAT_DIR; then
   AC_MSG_ERROR(not found. Please reinstall the expat distribution.)
 fi

 PHP_ADD_INCLUDE($EXPAT_DIR/include)
 PHP_ADD_LIBRARY_WITH_PATH(expat, $EXPAT_DIR/lib, XMLRPC_SHARED_LIBADD)

 if test $PHP_ICONV = no; then
   PHP_ICONV=yes
 fi

 PHP_SETUP_ICONV(XMLRPC_SHARED_LIBADD, [], [
   AC_MSG_ERROR([iconv not found, in order to build xmlrpc you 
need the iconv library])
 ])

 AC_DEFINE(HAVE_XMLRPC, 1, [ ])
fi

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




[PHP-DEV] sort() broken on some platforms in 4.2.3RC1

2002-08-26 Thread Edin Kadribasic

Detailed description in http://bugs.php.net/bug.php?id=17449

According to this bug report, merging changes in Zend/zend_qsort.c from head
fixes the problem.

Could someone with Zend karma do that please?

Edin

http://cvs.php.net/diff.php/Zend/zend_qsort.c?r1=1.4r2=1.5ty=u


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




[PHP-DEV] UltraEdit

2002-08-26 Thread Marcus Boerger

Anybody working with UltraEdit may like
the following function detection:
/Function String = ^{PHPAPI[ ^t]+^}^{^}^(PHP[A-Z_]+FUNCTION([a-zA-Z0-9_]+)^)

It detects all PHP__FUNCTION with the names of the defined functions.

Today i found having this VERY usefull :-)

marcus


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




Re: [PHP-DEV] ISAPI Crash Debugging Notes

2002-08-26 Thread Zeev Suraski

First off, can you try using http://www.php.net/~zeev/php-4.2.3RC1.tar.gz 
and see if you experience the same problems?  I've made some thread-safety 
related fixes there, even though none should lead to a hard crash...

If it doesn't solve the problem, can you send me as much information about 
the setup you have, including:
1.  The files you use to reproduce the problem
2.  Version of Windows
3.  Type of computer (single CPU, dual CPU, etc.)

Zeev

At 19:26 26/08/2002, Michael Sisolak wrote:
I've been doing some debugging of the crashes when running PHP under
the ISAPI sapi.  Is anybody else currently looking at this?  If you are
let's talk - here are my notes so far.

I can make my install of PHP (4.2.1, a debug build) throw an exception
on the first load after an IISReset 90% of the time.  My code is a PHP
page that loads another PHP page as the stylesheet - so I end up with
two PHP page loads running at the same time.  The exception is thrown
in the php_request_shutdown call at the end of the HttpExtensionProc.
I'm working on tracking down where the exception is coming from, but
one thing I've noticed so far is that the first thread that gets to the
shutdown_memory_manager call (inside php_request_shutdown) reports a
lot of leaks.  I find this to be quite odd, and am beginning to wonder
if it is mis-reporting the memory of the second thread as if they were
leaks of the first.  It's just a hunch so far - I haven't been able to
come up with any evidence, and my understanding of the thread-safe
memory managment is quite shallow.

Having done some more work I believe that the exception I'm getting is
coming from inside the zend_hash_reverse_apply call in
shutdown_executor.  The one to clear the function_table completes
correctly, but then the class_table one fails (my main PHP file does
include a series of classes).

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.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




Re: [PHP-DEV] Thread safety failure in EG(function_table)?

2002-08-26 Thread Michael Sisolak

 I believe that I can reproduce a thread safety failure in
init_executor
 (as called from the ISAPI sapi).  I have a PHP script page that loads
 the stylesheet as a PHP page - thus causing two almost simultaneous
 page loads.  I assume that if in init_executor() directly after
 EG(function_table) = CG(function_table); I dump out any
non-internal
 functions in the function_table I shouldn't find any (as no script
page
 has been loaded yet in that thread).  That's how it works when my
main
 page loads, but when the second page load happens the functions from
 the first page show up in the function_table for the second!  Once
one
 of the threads releases it's local functions, the other still
believes
 they are valid and tries to release them also creating quite a mess.

I believe I have tracked this down to an issue in the threading model
of ISAPI applications vs. what the thread safe PHP is expecting.  I've
followed up in the thread ISAPI Crash Debugging Notes.

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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