Re: [PHP-DEV] Profiling PHP

2002-05-14 Thread Stig S. Bakken

Okay that's more like it, emalloc on top.  That's what I would expect in
the first place.  And I guess Zeev is right that it doesn't really tell
you anything expect from that PHP does its share of alloc/free, and then
some.

 - Stig

On Mon, 2002-05-13 at 23:06, Rasmus Lerdorf wrote:
 Well, zend_parse() is actually not always on top.  I have run this thing
 longer now and it currently looks like this:  (reverse order)
 
 001bdcd0 293  0.42199 init_op
 00156c08 306  0.440713smart_str_appendl_ex
 0019b484 334  0.481039php_strlcpy
 001db788 337  0.48536 _get_zval_ptr_ptr
 0015f2b4 341  0.491121parse_iv2
 001db198 347  0.499762zend_pzval_unlock_func
 001cbf00 364  0.524246zend_hash_clean
 0015ee18 392  0.564573var_push
 001dbb88 396  0.570334zend_assign_to_variable
 001c45d0 398  0.573214_zval_copy_ctor
 001c3dfc 416  0.599139zend_ptr_stack_n_push
 001bdaf0 432  0.622183destroy_op_array
 001c3560 459  0.661069zend_str_tolower
 0015701c 465  0.66971 smart_str_print_unsigned
 001b9970 465  0.66971 zendlex
 001b2440 467  0.672591_erealloc
 001d45e4 473  0.681232zend_fetch_property_address
 001c4970 497  0.715798_zval_ptr_dtor_wrapper
 0015ef14 516  0.743162process_nested_data
 001946c8 526  0.757565xbuf_format_converter
 001b27fc 629  0.905909_estrndup
 001db1fc 647  0.931834zend_clean_garbage
 001cb9b8 686  0.988003zend_hash_rehash
 001cc6cc 711  1.02401 zend_hash_copy
 001c45c0 764  1.10034 zval_add_ref
 001d398c 953  1.37255 zend_fetch_var_address
 001ca5f8 975  1.40423 _zend_is_inconsistent
 001cbda8 1046 1.50649 zend_hash_destroy
 001c443c 1235 1.77869 _zval_dtor
 001baf6c 1302 1.87519 _zval_ptr_dtor
 001db270 1419 2.0437  _get_zval_ptr
 0015dcb4 1464 2.10851 php_var_unserialize
 001ccae0 2460 3.54298 zend_hash_find
 001b3028 2917 4.20117 _mem_block_check
 001d4ca0 3931 5.66157 execute
 001ca85c 4438 6.39177 zend_hash_add_or_update
 001a56bc 4597 6.62077 zendparse
 001b21b8 4692 6.75759 _efree
 001cdaf8 5458 7.86082 zend_inline_hash_func
 001a9f4c 5501 7.92275 lex_scan
 001b1ea4 6321 9.10374 _emalloc
 
 
 
 On 13 May 2002, Stig S. Bakken wrote:
 
  On Mon, 2002-05-13 at 17:53, Zeev Suraski wrote:
   The link you specified doesn't work (it's .net)... Nice touch on their part
   on having a page that doesn't render under IE :)
  
   Anyway, the important question is whether you're using it under Linux or
   some other OS.  Under Linux, unless it has some kernel module, it's going
   to be horribly inaccurate.  After finding this page, it does appear as if
   it's using a kernel module.  Congrats to Linux for finally having a usable
   profiler!
  
   It's pretty consistent with the results I got using NuMega's profiler about
   a year ago (I don't remember the exact numbers, but the functions are more
   or less the same).
 
  Seeing that the single most time-consuming function is zend_parse, it
  would be interesting to see where the bottleneck moves when using
  ZendAccelerator or another caching product.  Did you try that setup with
  NuMega's profiler?
 
   - Stig
 


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




[PHP-DEV] PHP 4.2.1 release announcement

2002-05-14 Thread Derick Rethans

Hello,

PHP 4.2.1 is released today, it's a bug fix release which addresses some 
serious bugs (and a lot of other little bugs) in 4.2.0. The full release 
announcement follows below:



This bug fix release solves a few bugs found in PHP 4.2.0. PHP 4.2.1 
includes the following fixes:

* Fix for the MySQL extension not be able to connect to a MySQL 
  server.
* Fix for a crash in the COM extension when using an outproc server.
* Fix for SID logic in the session extension.
* Fixes for the mbstring extension, including SJIS directory name 
  handling and mb_output_buffer().
* Fix for a bug in socket_select() that could cause unexpected 
  behavior when using a statement like $w = $e = array($sock);
* Almost full DOM compliance for the domxml extension, and fixes for 
  several functions.
* Safe_mode checks for show_source(), parse_ini_file() and rmdir().

For a full list of changes in PHP 4.2.1, see the NEWS file. 
(http://www.php.net/ChangeLog-4.php)


Compatibility

PHP 4.2.1 also has improved (but still experimental) support for Apache 
version 2. We do not recommend that you use this in a production 
environment, but feel free to test it and report bugs to the bug system. 
(http://bugs.php.net)


External variables

We would also like to attend you on a big change in PHP 4.2.0 concerning 
variable handling. External variables (from the environment, the HTTP 
request, cookies or the web server) are no longer registered in the global 
scope by default. The preferred method of accessing these external 
variables is by using the new Superglobal arrays, introduced in PHP 4.1.0. 
More information about this change:

* PHP Manual: Predefined variables
  (http://www.php.net/manual/en/language.variables.predefined.php)

* The PHP 4.1.0 release announcement
  (http://www.php.net/release_4_1_0.php)

* Thomas Oertli's article on secure programming in PHP
  (http://www.zend.com/zend/art/art-oertli.php)



regards,
Derick


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




Re: [PHP-DEV] Important: make test/run-tests.php broken?

2002-05-14 Thread Markus Fischer

Hi,

seems nothing happened there yet. CVS HEAD has the same
problem. Just deleting the CGI in ~/php4/php does the trick
and runs the test suite properly.

- Markus


On Fri, Mar 15, 2002 at 04:58:36PM +, Wez Furlong wrote : 
 Damn - sapi/cgi is being run and the http headers are confusing
 the test suite...
 
 --Wez.
 
 On 16/03/02, Wez Furlong [EMAIL PROTECTED] wrote:
  Hey,
  
  Am I the only one that has every single test fail when running
  make test??
  
  (I've tried with 2 separate working checkouts).
  
  It appears that the expected output and the actual output differ
  by a newline at the end...
  
  Can someone else verify, because my first suspcicion was my streams
  code, but I can't see anything wrong, and my other tree has the same
  problem (but no streams code).
  
  --Wez.
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

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




[PHP-DEV] Creating extension module for PHP

2002-05-14 Thread Simon Fogg

Hi,

I am a newcomer to PHP so I apologise in advance if my question seems
trivial or has already been answered on this site before.

I have been tasked with creating an HTML based interface for one of our
products. We already have a mature API set used to configure the product in
the form of a Shared Library on a Mac and a dll on Windows. Is there a means
of creating an extension for PHP so that I may use these API calls within a
PHP Script? I noticed that there are already a number of extensions
available i.e. COM, XML, ODBC etc - can I not create my own extension?

Not being a Mac programmer I am not quite sure how these extensions present
themselves on the Mac (or even if they exist at all).

Any help will be much appreciated.

Regards,

Simon Fogg.







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




[PHP-DEV] Re: Creating extension module for PHP

2002-05-14 Thread Martin Wickman

Simon Fogg wrote:
 Hi,
 
 I am a newcomer to PHP so I apologise in advance if my question seems
 trivial or has already been answered on this site before.
 
 I have been tasked with creating an HTML based interface for one of our
 products. We already have a mature API set used to configure the product in
 the form of a Shared Library on a Mac and a dll on Windows. Is there a means
 of creating an extension for PHP so that I may use these API calls within a
 PHP Script? I noticed that there are already a number of extensions
 available i.e. COM, XML, ODBC etc - can I not create my own extension?

Aye, you download the PHP source code and create your extention in 
ext/ directory. More info here:


http://se.php.net/manual/en/zend.php


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




Re: [PHP-DEV] Important: make test/run-tests.php broken?

2002-05-14 Thread Stig S. Bakken

Btw, now (in HEAD) you can run pear run-tests in any directory with
tests in it.  No need for a makefile.

 - Stig

On Tue, 2002-05-14 at 13:05, Markus Fischer wrote:
 Hi,
 
 seems nothing happened there yet. CVS HEAD has the same
 problem. Just deleting the CGI in ~/php4/php does the trick
 and runs the test suite properly.
 
 - Markus
 
 
 On Fri, Mar 15, 2002 at 04:58:36PM +, Wez Furlong wrote : 
  Damn - sapi/cgi is being run and the http headers are confusing
  the test suite...
  
  --Wez.
  
  On 16/03/02, Wez Furlong [EMAIL PROTECTED] wrote:
   Hey,
   
   Am I the only one that has every single test fail when running
   make test??
   
   (I've tried with 2 separate working checkouts).
   
   It appears that the expected output and the actual output differ
   by a newline at the end...
   
   Can someone else verify, because my first suspcicion was my streams
   code, but I can't see anything wrong, and my other tree has the same
   problem (but no streams code).
   
   --Wez.
  
  
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 -
 I mean When in doubt, blame mcrypt is more often right than wrong :)
 Always right, never wrong :)
 - Two PHP developers who want to remain unnamed
 
 -- 
 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: Creating extension module for PHP

2002-05-14 Thread Simon Fogg

Thanks Martin, I will have a look.

One other question is to do with the Mac OSX platform. I noticed that
extension modules are compiled down to dll's - what form do they take on the
Mac platform, or can they even be created? I seem to remember reading that
these modules can be created for UNIX based systems - am I right?

Simon.


Martin Wickman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Simon Fogg wrote:
  Hi,
 
  I am a newcomer to PHP so I apologise in advance if my question seems
  trivial or has already been answered on this site before.
 
  I have been tasked with creating an HTML based interface for one of our
  products. We already have a mature API set used to configure the product
in
  the form of a Shared Library on a Mac and a dll on Windows. Is there a
means
  of creating an extension for PHP so that I may use these API calls
within a
  PHP Script? I noticed that there are already a number of extensions
  available i.e. COM, XML, ODBC etc - can I not create my own extension?

 Aye, you download the PHP source code and create your extention in
 ext/ directory. More info here:


 http://se.php.net/manual/en/zend.php




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




[PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings

zval containers that are of string type don't seem to hold
a null terminating character, but rather directly store the
length of the string - I note this because of how the
ZVAL_STRING macro works... My question then is what is the
best way to compare two strings in a zval? I would imagine
a macro or function would already exist, and I'm quite sure
that the following simple invocation is asking for trouble:

strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0

Thanks for any information.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread brad lafountain

Well i do believe that the zval string SHOULD be null termiated and have the
length stored.

 But zend does provied this api function

zend_binary_zval_strcmp(zval *, zval*);

 - Brad 

--- Robert Cummings [EMAIL PROTECTED] wrote:
 zval containers that are of string type don't seem to hold
 a null terminating character, but rather directly store the
 length of the string - I note this because of how the
 ZVAL_STRING macro works... My question then is what is the
 best way to compare two strings in a zval? I would imagine
 a macro or function would already exist, and I'm quite sure
 that the following simple invocation is asking for trouble:
 
 strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0
 
 Thanks for any information.
 
 Cheers,
 Rob.
 -- 
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings

brad lafountain wrote:
 
 Well i do believe that the zval string SHOULD be null termiated and have the
 length stored.

You would think so, but on further thought, if that were the case you
wouldn't be able to store compressed data from gzip in a string because
the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING
suggests that this is so... since when you use it to set a zval container
to a string it saves the length as strlen( passedString ), rather
than strlen( passedString ) + 1, also the memcpy then uses this length
to copy the string if you set the copy flag to true.

Cheers,
Rob.


 
  But zend does provied this api function
 
 zend_binary_zval_strcmp(zval *, zval*);
 
  - Brad
 
 --- Robert Cummings [EMAIL PROTECTED] wrote:
  zval containers that are of string type don't seem to hold
  a null terminating character, but rather directly store the
  length of the string - I note this because of how the
  ZVAL_STRING macro works... My question then is what is the
  best way to compare two strings in a zval? I would imagine
  a macro or function would already exist, and I'm quite sure
  that the following simple invocation is asking for trouble:
 
  strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0
 
  Thanks for any information.
 
  Cheers,
  Rob.
  --
  .-.
  | Robert Cummings |
  :-`.
  | Webdeployer - Chief PHP and Java Programmer  |
  :--:
  | Mail  : mailto:[EMAIL PROTECTED] |
  | Phone : (613) 731-4046 x.109 |
  :--:
  | Website : http://www.webmotion.com   |
  | Fax : (613) 260-9545 |
  `--'
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings

brad lafountain wrote:
 
 Well i do believe that the zval string SHOULD be null termiated and have the
 length stored.
 
  But zend does provied this api function
 
 zend_binary_zval_strcmp(zval *, zval*);

Oh and I almost forgot... THANKS... this appears to be exactly
what I was looking for :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Zeev Suraski

zval strings must be NULL terminated, even if they contain binary 
data.  The str.val.len property represents the length of the string w/o the 
terminating NULL.

Zeev

At 16:39 14/05/2002, Robert Cummings wrote:
brad lafountain wrote:
 
  Well i do believe that the zval string SHOULD be null termiated and 
 have the
  length stored.

You would think so, but on further thought, if that were the case you
wouldn't be able to store compressed data from gzip in a string because
the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING
suggests that this is so... since when you use it to set a zval container
to a string it saves the length as strlen( passedString ), rather
than strlen( passedString ) + 1, also the memcpy then uses this length
to copy the string if you set the copy flag to true.

Cheers,
Rob.


 
   But zend does provied this api function
 
  zend_binary_zval_strcmp(zval *, zval*);
 
   - Brad
 
  --- Robert Cummings [EMAIL PROTECTED] wrote:
   zval containers that are of string type don't seem to hold
   a null terminating character, but rather directly store the
   length of the string - I note this because of how the
   ZVAL_STRING macro works... My question then is what is the
   best way to compare two strings in a zval? I would imagine
   a macro or function would already exist, and I'm quite sure
   that the following simple invocation is asking for trouble:
  
   strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0
  
   Thanks for any information.
  
   Cheers,
   Rob.
   --
   .-.
   | Robert Cummings |
   :-`.
   | Webdeployer - Chief PHP and Java Programmer  |
   :--:
   | Mail  : mailto:[EMAIL PROTECTED] |
   | Phone : (613) 731-4046 x.109 |
   :--:
   | Website : http://www.webmotion.com  |
   | Fax : (613) 260-9545 |
   `--'
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com

--
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com  |
| Fax : (613) 260-9545 |
`--'

--
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] Probably a simple answer...

2002-05-14 Thread Robert Cummings

Robert Cummings wrote:
 
 brad lafountain wrote:
 
  Well i do believe that the zval string SHOULD be null termiated and have the
  length stored.
 
 You would think so, but on further thought, if that were the case you
 wouldn't be able to store compressed data from gzip in a string because
 the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING
 suggests that this is so... since when you use it to set a zval container
 to a string it saves the length as strlen( passedString ), rather
 than strlen( passedString ) + 1, also the memcpy then uses this length
^^
I just took another look at ZVAL_STRING and it uses estrndup and
not memcpy... maybe I'm losing my mind :)

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Simon Fogg

I believe you hijacked my thread - The original subject was: 'Creating
extension module for PHP'!

Brad Lafountain [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Well i do believe that the zval string SHOULD be null termiated and have
the
 length stored.

  But zend does provied this api function

 zend_binary_zval_strcmp(zval *, zval*);

  - Brad

 --- Robert Cummings [EMAIL PROTECTED] wrote:
  zval containers that are of string type don't seem to hold
  a null terminating character, but rather directly store the
  length of the string - I note this because of how the
  ZVAL_STRING macro works... My question then is what is the
  best way to compare two strings in a zval? I would imagine
  a macro or function would already exist, and I'm quite sure
  that the following simple invocation is asking for trouble:
 
  strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0
 
  Thanks for any information.
 
  Cheers,
  Rob.
  --
  .-.
  | Robert Cummings |
  :-`.
  | Webdeployer - Chief PHP and Java Programmer  |
  :--:
  | Mail  : mailto:[EMAIL PROTECTED] |
  | Phone : (613) 731-4046 x.109 |
  :--:
  | Website : http://www.webmotion.com   |
  | Fax : (613) 260-9545 |
  `--'
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com



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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings

Simon Fogg wrote:
 
 I believe you hijacked my thread - The original subject was: 'Creating
 extension module for PHP'!

I was asking about specific information about specific functionality,
your thread asks about how to write an extension... I already know how
and have done so, I'd just like to know more about what I'm doing and
since there isn't much in the way of docs for doing so, then sometimes
I need to clear things up here. I apologize if it appears I hijacked
your thread..

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP-DEV] [PATCH] Bug #14407: Win32 SendMail function doesn't use From: in SMTP MAIL FROM command

2002-05-14 Thread Michael Sisolak

Diff against current HEAD for patch for bug #14407.  This allows the
return path to automatically be set to the from address for Win32
sendmail.

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--- sendmail.c  Tue May 14 10:07:40 2002
+++ sendmail.c.new  Tue May 14 10:22:13 2002
@@ -125,11 +125,26 @@
strcpy(MailHost, host);
}
 
-   if (INI_STR(sendmail_from)){
-   RPath = estrdup(INI_STR(sendmail_from));
+   /* use from address as return path (if specified in headers) */
+   if (headers  strstr(headers, From:)) {
+   char *pos;
+   pos = strstr(headers, From:) + 5;
+   while (pos  (*pos == ' '))
+   pos++;
+ 
+   if (pos  strlen(pos)) {
+   RPath = estrdup(pos);
+   RPath[strcspn(RPath, \r\n)] = '\x0';
+   }
+   }
+   
+   if (!RPath) {
+   if (INI_STR(sendmail_from)) {
+   RPath = estrdup(INI_STR(sendmail_from));
} else {
*error = W32_SM_SENDMAIL_FROM_NOT_SET;
return FAILURE;
+   }
}
 
/* attempt to connect with mail host */



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


Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Simon Fogg

That's o.k.- I'm just grouchy. There seems to be so much information to wade
through to find out what you need to know.

Since we are on the subject though, and you have already done this sort of
thing before, can you tell me whether extensions are supported on MacOSX. My
Mac colleague is off sick today and since I am looking at finding a fairly
X-Plaform solution to our problem, I thought it would be beneficial if I
could find out whether the same solution could be used on a Mac.

Cheers.


Robert Cummings [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Simon Fogg wrote:
 
  I believe you hijacked my thread - The original subject was: 'Creating
  extension module for PHP'!

 I was asking about specific information about specific functionality,
 your thread asks about how to write an extension... I already know how
 and have done so, I'd just like to know more about what I'm doing and
 since there isn't much in the way of docs for doing so, then sometimes
 I need to clear things up here. I apologize if it appears I hijacked
 your thread..

 Cheers,
 Rob.
 --
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'



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




[PHP-DEV] [mfischer@guru.josefine.at: [PHP-CVS] cvs: php4 /win32 sendmail.c sendmail.h]

2002-05-14 Thread Markus Fischer

Hi,

This changes I did fix a nasty crash when using 'Cc' in the
header parameter to mail() when not being terminated with
\r\n. Despite the win32 sendmail code being buggy as hell,
I'ld like some feedback of testers (ok, I'm not sure if I
really want this :-), anyway

- Markus

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

---BeginMessage---

mfischerTue May 14 09:52:19 2002 EDT

  Modified files:  
/php4/win32 sendmail.c sendmail.h 
  Log:
  - Fix win32 sendmail bug with Cc: in custom header not terminated with \r\n
  - Fix some obvious errors returned by the module, little cleanup.
  
  
Index: php4/win32/sendmail.c
diff -u php4/win32/sendmail.c:1.24 php4/win32/sendmail.c:1.25
--- php4/win32/sendmail.c:1.24  Thu Dec 20 13:06:13 2001
+++ php4/win32/sendmail.c   Tue May 14 09:52:17 2002
 -18,7 +18,7 
  *
  */
 
-/* $Id: sendmail.c,v 1.24 2001/12/20 18:06:13 fmk Exp $ */
+/* $Id: sendmail.c,v 1.25 2002/05/14 13:52:17 mfischer Exp $ */
 
 #include php.h   /*php specific */
 #include stdio.h
 -69,26 +69,27 
 /* Error messages */
 static char *ErrorMessages[] =
 {
-   {Success},
-   {Bad arguments from form},
+   {Success}, /* 0 */
+   {Bad arguments from form}, /* 1 */
{Unable to open temporary mailfile for read},
{Failed to Start Sockets},
{Failed to Resolve Host},
-   {Failed to obtain socket handle},
-   {Failed to Connect},
+   {Failed to obtain socket handle}, /* 5 */
+   {Failed to connect to mailserver, verify your \SMTP\ setting in php.ini},
{Failed to Send},
{Failed to Receive},
{Server Error},
-   {Failed to resolve the host IP name},
+   {Failed to resolve the host IP name}, /* 10 */
{Out of memory},
{Unknown error},
{Bad Message Contents},
{Bad Message Subject},
-   {Bad Message destination},
+   {Bad Message destination}, /* 15 */
{Bad Message Return Path},
{Bad Mail Host},
{Bad Message File},
-   {PHP Internal error: php.ini sendmail from variable not set!}
+   {\sendmail_from\ NOT set in php.ini},
+   {Mailserver rejected our \sendmail_from\ setting} /* 20 */
 };
 
 
 -126,8 +127,9 
 
if (INI_STR(sendmail_from)){
RPath = estrdup(INI_STR(sendmail_from));
-   } else {
-   return 19;
+   } else {
+   *error = W32_SM_SENDMAIL_FROM_NOT_SET;
+   return FAILURE;
}
 
/* attempt to connect with mail host */
 -178,11 +180,12 
 //***/
 char *GetSMErrorText(int index)
 {
-
-   if ((index  MAX_ERROR_INDEX) || (index  MIN_ERROR_INDEX))
-   return (ErrorMessages[UNKNOWN_ERROR]);
-   else
-   return (ErrorMessages[index]);
+
+   if (MIN_ERROR_INDEX = index  index  MAX_ERROR_INDEX) {
+   return (ErrorMessages[index]);
+   } else {
+   return (ErrorMessages[UNKNOWN_ERROR]);
+   }
 }
 
 
 -235,7 +238,7 
if ((res = Post(Buffer)) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
-   return (res);
+   return W32_SM_SENDMAIL_FROM_MALFORMED;
 
 
tempMailTo = estrdup(mailTo);
 -255,8 +258,11 
/* Send mail to all Cc rcpt's */
efree(tempMailTo);
if (headers  (pos1 = strstr(headers, Cc:))) {
-   pos2 = strstr(pos1, \r\n);
-   tempMailTo = estrndup(pos1, pos2-pos1);
+   if (NULL == (pos2 = strstr(pos1, \r\n))) {
+   tempMailTo = estrndup(pos1, strlen(pos1));
+   } else {
+   tempMailTo = estrndup(pos1, pos2-pos1);
+   }
 
token = strtok(tempMailTo, ,);
while(token != NULL)
Index: php4/win32/sendmail.h
diff -u php4/win32/sendmail.h:1.3 php4/win32/sendmail.h:1.4
--- php4/win32/sendmail.h:1.3   Tue Dec  4 13:47:07 2001
+++ php4/win32/sendmail.h   Tue May 14 09:52:18 2002
 -4,29 +4,31 
 
 #define HOST_NAME_LEN  256
 #define MAX_APPNAME_LENGHT 100
-#define  MAX_ERROR_INDEX   17
-#define  MIN_ERROR_INDEX   0
-#define  MAIL_BUFFER_SIZE  (1024*4)/* 4k buffer */
+#define MAIL_BUFFER_SIZE   (1024*4)/* 4k buffer */
 /* Return values */
-#defineSUCCESS 0
-#defineFAILED_TO_PARSE_ARGUMENTS 1
-#defineFAILED_TO_OPEN_MAILFILE 2
-#defineFAILED_TO_START_SOCKETS 3
-#defineFAILED_TO_RESOLVE_HOST 4
-#define

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings

Simon Fogg wrote:
 
 That's o.k.- I'm just grouchy. There seems to be so much information to wade
 through to find out what you need to know.
 
 Since we are on the subject though, and you have already done this sort of
 thing before, can you tell me whether extensions are supported on MacOSX. My
 Mac colleague is off sick today and since I am looking at finding a fairly
 X-Plaform solution to our problem, I thought it would be beneficial if I
 could find out whether the same solution could be used on a Mac.

I don't see why not provided you are able to compile PHP. As long as you
can compile PHP your extension should compile into a Mac native binary.
All you should need to do is create wrapper functions around your current
library to make them accessible via PHP in your extension. If you're like me
you will compile this directly into the PHP binary itself, and then I don't
think you will need any other binaries. Alternatively, since you are
comparing this to window's DLLs I think you can compile as a shared library,
but I don't know much about that route and wouldn't advise it since as
far as I know it runs like CGI.

Cheers,
Rob.
-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread brad lafountain


--- Robert Cummings [EMAIL PROTECTED] wrote:
 Robert Cummings wrote:
  
  brad lafountain wrote:
  
   Well i do believe that the zval string SHOULD be null termiated and have
 the
   length stored.
  
  You would think so, but on further thought, if that were the case you
  wouldn't be able to store compressed data from gzip in a string because
  the null bytes everywhere would interfere. Also, as I said, ZVAL_STRING
  suggests that this is so... since when you use it to set a zval container
  to a string it saves the length as strlen( passedString ), rather
  than strlen( passedString ) + 1, also the memcpy then uses this length
 ^^
 I just took another look at ZVAL_STRING and it uses estrndup and
 not memcpy... maybe I'm losing my mind :)

well ZVAL_STRING should be fine for non binary strings.. but if you have binary
string you can use ZVAL_STRINGL(s,l,d)

 - Brad
 
 Cheers,
 Rob.
 -- 
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




[PHP-DEV] Re: Bug #17184: Interbase 5.1.1.682 compilation

2002-05-14 Thread Daniela Mariaschi

Hi,

Some  functions added in interbase module raise compiler error.
these functions require IB 6 or later cause they work together with the new
IB6 API.

It seems as in the code there is no control on  the IB version installed,
and the compiler is always  looking for new Api .
People who are using an IB version  6 can't compile the source ...
This can be fix in CVS ... but  what about  release?

-Daniela

- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: php.bugs
To: [EMAIL PROTECTED]
Sent: Monday, May 13, 2002 5:48 PM
Subject: Bug #17184: Interbase 5.1.1.682 compilation


 From: [EMAIL PROTECTED]
 Operating system: Linux 2.4.7-10
 PHP version:  4.2.0
 PHP Bug Type: Compile Failure
 Bug description:  Interbase 5.1.1.682 compilation

 Get error on make when trying to compile with
 '--with-interbase=/usr/interbase'.

 Worked fine with php-4.1.2

 I get the following error :


 gcc -I. -I/usr/local/php/ext/interbase -I/usr/local/php/main
 -I/usr/local/php -I/usr/local/apache_1.3.22/src/include
 -I/usr/local/apache_1.3.22/src/os/unix -I/usr/local/php/Zend
 -I/usr/local/openssl/include -I/include -I/usr/local/include
 -I/usr/include/imap -I/usr/interbase/include -I/usr/include/mysql
 -I/usr/local/php/ext/xml/expat  -I/usr/local/php/TSRM -g -O2  -c
 interbase.c  touch interbase.lo
 interbase.c: In function `_php_ibase_user':
 interbase.c:2977: `isc_action_svc_add_user' undeclared (first use in this
 function)
 interbase.c:2977: (Each undeclared identifier is reported only once
 interbase.c:2977: for each function it appears in.)
 interbase.c:2978: `isc_action_svc_modify_user' undeclared (first use in
 this function)
 interbase.c:2985: `isc_action_svc_delete_user' undeclared (first use in
 this function)
 interbase.c:2980: warning: unreachable code at beginning of switch
 statement
 interbase.c:3041: `isc_spb_version' undeclared (first use in this
 function)
 interbase.c:3042: `isc_spb_current_version' undeclared (first use in this
 function)
 interbase.c:3068: `isc_spb_sec_username' undeclared (first use in this
 function)
 interbase.c:3074: `isc_spb_sec_password' undeclared (first use in this
 function)
 interbase.c:3081: `isc_spb_sec_firstname' undeclared (first use in this
 function)
 interbase.c:3088: `isc_spb_sec_middlename' undeclared (first use in this
 function)
 interbase.c:3095: `isc_spb_sec_lastname' undeclared (first use in this
 function)
 interbase.c: In function `zif_ibase_add_user':
 interbase.c:3123: `isc_action_svc_add_user' undeclared (first use in this
 function)
 interbase.c: In function `zif_ibase_modify_user':
 interbase.c:3132: `isc_action_svc_modify_user' undeclared (first use in
 this function)
 interbase.c: In function `zif_ibase_delete_user':
 interbase.c:3140: `isc_action_svc_delete_user' undeclared (first use in
 this function)
 make[3]: *** [interbase.lo] Error 1
 make[3]: Leaving directory `/usr/local/php-4.2.0/ext/interbase'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/usr/local/php-4.2.0/ext/interbase'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/usr/local/php-4.2.0/ext'
 make: *** [all-recursive] Error 1

 Thx

 Per Mårtensson




 --
 Edit bug report at http://bugs.php.net/?id=17184edit=1
 --
 Fixed in CVS:http://bugs.php.net/fix.php?id=17184r=fixedcvs
 Fixed in release:http://bugs.php.net/fix.php?id=17184r=alreadyfixed
 Need backtrace:  http://bugs.php.net/fix.php?id=17184r=needtrace
 Try newer version:   http://bugs.php.net/fix.php?id=17184r=oldversion
 Not developer issue: http://bugs.php.net/fix.php?id=17184r=support
 Expected behavior:   http://bugs.php.net/fix.php?id=17184r=notwrong
 Not enough info: http://bugs.php.net/fix.php?id=17184r=notenoughinfo
 Submitted twice: http://bugs.php.net/fix.php?id=17184r=submittedtwice
 register_globals:http://bugs.php.net/fix.php?id=17184r=globals



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




Re: [PHP-DEV] [PATCH] Bug #14407: Win32 SendMail function doesn't use From: in SMTP MAIL FROM command

2002-05-14 Thread Markus Fischer

Hi,

thanks for your quick repsonse. I've applied your patch with
a few changes.

- Markus

On Tue, May 14, 2002 at 07:27:39AM -0700, Michael Sisolak wrote : 
 Diff against current HEAD for patch for bug #14407.  This allows the
 return path to automatically be set to the from address for Win32
 sendmail.
 
 Michael Sisolak
 [EMAIL PROTECTED]
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
Content-Description: sendmail.c.diff
 --- sendmail.cTue May 14 10:07:40 2002
 +++ sendmail.c.newTue May 14 10:22:13 2002
 @@ -125,11 +125,26 @@
   strcpy(MailHost, host);
   }
  
 - if (INI_STR(sendmail_from)){
 - RPath = estrdup(INI_STR(sendmail_from));
 + /* use from address as return path (if specified in headers) */
 + if (headers  strstr(headers, From:)) {
 + char *pos;
 + pos = strstr(headers, From:) + 5;
 + while (pos  (*pos == ' '))
 + pos++;
 + 
 + if (pos  strlen(pos)) {
 + RPath = estrdup(pos);
 + RPath[strcspn(RPath, \r\n)] = '\x0';
 + }
 + }
 + 
 + if (!RPath) {
 + if (INI_STR(sendmail_from)) {
 + RPath = estrdup(INI_STR(sendmail_from));
   } else {
   *error = W32_SM_SENDMAIL_FROM_NOT_SET;
   return FAILURE;
 + }
   }
  
   /* attempt to connect with mail host */
 

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

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

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




Re: [PHP-DEV] Re: Bug #17184: Interbase 5.1.1.682 compilation

2002-05-14 Thread derick

On Tue, 14 May 2002, Daniela Mariaschi wrote:

 Hi,
 
 Some  functions added in interbase module raise compiler error.
 these functions require IB 6 or later cause they work together with the new
 IB6 API.
 
 It seems as in the code there is no control on  the IB version installed,
 and the compiler is always  looking for new Api .
 People who are using an IB version  6 can't compile the source ...
 This can be fix in CVS ... but  what about  release?

We can't fix a release once it's released. But you can provide a patch to 
users if you want. And you might alsao want to merge it into the branch 
for inclusion in a possible 4.2.2.

Derick

 - Original Message -
 From: [EMAIL PROTECTED]
 Newsgroups: php.bugs
 To: [EMAIL PROTECTED]
 Sent: Monday, May 13, 2002 5:48 PM
 Subject: Bug #17184: Interbase 5.1.1.682 compilation
 
 
  From: [EMAIL PROTECTED]
  Operating system: Linux 2.4.7-10
  PHP version:  4.2.0
  PHP Bug Type: Compile Failure
  Bug description:  Interbase 5.1.1.682 compilation
 
  Get error on make when trying to compile with
  '--with-interbase=/usr/interbase'.
 
  Worked fine with php-4.1.2
 
  I get the following error :
 
 
  gcc -I. -I/usr/local/php/ext/interbase -I/usr/local/php/main
  -I/usr/local/php -I/usr/local/apache_1.3.22/src/include
  -I/usr/local/apache_1.3.22/src/os/unix -I/usr/local/php/Zend
  -I/usr/local/openssl/include -I/include -I/usr/local/include
  -I/usr/include/imap -I/usr/interbase/include -I/usr/include/mysql
  -I/usr/local/php/ext/xml/expat  -I/usr/local/php/TSRM -g -O2  -c
  interbase.c  touch interbase.lo
  interbase.c: In function `_php_ibase_user':
  interbase.c:2977: `isc_action_svc_add_user' undeclared (first use in this
  function)
  interbase.c:2977: (Each undeclared identifier is reported only once
  interbase.c:2977: for each function it appears in.)
  interbase.c:2978: `isc_action_svc_modify_user' undeclared (first use in
  this function)
  interbase.c:2985: `isc_action_svc_delete_user' undeclared (first use in
  this function)
  interbase.c:2980: warning: unreachable code at beginning of switch
  statement
  interbase.c:3041: `isc_spb_version' undeclared (first use in this
  function)
  interbase.c:3042: `isc_spb_current_version' undeclared (first use in this
  function)
  interbase.c:3068: `isc_spb_sec_username' undeclared (first use in this
  function)
  interbase.c:3074: `isc_spb_sec_password' undeclared (first use in this
  function)
  interbase.c:3081: `isc_spb_sec_firstname' undeclared (first use in this
  function)
  interbase.c:3088: `isc_spb_sec_middlename' undeclared (first use in this
  function)
  interbase.c:3095: `isc_spb_sec_lastname' undeclared (first use in this
  function)
  interbase.c: In function `zif_ibase_add_user':
  interbase.c:3123: `isc_action_svc_add_user' undeclared (first use in this
  function)
  interbase.c: In function `zif_ibase_modify_user':
  interbase.c:3132: `isc_action_svc_modify_user' undeclared (first use in
  this function)
  interbase.c: In function `zif_ibase_delete_user':
  interbase.c:3140: `isc_action_svc_delete_user' undeclared (first use in
  this function)
  make[3]: *** [interbase.lo] Error 1
  make[3]: Leaving directory `/usr/local/php-4.2.0/ext/interbase'
  make[2]: *** [all-recursive] Error 1
  make[2]: Leaving directory `/usr/local/php-4.2.0/ext/interbase'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/usr/local/php-4.2.0/ext'
  make: *** [all-recursive] Error 1
 
  Thx
 
  Per Mårtensson
 
 
 
 
  --
  Edit bug report at http://bugs.php.net/?id=17184edit=1
  --
  Fixed in CVS:http://bugs.php.net/fix.php?id=17184r=fixedcvs
  Fixed in release:http://bugs.php.net/fix.php?id=17184r=alreadyfixed
  Need backtrace:  http://bugs.php.net/fix.php?id=17184r=needtrace
  Try newer version:   http://bugs.php.net/fix.php?id=17184r=oldversion
  Not developer issue: http://bugs.php.net/fix.php?id=17184r=support
  Expected behavior:   http://bugs.php.net/fix.php?id=17184r=notwrong
  Not enough info: http://bugs.php.net/fix.php?id=17184r=notenoughinfo
  Submitted twice: http://bugs.php.net/fix.php?id=17184r=submittedtwice
  register_globals:http://bugs.php.net/fix.php?id=17184r=globals
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 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




[PHP-DEV] Exposing zend_execute_data

2002-05-14 Thread Sterling Hughes

Attached is a patch that exposes zend_execute_data in the executor globals, this
data is useful for lowerlevel access to the Zend scripting engine, especially when
accessing data directly out of the OP structures.

-Sterling


Index: zend_execute.c
===
RCS file: /repository/Zend/zend_execute.c,v
retrieving revision 1.295
diff -u -r1.295 zend_execute.c
--- zend_execute.c  4 May 2002 17:29:01 -   1.295
+++ zend_execute.c  14 May 2002 16:00:21 -
@@ -990,24 +990,13 @@
EX(opline)++;   \
continue;
 
-typedef struct _object_info {
-   zval *ptr;
-} object_info;
-
-typedef struct _zend_execute_data {
-   zend_op *opline;
-   zend_function_state function_state;
-   zend_function *fbc; /* Function Being Called */
-   object_info object;
-   temp_variable *Ts;
-   zend_bool original_in_execution;
-} zend_execute_data;
-
 #define EX(element) execute_data.element
 
 ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
 {
zend_execute_data execute_data;
+
+   EG(execute_data_ptr) = execute_data;
 
/* Initialize execute_data */
EX(fbc) = NULL;
Index: zend_execute.h
===
RCS file: /repository/Zend/zend_execute.h,v
retrieving revision 1.42
diff -u -r1.42 zend_execute.h
--- zend_execute.h  6 Jan 2002 15:21:09 -   1.42
+++ zend_execute.h  14 May 2002 16:00:21 -
@@ -25,28 +25,7 @@
 #include zend_hash.h
 #include zend_variables.h
 #include zend_operators.h
-
-typedef union _temp_variable {
-   zval tmp_var;
-   struct {
-   zval **ptr_ptr;
-   zval *ptr;
-   } var;
-   struct {
-   zval tmp_var; /* a dummy */
-
-   union {
-   struct {
-   zval *str;
-   int offset;
-   } str_offset;
-   zend_property_reference overloaded_element;
-   } data;
-   
-   unsigned char type;
-   } EA;
-} temp_variable;
-
+#include zend_execute_globals.h
 
 ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
 
Index: zend_globals.h
===
RCS file: /repository/Zend/zend_globals.h,v
retrieving revision 1.83
diff -u -r1.83 zend_globals.h
--- zend_globals.h  8 May 2002 12:29:51 -   1.83
+++ zend_globals.h  14 May 2002 16:00:21 -
@@ -31,6 +31,7 @@
 #include zend_hash.h
 #include zend_llist.h
 #include zend_fast_cache.h
+#include zend_execute_globals.h
 
 #ifdef ZEND_MULTIBYTE
 #include zend_multibyte.h
@@ -151,6 +152,8 @@
 
zend_op **opline_ptr;
 
+zend_execute_data *execute_data_ptr;
+
HashTable *active_symbol_table;
HashTable symbol_table; /* main symbol table */
 


/*
   +--+
   | Zend Engine  |
   +--+
   | Copyright (c) 1998-2002 Zend Technologies Ltd. (http://www.zend.com) |
   +--+
   | This source file is subject to version 2.00 of the Zend license, |
   | that is bundled with this package in the file LICENSE, and is| 
   | available at through the world-wide-web at   |
   | http://www.zend.com/license/2_00.txt.|
   | If you did not receive a copy of the Zend license and are unable to  |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.  |
   +--+
   | Authors: Andi Gutmans [EMAIL PROTECTED]|
   |  Zeev Suraski [EMAIL PROTECTED]|
   +--+
*/


#ifndef ZEND_EXECUTE_GLOBALS_H
#define ZEND_EXECUTE_GLOBALS_H

#include zend_compile.h
#include zend_hash.h
#include zend_variables.h
#include zend_operators.h

typedef union _temp_variable {
zval tmp_var;
struct {
zval **ptr_ptr;
zval *ptr;
} var;
struct {
zval tmp_var; /* a dummy */

union {
struct {
zval *str;
int offset;
} str_offset;
zend_property_reference overloaded_element;
} data;

unsigned char type;
} EA;
} temp_variable;

typedef struct _object_info {

[PHP-DEV] OS X Support

2002-05-14 Thread Mitch Vincent

What's the current status of OS X support? I understand that 4.3 will be the
first release to officially support OS X but how much of the work is
complete in current CVS?

I grabbed the latest yesterday and compiled it -- still had my issues
creating files and directories (Where I would get permission denied errors
even though the perms were 777 and the entire directory was owned by the
webserver user/group).. I ran into this problem using Smarty and evidently a
lot of people have had it with 4.2.. I also couldn¹t get mcrypt to work in
4.3-dev -- unable to open encryption module for everything I tried (this
worked fine in 4.2). I have libmcrypt 2.5.0 installed, which appears to be
the latest available...

I would roll back to 4.1 but I can't get it to compile on this box and the
only OSX build I've found doesn't have working mcrypt support and I kind of
have to have it :-)

Thanks to all!!!

-Mitch


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




[PHP-DEV] bug not solved since June 2001

2002-05-14 Thread Chand

hey,

i've come across a bug these past few days in regexps, i've been getting mad about 
this. I looked around in the Bug Database and i found it :

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

it's from 4.0.6, dated almost a year and still hasn't been corrected and is not even 
assigned
Any ideas why this has been put off ? It still 'works' on php 4.2.0RC4, haven't tried 
further..

Thanks for any insight as to why this hasn't been solved yet.

Later

--
Chand

640K ought to be enough for anybody.
Bill Gates, 1981

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




Re: [PHP-DEV] bug not solved since June 2001

2002-05-14 Thread Rasmus Lerdorf

It's not a bug.  The regex is simply wrong.  The ereg() functions are
POSIX 1003.2 compliant.  Read this:

   A  bracket  expression is a list of characters enclosed in
   `[]'.  It normally matches any single character  from  the
   list  (but  see  below).   If the list begins with `^', it
   matches any single character (but see below) not from  the
   rest of the list.  If two characters in the list are sepa
   rated by `-', this is shorthand  for  the  full  range  of
   characters  between those two (inclusive) in the collating
   sequence, e.g. `[0-9]' in ASCII matches any decimal digit.
   It  is  illegal- for two ranges to share an endpoint, e.g.
   `a-c-e'.  Ranges  are  very  collating-sequence-dependent,
   and portable programs should avoid relying on them.

   To  include  a  literal `]' in the list, make it the first
   character (following a possible `^').  To include  a  lit
   eral `-', make it the first or last character, or the sec
   ond endpoint of a range.  To use  a  literal  `-'  as  the
   first  endpoint of a range, enclose it in `[.' and `.]' to
   make it a collating element (see below).  With the  excep
   tion  of  these  and some combinations using `[' (see next
   paragraphs), all other special characters, including  `\',
   lose  their  special significance within a bracket expres
   sion.

Nowhere does it say that \- is a valid way to get a literal - inside a
bracketed expression.

-Rasmus

On Tue, 14 May 2002, Chand wrote:

 hey,

 i've come across a bug these past few days in regexps, i've been getting mad about 
this. I looked around in the Bug Database and i found it :

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

 it's from 4.0.6, dated almost a year and still hasn't been corrected and is not even 
assigned
 Any ideas why this has been put off ? It still 'works' on php 4.2.0RC4, haven't 
tried further..

 Thanks for any insight as to why this hasn't been solved yet.

 Later

 --
 Chand

 640K ought to be enough for anybody.
 Bill Gates, 1981

 --
 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] bug not solved since June 2001

2002-05-14 Thread Chand

On Tue, 14 May 2002 09:28:54 -0700 (PDT)
Rasmus Lerdorf [EMAIL PROTECTED] wrote:

ok thanks. I wasn't sure of myself and since the bug wasn't closed i thought that 
maybe it had slipped your QA Team. You should close it at least so that people don't 
get confused on it.

Thanks a lot.

 It's not a bug.  The regex is simply wrong.  The ereg() functions are
 POSIX 1003.2 compliant.  Read this:
 
A  bracket  expression is a list of characters enclosed in
`[]'.  It normally matches any single character  from  the
list  (but  see  below).   If the list begins with `^', it
matches any single character (but see below) not from  the
--
Chand

640K ought to be enough for anybody.
Bill Gates, 1981

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




Re: [PHP-DEV] OS X Support

2002-05-14 Thread Dan Kalowsky

Hello Mitch!

 What's the current status of OS X support? I understand that 4.3 will be the
 first release to officially support OS X but how much of the work is
 complete in current CVS?

PHP 4.3 has had a large number of strides made towards Darwin support.
Marko was able to get things like the build system to work on it for APXS
builds.  He and I then were able to implement a native dl() system for
Darwin.  There is slow work being done to continue to support Darwin, but
don't expect it too fast.  So far Marko is working on it more than I am,
and I'm only working on it as things pop-up that annoy me (like ODBC).

 I grabbed the latest yesterday and compiled it -- still had my issues
 creating files and directories (Where I would get permission denied errors
 even though the perms were 777 and the entire directory was owned by the
 webserver user/group).. I ran into this problem using Smarty and evidently a
 lot of people have had it with 4.2.. I also couldn¹t get mcrypt to work in
 4.3-dev -- unable to open encryption module for everything I tried (this
 worked fine in 4.2). I have libmcrypt 2.5.0 installed, which appears to be
 the latest available...

Unfortunately I'm not familiar with Smarty so I can't comment on what that
is.  But if you're having bugs with creating files and directories, you
might do well to submit a bug on these things.  I haven't tested this
stuff in a few days/weeks, but at last check I didn't have any problems
with it.

As far as mcrypt is concerned, I've not delt with it.  So any comments I
make on it would be guessing at best.  From the sound of message though,
it sounds like the DLYD system can't find the bundle.  Try setting the
DLYD_LIBRARY_PATH to include the path to your mycrpt installation, and see
if that works.  Remember to do this for the user the webserver is running
as not yourself (unless you're running a CGI/CLI version).  If this works,
let us know so we can remove this problem before 4.3 goes to RC.


 I would roll back to 4.1 but I can't get it to compile on this box and the
 only OSX build I've found doesn't have working mcrypt support and I kind of
 have to have it :-)

If you wish to rollback to 4.1 you can find some nice hackish directions
from the people at entropy.ch (URL in the documentation for building on
MacOSX).

---
Dan KalowskyThe record shows, I took the blows.
http://www.deadmime.org/~dankAnd did it my way.
[EMAIL PROTECTED] - My Way, Frank Sinatra
[EMAIL PROTECTED]


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




Re: [PHP-DEV] Re: [PHP] Re: [PHP-DEV] Timeline for Apache 2 fulluse?

2002-05-14 Thread derick

Hello,

these versions of libmcrypt should work fine, you have some stray headers 
on your system I think.

Derick

On Tue, 14 May 2002, Rodolfo Gonzalez wrote:

 On Tue, 14 May 2002, Richard Archer wrote:
  Aah, but by the same logic, if Apache 2.0 with PHP4 can provide the
  users with a faster, more stable service, it's bad *not* to use it.
 
 It's bad if the beasts are experimental.
 
 Now, I guess this is for the devel list:
 
 libmcrypt4-2.4.19-1mdk
 libmcrypt4-devel-2.4.19-1mdk
 mcrypt-2.5.10-1mdk
 
 -- begin --
 
 mcrypt.c: In function `zm_startup_mcrypt':
 mcrypt.c:272: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:273: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:274: `MCRYPT_BLOWFISH_128' undeclared (first use in this 
 function)
 mcrypt.c:274: (Each undeclared identifier is reported only once
 mcrypt.c:274: for each function it appears in.)
 mcrypt.c:275: `MCRYPT_BLOWFISH_192' undeclared (first use in this 
 function)
 mcrypt.c:276: `MCRYPT_BLOWFISH_256' undeclared (first use in this 
 function)
 mcrypt.c:277: `MCRYPT_BLOWFISH_448' undeclared (first use in this 
 function)
 mcrypt.c:278: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:279: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:280: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:281: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:282: `MCRYPT_IDEA' undeclared (first use in this function)
 mcrypt.c:283: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:284: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:285: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:286: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:287: `MCRYPT_RC2_128' undeclared (first use in this function)
 mcrypt.c:288: `MCRYPT_RC2_256' undeclared (first use in this function)
 mcrypt.c:289: `MCRYPT_RC2_1024' undeclared (first use in this function)
 mcrypt.c:290: `MCRYPT_RC4' undeclared (first use in this function)
 mcrypt.c:291: `MCRYPT_RC6_128' undeclared (first use in this function)
 mcrypt.c:292: `MCRYPT_RC6_192' undeclared (first use in this function)
 mcrypt.c:293: `MCRYPT_RC6_256' undeclared (first use in this function)
 mcrypt.c:294: `MCRYPT_SAFER_64' undeclared (first use in this function)
 mcrypt.c:295: `MCRYPT_SAFER_128' undeclared (first use in this function)
 mcrypt.c:296: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c:297: `MCRYPT_SERPENT_128' undeclared (first use in this function)
 mcrypt.c:298: `MCRYPT_SERPENT_192' undeclared (first use in this function)
 mcrypt.c:299: `MCRYPT_SERPENT_256' undeclared (first use in this function)
 mcrypt.c:300: `MCRYPT_TWOFISH_128' undeclared (first use in this function)
 mcrypt.c:301: `MCRYPT_TWOFISH_192' undeclared (first use in this function)
 mcrypt.c:302: `MCRYPT_TWOFISH_256' undeclared (first use in this function)
 mcrypt.c:303: warning: passing arg 3 of `zend_register_long_constant' 
 makes integer from pointer without a cast
 mcrypt.c: In function `zif_mcrypt_get_cipher_name':
 mcrypt.c:1497: warning: assignment makes pointer from integer without a 
 cast
 make[3]: *** [mcrypt.lo] Error 1
 make[3]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
 make[2]: *** [all-recursive] Error 1
 make[2]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
 make[1]: *** [all-recursive] Error 1
 make[1]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext'
 make: *** [all-recursive] Error 1
 error: Bad exit status from /var/tmp/rpm-tmp.95528 (%build)
 
 -- end --
 
 Apache 2.0.35, PHP 4.2.1
 
 Regards.
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 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: [PHP] Re: [PHP-DEV] Timeline for Apache 2 fulluse?

2002-05-14 Thread Rodolfo Gonzalez

On Tue, 14 May 2002 [EMAIL PROTECTED] wrote:
 these versions of libmcrypt should work fine, you have some stray headers 
 on your system I think.

Hmm, that's strange, in fact in my mcrypt.h there are no such definitions, 
but it's the RPM from Mdk (maybe it's broken).

Thanks.



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




Re: [PHP-DEV] Re: [PHP] Re: [PHP-DEV] Timeline for Apache 2 fulluse?

2002-05-14 Thread derick

On Tue, 14 May 2002, Rodolfo Gonzalez wrote:

 On Tue, 14 May 2002 [EMAIL PROTECTED] wrote:
  these versions of libmcrypt should work fine, you have some stray headers 
  on your system I think.
 
 Hmm, that's strange, in fact in my mcrypt.h there are no such definitions, 
 but it's the RPM from Mdk (maybe it's broken).

I'm quite sure it is, as I tested a lot with this version of libmcrypt. 
Your best shot at this is compiling the library from source youurself.

regards,


Derick

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 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] Safe Mode

2002-05-14 Thread Slava Poliakov

Rasmus Lerdorf wrote:

 PHP being a web server scripting language is a unique case, for example
 consider that once apache 2.0 becomes stable, safe_mode will become
 obsolete, on the other hand the situation described here will become
 quite deadly if some sort of threaded mode is used. So FD limit would
 because quite useful.
 
 Actually, I see no signs that a stable Apache 2.0 will make the problem go
 away.  I don't see the perchild mpm becoming stable in 2.0.  Hopefully in
 2.1 but I am not holding my breath on that one either.  The normal worker
 mpm that most people use with Apache 2.0 doesn't fix the issue at all.

I see, so intead of contributing to apache project you're developing php's 
safe mode? a useful solution that is...

 The rest of your post is about as misinformed as the first part.

Well, that's certainly a good way to argue.  I'm not quite sure what was 
misinformed, it would be helpful if you were to lower yourself to my 
standards and explain.

 -Rasmus


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




[PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Brent R. Matzelle

I could not help but notice that all DOM XML calls use an
underscore-based convention:

i.e. 
$mynode-append_child($achild);

I am no language lawyer but if you read the DOM Core documentation
(http://www.w3.org/TR/DOM-Level-3-Core/core.html) it suggests a
case-based (no underscore) convention:

i.e.
$mynode-appendChild($achild);

Also, every DOM compliant library that I've looked at uses this same
convention.  Will the case-based convention be used in PHP 4.3.0?  If
not then it should be considered as it seems to be a violation of the
DOM.

Warm regards,

Brent

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread derick

Hello,

can you file a change/feature request for this @ bugs.php.net ?

Derick

On Tue, 14 May 2002, Brent R. Matzelle wrote:

 I could not help but notice that all DOM XML calls use an
 underscore-based convention:
 
 i.e. 
 $mynode-append_child($achild);
 
 I am no language lawyer but if you read the DOM Core documentation
 (http://www.w3.org/TR/DOM-Level-3-Core/core.html) it suggests a
 case-based (no underscore) convention:
 
 i.e.
 $mynode-appendChild($achild);
 
 Also, every DOM compliant library that I've looked at uses this same
 convention.  Will the case-based convention be used in PHP 4.3.0?  If
 not then it should be considered as it seems to be a violation of the
 DOM.
 
 Warm regards,
 
 Brent
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 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] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Markus Fischer

Hi,

not giong to happen. It's a PHP convention to use underscores
to separate words (this was discussed ~ half a year ago
afaik).

- Markus

On Tue, May 14, 2002 at 12:49:50PM -0700, Brent R. Matzelle wrote : 
 I could not help but notice that all DOM XML calls use an
 underscore-based convention:
 
 i.e. 
 $mynode-append_child($achild);
 
 I am no language lawyer but if you read the DOM Core documentation
 (http://www.w3.org/TR/DOM-Level-3-Core/core.html) it suggests a
 case-based (no underscore) convention:
 
 i.e.
 $mynode-appendChild($achild);
 
 Also, every DOM compliant library that I've looked at uses this same
 convention.  Will the case-based convention be used in PHP 4.3.0?  If
 not then it should be considered as it seems to be a violation of the
 DOM.
 
 Warm regards,
 
 Brent
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Brent R. Matzelle

--- Markus Fischer [EMAIL PROTECTED] wrote:
 not giong to happen. It's a PHP convention to use underscores
 to separate words (this was discussed ~ half a year ago
 afaik).

I realize that this is a PHP convention, but I do not think that it
is up to PHP developers to change published coding standards.  How
are users of different programming languages expected to convert? 
'Replace all' is not an acceptable answer.

Brent

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread derick

On Tue, 14 May 2002, Brent R. Matzelle wrote:

 --- Markus Fischer [EMAIL PROTECTED] wrote:
  not giong to happen. It's a PHP convention to use underscores
  to separate words (this was discussed ~ half a year ago
  afaik).
 
 I realize that this is a PHP convention, but I do not think that it
 is up to PHP developers to change published coding standards.  How
 are users of different programming languages expected to convert? 
 'Replace all' is not an acceptable answer.

The same is true for keeping the function names in PHP consistent. It's a 
choice, and IMO we made the correct choice.

Derick

---
 Did I help you?   http://www.jdimedia.nl/derick/link.php?url=giftlist
 Frequent ranting: http://www.jdimedia.nl/derick/
---
 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




[PHP-DEV] [PATCH] Suggested fix for #16458: header() does not replace headers but always produces duplicates

2002-05-14 Thread Michael Sisolak

Bug #16458 reports that the header() command does not correctly use the
replace parameter (i.e., a header of the same name should be replaced
if this parameter is true).  The problem is that the standard
sapi_add_header_ex function assumes that the sapi being used with deal
with any header replacements.  For Apache that works fine as the Apache
sapi correctly used the replace parameter.  The IIS sapi, however,
defaults to the standard funtionality in sapi_add_header_ex (as does
the CGI).  The default handler just calls zend_llist_add_element to add
the header to the header list thus appending even if replace was
requested.

Attached is a suggested patch that first removes the header from the
list if it already exists if we are in replace mode.  This works for
the Win32 IIS and CGI builds, but I don't have a way to test any
possible interaction this might have with the other sapi modules (or
under GCC).

Michael Sisolak
[EMAIL PROTECTED]

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--- sapi.c  Tue May 14 16:11:31 2002
+++ sapi.c.new  Tue May 14 16:29:23 2002
@@ -385,6 +385,11 @@
return code;
 }
 
+static int sapi_find_matching_header(void *element1, void *element2)
+{
+   return strnicmp(((sapi_header_struct*)element1)-header, (char*)element2, 
+strlen((char*)element2)) == 0;
+}
+
 /* This function expects a *duplicated* string, that was previously emalloc()'d.
  * Pointers sent to this functions will be automatically freed by the framework.
  */
@@ -551,6 +556,19 @@
zend_llist_clean(SG(sapi_headers).headers);
}
if (retval  SAPI_HEADER_ADD) {
+   /* in replace mode first remove the header if it already exists in the 
+headers llist */
+   if (replace) {
+   colon_offset = strchr(header_line, ':');
+   if (colon_offset) {
+   char sav;
+   colon_offset++;
+   sav = *colon_offset;
+   *colon_offset = 0;
+   zend_llist_del_element(SG(sapi_headers).headers, 
+header_line, (int(*)(void*, void*))sapi_find_matching_header);
+   *colon_offset = sav;
+   }
+   }
+
zend_llist_add_element(SG(sapi_headers).headers, (void *) 
sapi_header);
}
if (free_header) {



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


Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Markus Fischer

Hi,

btw, not my personal opinion :) I just wanted to let you know
this was discussed so you can search the archives for it.

Btw, first you said 'w3c convention' now it's a standard?
anyway

- Markus

On Tue, May 14, 2002 at 01:27:40PM -0700, Brent R. Matzelle wrote : 
 --- Markus Fischer [EMAIL PROTECTED] wrote:
  not giong to happen. It's a PHP convention to use underscores
  to separate words (this was discussed ~ half a year ago
  afaik).
 
 I realize that this is a PHP convention, but I do not think that it
 is up to PHP developers to change published coding standards.  How
 are users of different programming languages expected to convert? 
 'Replace all' is not an acceptable answer.
 
 Brent
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread brad lafountain

Why don't we just add alias... so it will be BC and 
so we don't get shunned on by people like that.

 - Brad
--- Markus Fischer [EMAIL PROTECTED] wrote:
 Hi,
 
 btw, not my personal opinion :) I just wanted to let you know
 this was discussed so you can search the archives for it.
 
 Btw, first you said 'w3c convention' now it's a standard?
 anyway
 
 - Markus
 
 On Tue, May 14, 2002 at 01:27:40PM -0700, Brent R. Matzelle wrote : 
  --- Markus Fischer [EMAIL PROTECTED] wrote:
   not giong to happen. It's a PHP convention to use underscores
   to separate words (this was discussed ~ half a year ago
   afaik).
  
  I realize that this is a PHP convention, but I do not think that it
  is up to PHP developers to change published coding standards.  How
  are users of different programming languages expected to convert? 
  'Replace all' is not an acceptable answer.
  
  Brent
  
  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 -
 I mean When in doubt, blame mcrypt is more often right than wrong :)
 Always right, never wrong :)
 - Two PHP developers who want to remain unnamed
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Brent R. Matzelle

--- brad lafountain [EMAIL PROTECTED] wrote:
 Why don't we just add alias... so it will be BC and 
 so we don't get shunned on by people like that.

That would fit the bill nicely.

Brent

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Markus Fischer

Hi,

I fail to see the advante. Is it only that 'it looks like
what the w3c recommends' and 'so users already used to the
api have it easier' or did I miss something else?

- Markus

On Tue, May 14, 2002 at 01:47:22PM -0700, Brent R. Matzelle wrote : 
 --- brad lafountain [EMAIL PROTECTED] wrote:
  Why don't we just add alias... so it will be BC and 
  so we don't get shunned on by people like that.
 
 That would fit the bill nicely.
 
 Brent
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
-
I mean When in doubt, blame mcrypt is more often right than wrong :)
Always right, never wrong :)
- Two PHP developers who want to remain unnamed

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Brent R. Matzelle

--- Markus Fischer [EMAIL PROTECTED] wrote:
 Hi,
 
 btw, not my personal opinion :) I just wanted to let you know
 this was discussed so you can search the archives for it.

Understood ;)

 Btw, first you said 'w3c convention' now it's a standard?
 anyway

Again, I'm no language lawyer, it is officially the W3C Document
Object Model Level 3 Core specification.  

Brent

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread brad lafountain

Yeah thats pretty much it. It does make it eaiser for people using
dom in another lanugage to pick it up in php if it did conform to 
the standard. Expecially how we are trying to conform the functions
to begin with. Instead of having append_child... why not add_child..

- We started conforming to the standard why not go the whole way. -

And with alias we can have the php standard and the w3c standard.

 - Brad
--- Markus Fischer [EMAIL PROTECTED] wrote:
 Hi,
 
 I fail to see the advante. Is it only that 'it looks like
 what the w3c recommends' and 'so users already used to the
 api have it easier' or did I miss something else?
 
 - Markus
 
 On Tue, May 14, 2002 at 01:47:22PM -0700, Brent R. Matzelle wrote : 
  --- brad lafountain [EMAIL PROTECTED] wrote:
   Why don't we just add alias... so it will be BC and 
   so we don't get shunned on by people like that.
  
  That would fit the bill nicely.
  
  Brent
  
  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 -
 I mean When in doubt, blame mcrypt is more often right than wrong :)
 Always right, never wrong :)
 - Two PHP developers who want to remain unnamed
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread Christian Stocker

Hi

 Yeah thats pretty much it. It does make it eaiser for people using
 dom in another lanugage to pick it up in php if it did conform to
 the standard. Expecially how we are trying to conform the functions
 to begin with. Instead of having append_child... why not add_child..

'cause appendChild, resp. append_child is the the w3c standard ...

 - We started conforming to the standard why not go the whole way. -

'cause, as said before, it's the php way to seperate words. And i would
much apreciate, if this would be everywhere the same (isset and is_null as
a wonderfull example...)

 And with alias we can have the php standard and the w3c standard.

i don't see a reason for that. it's not that complicated to change
appendChild to append_child in your code. you have to change your code
anyway. and since PHP is not case-sensitive functionname wise, you will
get funny stuff (see ext/gd in all the tutorials, if php is ever going
case sensitiv (is it?), then all those examples are in big trouble :) )

I'm certainly against introducing the non-underscore api-stuff. and BTW,
i didn't found anything on w3.org, which says method names have to be
studly caps (but i just had a quick look). The php-api is more or less
clear in that way, that where w3c suggest an uppercase letter, php makes
an underscore. Therefore it's not that hard to switch between different
languages.

ok. i repeat more or less what others said...

chregu


  - Brad
 --- Markus Fischer [EMAIL PROTECTED] wrote:
  Hi,
 
  I fail to see the advante. Is it only that 'it looks like
  what the w3c recommends' and 'so users already used to the
  api have it easier' or did I miss something else?
 
  - Markus
 
  On Tue, May 14, 2002 at 01:47:22PM -0700, Brent R. Matzelle wrote :
   --- brad lafountain [EMAIL PROTECTED] wrote:
Why don't we just add alias... so it will be BC and
so we don't get shunned on by people like that.
  
   That would fit the bill nicely.
  
   Brent
  
   __
   Do You Yahoo!?
   LAUNCH - Your Yahoo! Music Experience
   http://launch.yahoo.com
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Please always Cc to me when replying to me on the lists.
  GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
  -
  I mean When in doubt, blame mcrypt is more often right than wrong :)
  Always right, never wrong :)
  - Two PHP developers who want to remain unnamed
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com



-- 
nam...christian stockeradr...bremgartnerstr. 66, ch-8003 zurich
pho...+41  1 451 6021  www...http://phant.ch/chregu
mob...+41 76 561 8860  [EMAIL PROTECTED]
wor...+41  1 240 5670  gpg...0x5CE1DECB



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




[PHP-DEV] CVS Account Request: floripa

2002-05-14 Thread Antônio Carlos Venâncio Júnior

Translation of the PEAR Documentation (http://pear.php.net/manual) to Brazilian 
Portuguese language (pt_BR).
I will commit to peardoc repository.
Alexander Merz [EMAIL PROTECTED] told me to request for a cvs account, so I 
can commit translated files by myself.

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




Re: [PHP-DEV] DOM XML uses non-DOM compliant calls

2002-05-14 Thread brad lafountain

--- Christian Stocker [EMAIL PROTECTED] wrote:
 Hi
 
  Yeah thats pretty much it. It does make it eaiser for people using
  dom in another lanugage to pick it up in php if it did conform to
  the standard. Expecially how we are trying to conform the functions
  to begin with. Instead of having append_child... why not add_child..
 
 'cause appendChild, resp. append_child is the the w3c standard ...

 Yeah i was saying we are sticking to the standard for function names why not
keep the naming convention too.

 
  - We started conforming to the standard why not go the whole way. -
 
 'cause, as said before, it's the php way to seperate words. And i would
 much apreciate, if this would be everywhere the same (isset and is_null as
 a wonderfull example...)
 
  And with alias we can have the php standard and the w3c standard.
 
 i don't see a reason for that. it's not that complicated to change
 appendChild to append_child in your code. you have to change your code
 anyway. and since PHP is not case-sensitive functionname wise, you will
 get funny stuff (see ext/gd in all the tutorials, if php is ever going
 case sensitiv (is it?), then all those examples are in big trouble :) )

 Not if they use the right case... appendChild vs appendchild the if one day
php goes casesensitve then you will be all set.

 
 I'm certainly against introducing the non-underscore api-stuff. and BTW,
 i didn't found anything on w3.org, which says method names have to be
 studly caps (but i just had a quick look). The php-api is more or less
 clear in that way, that where w3c suggest an uppercase letter, php makes
 an underscore. Therefore it's not that hard to switch between different
 languages.

 Its not a hard switch at all but it still IS a switch. Why force a switch when
you don't have to.

 
 ok. i repeat more or less what others said...
 

 I still don't see a good arugment agains adding alias. I see it as saving us
from the comments like its not w3c standard. People would look down on the
extension becuase it doesn't conform. 

If you only arugment is because its not a php standard. I see that as a weak
argument.


 I really don't understand you guys went thru that extension and made it dom
compliant (functionality wise) and you just won't go one step further and make
alias so the naming convension is standard too.


I personally like _'s too but i still think that adding aliases doesn't hurt
anything.


- Brad

 chregu
 
 
   - Brad
  --- Markus Fischer [EMAIL PROTECTED] wrote:
   Hi,
  
   I fail to see the advante. Is it only that 'it looks like
   what the w3c recommends' and 'so users already used to the
   api have it easier' or did I miss something else?
  
   - Markus
  
   On Tue, May 14, 2002 at 01:47:22PM -0700, Brent R. Matzelle wrote :
--- brad lafountain [EMAIL PROTECTED] wrote:
 Why don't we just add alias... so it will be BC and
 so we don't get shunned on by people like that.
   
That would fit the bill nicely.
   
Brent
   
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
   
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php
  
   --
   Please always Cc to me when replying to me on the lists.
   GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
   -
   I mean When in doubt, blame mcrypt is more often right than wrong :)
   Always right, never wrong :)
   - Two PHP developers who want to remain unnamed
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com
 
 
 
 -- 
 nam...christian stockeradr...bremgartnerstr. 66, ch-8003 zurich
 pho...+41  1 451 6021  www...http://phant.ch/chregu
 mob...+41 76 561 8860  [EMAIL PROTECTED]
 wor...+41  1 240 5670  gpg...0x5CE1DECB
 
 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




[PHP-DEV] Samba Bindings?

2002-05-14 Thread Lachlan Mulcahy

Hi there,

I'm new to the dev list,...

I dropped an email to Andrei and he suggested I post here so, here
goes...

I'm currently developing a set of functions at work for performing samba
related operations. They act as a frontend to smbtools and parse the
text output by these CLI apps. 

I'd like to offer these for inclusion with the php project and was
wondering how I'd go about it? (If indeed anyone is interested in the
functions.)

I'm prepared to put work into them to make sure they are secure, comply
by documentation standards and all of that sort of thing.

So where do I go from here?

cheers,
-- 
Lachlan Mulcahy
---
 Web Developer,
 Pico-Pay Team


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




[PHP-DEV] Re: [PHP] Re: [PHP-DEV] Timeline for Apache 2 full use?

2002-05-14 Thread Rodolfo Gonzalez

On Tue, 14 May 2002, Richard Archer wrote:
 Aah, but by the same logic, if Apache 2.0 with PHP4 can provide the
 users with a faster, more stable service, it's bad *not* to use it.

It's bad if the beasts are experimental.

Now, I guess this is for the devel list:

libmcrypt4-2.4.19-1mdk
libmcrypt4-devel-2.4.19-1mdk
mcrypt-2.5.10-1mdk

-- begin --

mcrypt.c: In function `zm_startup_mcrypt':
mcrypt.c:272: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:273: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:274: `MCRYPT_BLOWFISH_128' undeclared (first use in this 
function)
mcrypt.c:274: (Each undeclared identifier is reported only once
mcrypt.c:274: for each function it appears in.)
mcrypt.c:275: `MCRYPT_BLOWFISH_192' undeclared (first use in this 
function)
mcrypt.c:276: `MCRYPT_BLOWFISH_256' undeclared (first use in this 
function)
mcrypt.c:277: `MCRYPT_BLOWFISH_448' undeclared (first use in this 
function)
mcrypt.c:278: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:279: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:280: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:281: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:282: `MCRYPT_IDEA' undeclared (first use in this function)
mcrypt.c:283: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:284: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:285: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:286: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:287: `MCRYPT_RC2_128' undeclared (first use in this function)
mcrypt.c:288: `MCRYPT_RC2_256' undeclared (first use in this function)
mcrypt.c:289: `MCRYPT_RC2_1024' undeclared (first use in this function)
mcrypt.c:290: `MCRYPT_RC4' undeclared (first use in this function)
mcrypt.c:291: `MCRYPT_RC6_128' undeclared (first use in this function)
mcrypt.c:292: `MCRYPT_RC6_192' undeclared (first use in this function)
mcrypt.c:293: `MCRYPT_RC6_256' undeclared (first use in this function)
mcrypt.c:294: `MCRYPT_SAFER_64' undeclared (first use in this function)
mcrypt.c:295: `MCRYPT_SAFER_128' undeclared (first use in this function)
mcrypt.c:296: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:297: `MCRYPT_SERPENT_128' undeclared (first use in this function)
mcrypt.c:298: `MCRYPT_SERPENT_192' undeclared (first use in this function)
mcrypt.c:299: `MCRYPT_SERPENT_256' undeclared (first use in this function)
mcrypt.c:300: `MCRYPT_TWOFISH_128' undeclared (first use in this function)
mcrypt.c:301: `MCRYPT_TWOFISH_192' undeclared (first use in this function)
mcrypt.c:302: `MCRYPT_TWOFISH_256' undeclared (first use in this function)
mcrypt.c:303: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c: In function `zif_mcrypt_get_cipher_name':
mcrypt.c:1497: warning: assignment makes pointer from integer without a 
cast
make[3]: *** [mcrypt.lo] Error 1
make[3]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
make[2]: *** [all-recursive] Error 1
make[2]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
make[1]: *** [all-recursive] Error 1
make[1]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.95528 (%build)

-- end --

Apache 2.0.35, PHP 4.2.1

Regards.




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




[PHP-DEV] CVS Account Request: willylee

2002-05-14 Thread Willy Lee

develop a php application

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