[PHP-DEV] newbie: url parms

2002-11-05 Thread Geert Arts
Hi,

I just seem not to be able to pass variables from a URL to a PHP script.
When I do something like http://localhost/test.php?variablex=valuex  variablex is 
empty (or does even not 
exist?)

I'm running php 4.2.3 and apache 1.3.27 under Windows.

Thanks,

Geert



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




[PHP-DEV] newbie: url parameters

2002-11-05 Thread Geert Arts
Hi,

I just seem not to be able to pass values of variables in a URL to a PHP script.
When I do something like http://localhost/test.php?variablex=valuex, variablex is 
still empty (or doesn't 
even exist yet?)

I run apache 1.3.27 and php 4.2.3 under windows.

regards,

Geert



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




Re: [PHP-DEV] newbie: url parms

2002-11-05 Thread Tony Leake
On Tue, 2002-11-05 at 09:32, Geert Arts wrote:
 Hi,
 
 I just seem not to be able to pass variables from a URL to a PHP script.
 When I do something like http://localhost/test.php?variablex=valuex  variablex is 
empty (or does even not 
 exist?)
 
 I'm running php 4.2.3 and apache 1.3.27 under Windows.

You will find your answer on this page of the fine manual
http://www.php.net/manual/en/reserved.variables.php

Please note that this is not the correct forum for this question. This
forum deals with writing the PHP language in 'c' not writing scripts
with PHP.

The correct forum is php-general.details of which you can find here:

http://www.php.net/mailing-lists.php

Tony


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




[PHP-DEV] Re: newbie: url parameters

2002-11-05 Thread nicos
You will find your answer on this page of the fine manual
http://www.php.net/manual/en/reserved.variables.php

Please note that this is not the correct forum for this question. This
forum deals with writing the PHP language in 'c' not writing scripts
with PHP.

The correct forum is php-general.details of which you can find here:

http://www.php.net/mailing-lists.php

As said Tony

--

M.CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com Hébergement de sites internets.

Geert Arts [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 Hi,

 I just seem not to be able to pass values of variables in a URL to a PHP
script.
 When I do something like http://localhost/test.php?variablex=valuex,
variablex is still empty (or doesn't
 even exist yet?)

 I run apache 1.3.27 and php 4.2.3 under windows.

 regards,

 Geert





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




Re: [PHP-DEV] Adding mail() Parameter to Set Return Path

2002-11-05 Thread Maxim Maletsky

Hartmut Holzgraefe [EMAIL PROTECTED] wrote... :

 Michael Sisolak wrote:
  The only downside I see to this is that the value would only work for
  the internal Win32 sendmail code and not the standard Unix calls to
  sendmail.
 
 A windows-only solution for a standard PHP function?
 Who uses PHP on Win32 for serious stuff anyway? ;)

Those who very much are relying on Win32-only internals kind of do...

--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



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




Re: [PHP-DEV] Copy of Array

2002-11-05 Thread Maxim Maletsky
This should be asked on [EMAIL PROTECTED] mailing list.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Laurent FOINEL [EMAIL PROTECTED] wrote... :

 when I try
 $newArray = $myarray
 the copy is by reference.
 
 How-can I do a copy by value ?
 
 Thanks
 
 
 
 
 -- 
 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] OCISaveLob, OCILoadLob, OCISaveFile?

2002-11-05 Thread Maxim Maletsky
Try looking at how they behave on oracle development network
(otn.oracle.com, docs.oracle.com). In PHP they are not yet fully
documented.  Working on it.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Jean Tardy [EMAIL PROTECTED] wrote... :

 
 Hello,
 Who know haw to use those functions:OCISaveLob, OCILoadLob, OCISaveFile?
 Where can I find documentation and sample about this general purpose: 'lob
 object manipulation with oracle
 Thanks.
 
 
 
 
 -- 
 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] Build PHP under windows - SNMP the objective

2002-11-05 Thread Maxim Maletsky
You should be using MS Visual Studio v6+ to build PHP from sources for
Win32.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



[EMAIL PROTECTED] wrote... :

 What is the best route to building PHP under windows? I've downloaded minGW
 with a C compiler for windows.
 
 My objective is to enable SNMP functionality under Windows.
 
 Any guidance greatly appreciated!
 
 Thanks!
 
 
 
 -- 
 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] Documentation for Zend API for PHP Extensions

2002-11-05 Thread Maxim Maletsky
There is one here:

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


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Diggy Bell [EMAIL PROTECTED] wrote... :

 I've been looking through the ./ext dir for php-4.2.3 and trying to figure
 out how to revive the Birdstep (Velocis) database extension.  Where I'm
 running into problems is with the Zend API fnctions.  Is there any reference
 material that describes the functionality and API of the TSRM module?
 
 Also, if anyone knows anything about the maintenance status of this module,
 could you please let me know.
 
 TIA
 --
 William D. 'Diggy' Bell
 Principal
 DB Software Development
 http://www.dbsoftdev.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] Variable Functions?

2002-11-05 Thread Maxim Maletsky
Is this really needed?


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



Dan Hardiker [EMAIL PROTECTED] wrote... :

 Hi All,
 
 Just a thought, but while working reciently with a few ECMA scripting
 languages (eg: ActionScript in Flash MX), I uncovered the amazing uses
 (especially from a security point of view) of variable functions.
 
 For those that dont know, it allows you to assign a function to a
 variable, rather than to declare it globally, for example:
 
 ?php
 
   function test ($param, $default=false) {
 // stuff goes here
   }
   test(my param);
 
   /* could also be written as */
 
   $func_test = function ($param, $default) {
 // stuff goes here
   }
   $func_test(my param, true);
 
   /* removing a function could then be */
 
   unset($func_test);
 
 ?
 
 Any form of variable or constant would be able to be used (eg: a function
 inside of an array, or a class method as a property). This would allow the
 very very simple usage of getter-setters, as they are called in flash.
 
 EG: You may have the properties $user-birthdate and $user-age, where you
 want the age to be pulled dynamically. At the moment you have to define
 $user-age(), but the following code could be used:
 
 ?php
 
   class user {
 var $birthdate = YYMMDDHH;
 var $age = function {
   // Code to get birthdate
   $myAge = //  // ;
   // Return the age
   return $myAge;
 }
   }
 
 ?
 
 This may or may not fit into the way PHP is going, but its just an idea -
 and ideas have never been frowned upon, (nor should they be!)
 
 I think that puts across the general gist of my suggestion... any thoughts
 or comments on the idea?
 
 
 -- 
 Dan Hardiker [[EMAIL PROTECTED]]
 ADAM Software  Systems Engineer
 First Creative
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases

2002-11-05 Thread Maxim Maletsky

Robert Twitty [EMAIL PROTECTED] wrote... :

 In other words, it allows a PHP
 client on UNIX to access a database using the ODBC drivers installed on a
 Windows NT / 2000 server.  It is nothing more than a middle man service for
 Win32 ODBC. 

Sounds interesting.

 The name of the service is called ODBTP (Open Database
 Transport Protocol),  and no there is not a RFC for this protocol.  Thus
 far, I have successfully accessed MS-SQL, Oracle and Sybase databases via
 ODBTP.

Have Oracle ran well through it?


 * Supports all data types, including nvarchar, ntext, varchar(255),
 char(255), datetime, and bigint.

What about RECORD type for Oracle? Objects? XMLType(s)? Have you had a
chance to play with them yet?


 I am new to this mailing list, and it appears that PHP is
 predominantly used
 for MySQL and PostgreSQL, and thus I am not sure if ODBTP is of any interest
 to most people on this list.  My original intent was not to release ODBTP to
 the public (I really don't have the time to maintain freeware),  but if
 there is a substantial interest I will release it to the public.  I am
 curious to see how well it performs in other environments.
 
 -- bob


It does, indeed, sounds interesting.
If I understood it right this extension will only run on Win32, right?

--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



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




Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases

2002-11-05 Thread Robert Twitty
  The name of the service is called ODBTP (Open Database
  Transport Protocol),  and no there is not a RFC for this protocol.  Thus
  far, I have successfully accessed MS-SQL, Oracle and Sybase databases
via
  ODBTP.

 Have Oracle ran well through it?

Yes.

  * Supports all data types, including nvarchar, ntext, varchar(255),
  char(255), datetime, and bigint.

 What about RECORD type for Oracle? Objects? XMLType(s)? Have you had a
 chance to play with them yet?

I have not tried those types (I primarilly use it for MS-SQL),  however,
ODBTP can be easily modified to accomadate any type.  The key however is how
to map those types in PHP.  If they are complex then maybe the would have to
be sent as resources or objects.


  I am new to this mailing list, and it appears that PHP is
  predominantly used
  for MySQL and PostgreSQL, and thus I am not sure if ODBTP is of any
interest
  to most people on this list.  My original intent was not to release
ODBTP to
  the public (I really don't have the time to maintain freeware),  but if
  there is a substantial interest I will release it to the public.  I am
  curious to see how well it performs in other environments.
 
  -- bob


 It does, indeed, sounds interesting.
 If I understood it right this extension will only run on Win32, right?

It will work on Win32 and UNIX.

 --
 Maxim Maletsky
 [EMAIL PROTECTED]


 www.PHPBeginner.com  // PHP for Beginners
 www.maxim.cx // my Home

 // my Wish List: ( Get me something! )
 http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3






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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Edin Kadribasic
 Any chance the sablot library on the snaps server could be
 upgraded?

The library has been upgraded to 0.96.

Edin



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




[PHP-DEV] TSRM compiler warnings

2002-11-05 Thread Marcus Boerger
Could someone with karma please commit following patch
or give me karma for tsrm? It would silence all those warnings
at once:

/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_startup':
/usr/src/php4-HEAD/TSRM/TSRM.c:124: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:124: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:132: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:132: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_shutdown':
/usr/src/php4-HEAD/TSRM/TSRM.c:177: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:177: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `ts_allocate_id':
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:209: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:209: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `allocate_new_resource':
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `ts_resource_ex':
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_mutex_lock':
/usr/src/php4-HEAD/TSRM/TSRM.c:511: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:511: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_mutex_unlock':
/usr/src/php4-HEAD/TSRM/TSRM.c:538: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:538: warning: left-hand operand of comma 
expression has no effect


cvs -z3 -q diff TSRM.c (in directory S:\php4-HEAD\TSRM\)
Index: TSRM.c
===
RCS file: /repository/TSRM/TSRM.c,v
retrieving revision 1.46
diff -u -r1.46 TSRM.c
--- TSRM.c  5 Oct 2002 11:34:02 -   1.46
+++ TSRM.c  5 Nov 2002 13:01:41 -
 -79,7 +79,7 
} 
\
}
 #else
-#define TSRM_ERROR
+#define TSRM_ERROR(args)
 #define TSRM_SAFE_RETURN_RSRC(array, offset, range)\
if (offset==0) 
{\
return 
array;  \



Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases

2002-11-05 Thread Maxim Maletsky

Robert Twitty [EMAIL PROTECTED] wrote... :

  What about RECORD type for Oracle? Objects? XMLType(s)? Have you had a
  chance to play with them yet?
 
 I have not tried those types (I primarilly use it for MS-SQL),  however,
 ODBTP can be easily modified to accomadate any type.  The key however is how
 to map those types in PHP.  If they are complex then maybe the would have to
 be sent as resources or objects.

Yes, mapping could be a problem. Although, for RECORD it can be done
easier. Objects are harder, though..

I am chewing in my mind this whole thing for a while already.

  It does, indeed, sounds interesting.
  If I understood it right this extension will only run on Win32, right?
 
 It will work on Win32 and UNIX.

Then this is even better than what I thought like.


--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3


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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Ilia A.
It appears that the Sablotron needs to be upgraded as well, since xstl cannot 
be compiled due to 2 missing flags 
('SAB_DISABLE_STRIPPING','SAB_IGNORE_DOC_NOT_FOUND'), which I am guessing are 
only defined in the newer library.

Ilia

On November 5, 2002 08:01 am, Edin Kadribasic wrote:
  Any chance the sablot library on the snaps server could be
  upgraded?

 The library has been upgraded to 0.96.

 Edin


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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Edin Kadribasic
 It appears that the Sablotron needs to be upgraded as well, since
xstl cannot
 be compiled due to 2 missing flags
 ('SAB_DISABLE_STRIPPING','SAB_IGNORE_DOC_NOT_FOUND'), which I am
guessing are
 only defined in the newer library.

You're guessing right. Those compile errors have disappeared after
the lib upgrade.

Edin


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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Melvyn Sopacua
At 14:01 11/5/2002 +0100, Edin Kadribasic wrote:


 Any chance the sablot library on the snaps server could be
 upgraded?

The library has been upgraded to 0.96.


Thanx, Edin!

As a note:
Ginger Alliance is motivated to synchronise their next maintenance release,
with php 4.3, to avoid the unfortunate API incompatibilities, that plagued
previous releases and created noise, both on sablist as on the php-bug
db.

Allthough we try to keep compatibility with 0.96, there are a number of
new features in 0.97(?) implemented for the php extension.

Any chance that 4.3.0-release can be built with that version? During
RC* shouldn't matter - in fact it would show if BC is not broken on win32.


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua

Logan I spent a minute looking at my own code by accident.
Logan I was thinking What the hell is this guy doing?


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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Melvyn Sopacua
At 08:29 11/5/2002 -0500, Ilia A. wrote:


It appears that the Sablotron needs to be upgraded as well, since xstl cannot
be compiled due to 2 missing flags
('SAB_DISABLE_STRIPPING','SAB_IGNORE_DOC_NOT_FOUND'), which I am guessing are
only defined in the newer library.


By the way: this error only occurs on windows, since it isn't `configured'. 
config.m4
checks 0.96, via SabVersion().


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua

Logan I spent a minute looking at my own code by accident.
Logan I was thinking What the hell is this guy doing?


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



Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Edin Kadribasic
 As a note:
 Ginger Alliance is motivated to synchronise their next maintenance
release,
 with php 4.3, to avoid the unfortunate API incompatibilities, that
plagued
 previous releases and created noise, both on sablist as on the
php-bug
 db.

 Allthough we try to keep compatibility with 0.96, there are a
number of
 new features in 0.97(?) implemented for the php extension.

 Any chance that 4.3.0-release can be built with that version?
During
 RC* shouldn't matter - in fact it would show if BC is not broken
on win32.

But 0.97 has not been released yet, has it? If it gets released
please drop me a note so I can upgrade the lib on our win32 build
machine.

Edin


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




Re: [PHP-DEV] ODBTP, a possible solution for MS-SQL and other databases

2002-11-05 Thread Maxim Maletsky


Wez Furlong [EMAIL PROTECTED] wrote... :

 As for developer interest; most of the big boys are attending a
 conference this week/weekend, so don't be disheartened if you still
 haven't had much response before the next weekend.

Considering the wireless network problems we are having, answering mails
became the challenge :)

--
Maxim Maletsky
[EMAIL PROTECTED]


www.PHPBeginner.com  // PHP for Beginners
www.maxim.cx // my Home

// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3



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




Re: [PHP-DEV] Win32 snaps ext/xslt

2002-11-05 Thread Melvyn Sopacua
At 14:58 11/5/2002 +0100, Edin Kadribasic wrote:


 As a note:
 Ginger Alliance is motivated to synchronise their next maintenance
release,
 with php 4.3, to avoid the unfortunate API incompatibilities, that
plagued
 previous releases and created noise, both on sablist as on the
php-bug
 db.

 Allthough we try to keep compatibility with 0.96, there are a
number of
 new features in 0.97(?) implemented for the php extension.

 Any chance that 4.3.0-release can be built with that version?
During
 RC* shouldn't matter - in fact it would show if BC is not broken
on win32.

But 0.97 has not been released yet, has it? If it gets released
please drop me a note so I can upgrade the lib on our win32 build
machine.


Yes, correct.
The plan is they release 0.97RC at the same time, we release RC1,
so feedback on the new combi can be addressed in 0.97 release.

I'll let you know.


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua

Logan I spent a minute looking at my own code by accident.
Logan I was thinking What the hell is this guy doing?


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




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

2002-11-05 Thread Wez Furlong
Hi Marcus,

I'm assuming that it's a warning about result being uninitialized; if
that is the case, lets just initialize it to zero in it's declaration.

The cleanup code in errexit: inspects the first byte of tmp_line before
attempting to use it; it might also be a good idea to initialize
tmp_line to  in it's declaration.

--Wez.

On 11/05/02, Marcus B?rger [EMAIL PROTECTED] wrote:
 helly Tue Nov  5 06:17:45 2002 EDT
 
   Modified files:  
 /php4/ext/standardftp_fopen_wrapper.c 
   Log:
   silence
   #when i get this code right tmp_line is not initialised, too.
   #Therefore php_stream_wrapper_log_error() will be called with
   #undefined value, will it?
   
   
 Index: php4/ext/standard/ftp_fopen_wrapper.c
 diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.36 
php4/ext/standard/ftp_fopen_wrapper.c:1.37
 --- php4/ext/standard/ftp_fopen_wrapper.c:1.36Fri Oct  4 17:58:39 2002
 +++ php4/ext/standard/ftp_fopen_wrapper.c Tue Nov  5 06:17:45 2002
 @@ -17,7 +17,7 @@
 |  Hartmut Holzgraefe [EMAIL PROTECTED]   |
 +--+
   */
 -/* $Id: ftp_fopen_wrapper.c,v 1.36 2002/10/04 21:58:39 sesser Exp $ */
 +/* $Id: ftp_fopen_wrapper.c,v 1.37 2002/11/05 11:17:45 helly Exp $ */
  
  #include php.h
  #include php_globals.h
 @@ -162,8 +162,10 @@
   resource-port = 21;
   
   stream = php_stream_sock_open_host(resource-host, resource-port, 
SOCK_STREAM, NULL, 0);
 - if (stream == NULL)
 + if (stream == NULL) {
 + result = 0; /* silence */
   goto errexit;
 + }
  
   php_stream_context_set(stream, context);
   php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);
 
 
 
 -- 
 PHP CVS 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: [PHP-CVS] cvs: php4 /ext/standard ftp_fopen_wrapper.c

2002-11-05 Thread Marcus Boerger
At 15:32 05.11.2002, Wez Furlong wrote:

Hi Marcus,

I'm assuming that it's a warning about result being uninitialized; if
that is the case, lets just initialize it to zero in it's declaration.


Yes. It did it there so that further warnings may arise.


The cleanup code in errexit: inspects the first byte of tmp_line before
attempting to use it; it might also be a good idea to initialize
tmp_line to  in it's declaration.


Seems like. But will there be a warning in that case anyway?



--Wez.

On 11/05/02, Marcus B?rger [EMAIL PROTECTED] wrote:
 helly Tue Nov  5 06:17:45 2002 EDT

   Modified files:
 /php4/ext/standardftp_fopen_wrapper.c
   Log:
   silence
   #when i get this code right tmp_line is not initialised, too.
   #Therefore php_stream_wrapper_log_error() will be called with
   #undefined value, will it?


 Index: php4/ext/standard/ftp_fopen_wrapper.c
 diff -u php4/ext/standard/ftp_fopen_wrapper.c:1.36 
php4/ext/standard/ftp_fopen_wrapper.c:1.37
 --- php4/ext/standard/ftp_fopen_wrapper.c:1.36Fri Oct  4 
17:58:39 2002
 +++ php4/ext/standard/ftp_fopen_wrapper.c Tue Nov  5 06:17:45 2002
 @@ -17,7 +17,7 @@
 |  Hartmut Holzgraefe 
[EMAIL PROTECTED]   |
 
+--+
   */
 -/* $Id: ftp_fopen_wrapper.c,v 1.36 2002/10/04 21:58:39 sesser Exp $ */
 +/* $Id: ftp_fopen_wrapper.c,v 1.37 2002/11/05 11:17:45 helly Exp $ */

  #include php.h
  #include php_globals.h
 @@ -162,8 +162,10 @@
   resource-port = 21;

   stream = php_stream_sock_open_host(resource-host, 
resource-port, SOCK_STREAM, NULL, 0);
 - if (stream == NULL)
 + if (stream == NULL) {
 + result = 0; /* silence */
   goto errexit;
 + }

   php_stream_context_set(stream, context);
   php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);



 --
 PHP CVS 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: #20263 [Opn-]: feof doesn't work with --with-curlwrappers

2002-11-05 Thread Melvyn Sopacua
Ehm,

I don't think you should make this Won't fix.
Having an open bug for this, can serve as a reminder for the maintainer,
that they should look at it.

'Suspend and assigned' is a better one - we WILL in fact fix it and IMHO we
shouldn't discourage people testing experimental code.

At 16:19 11/5/2002 +, [EMAIL PROTECTED] wrote:


 ID:   20263
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Won\'t fix
 Bug Type: cURL related
 Operating System: Linux RH 7
 PHP Version:  4CVS-2002-11-05
 New Comment:

curlwrappers wont work until PHP 4.4 or PHP 5


Previous Comments:


[2002-11-05 10:18:09] [EMAIL PROTECTED]

Are you sure that it is curlwrappers the responsible? did you tried the
same code without it?



[2002-11-05 10:09:09] [EMAIL PROTECTED]

The following script works fine without curlwrappers, but the while
loop never exits with it enabled:

?php
print Opening site..\n;
if ($fp = fopen('http://www.cnn.com/', 'r')) {
  print Reading data..\n;
  while (!feof($fp)) {
$data .= fgets($fp, 128);
  }
  print closing file..\n;
  fclose($fp);
  print $data;
}
?

./configure --with-mysql=/usr/local/ --with-apxs
--sysconfdir--mandir=/usr/local/man/ --enable-calendar --enable-ftp
--with-openssl --without-pear --with-curl=/usr/lib --with-zlib
--enable-tokenizer --with-imap-ssl --with-gd --with-curlwrappers
--disable-mbstring

curl 7.10.1 (i686-pc-linux-gnu) libcurl/7.10.1 OpenSSL/0.9.6d
zlib/1.1.3




--
Edit this bug report at http://bugs.php.net/?id=20263edit=1


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua

@Logan I spent a minute looking at my own code by accident.
@Logan I was thinking What the hell is this guy doing?


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




[PHP-DEV] Core Component

2002-11-05 Thread Adam Voigt
Just curious, someone asked me why isn't PEAR (specifically the DB
abstraction) directly written into the PHP engine (in C or whatever PHP
itself is written in) and I couldn't come up with an answer so I thought
I'd ask here.

Adam Voigt
[EMAIL PROTECTED]


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




RE: [PHP-DEV] Core Component

2002-11-05 Thread Lukas Smith
 From: Adam Voigt [mailto:adam;cryptocomm.com]
 Sent: Tuesday, November 05, 2002 6:29 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] Core Component
 
 Just curious, someone asked me why isn't PEAR (specifically the DB
 abstraction) directly written into the PHP engine (in C or whatever
PHP
 itself is written in) and I couldn't come up with an answer so I
thought
 I'd ask here.

Because nobody did it yet :-)

Also keeping them in PHP makes maintance easier.
All in all the same reason why you don’t write all your code in C or as
a PHP Extensions : not as easy to maintain.

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



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




Re: [PHP-DEV] TSRM compiler warnings

2002-11-05 Thread Andi Gutmans
Commited. Thanks.

Andi

At 02:04 PM 11/5/2002 +0100, Marcus Boerger wrote:

Could someone with karma please commit following patch
or give me karma for tsrm? It would silence all those warnings
at once:

/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_startup':
/usr/src/php4-HEAD/TSRM/TSRM.c:124: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:124: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:132: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:132: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:142: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_shutdown':
/usr/src/php4-HEAD/TSRM/TSRM.c:177: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:177: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `ts_allocate_id':
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:196: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:202: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:209: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:209: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:241: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `allocate_new_resource':
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:250: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `ts_resource_ex':
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:311: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:323: warning: statement with no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_mutex_lock':
/usr/src/php4-HEAD/TSRM/TSRM.c:511: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:511: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c: In function `tsrm_mutex_unlock':
/usr/src/php4-HEAD/TSRM/TSRM.c:538: warning: left-hand operand of comma 
expression has no effect
/usr/src/php4-HEAD/TSRM/TSRM.c:538: warning: left-hand operand of comma 
expression has no effect


cvs -z3 -q diff TSRM.c (in directory S:\php4-HEAD\TSRM\)
Index: TSRM.c
===
RCS file: /repository/TSRM/TSRM.c,v
retrieving revision 1.46
diff -u -r1.46 TSRM.c
--- TSRM.c  5 Oct 2002 11:34:02 -   1.46
+++ TSRM.c  5 Nov 2002 13:01:41 -
 -79,7 +79,7 
} \
}
 #else
-#define TSRM_ERROR
+#define TSRM_ERROR(args)
 #define TSRM_SAFE_RETURN_RSRC(array, offset, range)\
if (offset==0) 
{\
return 
array;  \



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




Re: [PHP-DEV] Core Component

2002-11-05 Thread Melvyn Sopacua
At 12:29 11/5/2002 -0500, Adam Voigt wrote:


Just curious, someone asked me why isn't PEAR (specifically the DB
abstraction) directly written into the PHP engine (in C or whatever PHP
itself is written in) and I couldn't come up with an answer so I thought
I'd ask here.


For the exact same reasons people use PHP instead of C.


Met vriendelijke groeten / With kind regards,

Webmaster IDG.nl
Melvyn Sopacua

Logan I spent a minute looking at my own code by accident.
Logan I was thinking What the hell is this guy doing?


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




[PHP-DEV] bug #19943

2002-11-05 Thread Moriyoshi Koizumi
This appears not a bug, but an expected behaviour for me.
Let's change it from Critial to Won't Fix or so on.

---
?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = $count;
$ragged[$count]['idx'] = $count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
}
?
---

The above snippet is actually a variant of the following code:
---
?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = (string)$count;
$ragged[$count]{(int)'idx'} = (string)$count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
}
?
---
Then, Cannot use a scalar value as an array warnings are due to
applications of braces for non-string variables.
But I can't still explain why leaks occured.

Moriyoshi


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




Re: [PHP-DEV] bug #19943

2002-11-05 Thread Ilia A.
I agree with you that this bug may not be critical, I am not certain why it 
was marked as such, however I do believe this is a bug that should be fixed.
If my understand of the situation is correct, the memory leak is the result of 
original $ragged[$count] = $count; expression. At this point ZE creates a 
ZVAL that contains a 2 byte string value, number + \0.
When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the original zval 
containing a string is converted to an array. During this conversion the 
string value is not freed and the result is a memory leak.

Ilia

On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
 This appears not a bug, but an expected behaviour for me.
 Let's change it from Critial to Won't Fix or so on.

 ---
 ?php
 $ragged = array();
 for ($count = 0; $count  10; $count++) {
 $ragged[$count] = $count;
 $ragged[$count]['idx'] = $count;
 }
 for ($count = 0; $count  10; $count++) {
 printf(single %d: %s\n, $count, $ragged[$count]);
 printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
 }
 ?
 ---

 The above snippet is actually a variant of the following code:
 ---
 ?php
 $ragged = array();
 for ($count = 0; $count  10; $count++) {
 $ragged[$count] = (string)$count;
 $ragged[$count]{(int)'idx'} = (string)$count;
 }
 for ($count = 0; $count  10; $count++) {
 printf(single %d: %s\n, $count, $ragged[$count]);
 printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
 }
 ?
 ---
 Then, Cannot use a scalar value as an array warnings are due to
 applications of braces for non-string variables.
 But I can't still explain why leaks occured.

 Moriyoshi


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




Re: [PHP-DEV] ZE2 configure

2002-11-05 Thread Andi Gutmans
I can't remember who did this patch. Sascha?
Can someone who knows exactly what needs merging do so please?

Andi

At 04:50 AM 11/2/2002 +0200, Jani Taskinen wrote:


Some people don't bother doing MFZE1...

--Jani


On Fri, 1 Nov 2002, Marcus Boerger wrote:

The build system complains that LIBZEND_DLSYM_CHECK
is not available. Should this be provided in Zend/Zend.m4?

marcus

cvs -z3 -q diff Zend\Zend.m4 (in directory S:\php4-HEAD\)
Index: Zend/Zend.m4
===
RCS file: /repository/ZendEngine2/Zend.m4,v
retrieving revision 1.35
diff -u -r1.35 Zend.m4
--- Zend/Zend.m423 Aug 2002 22:11:10 -  1.35
+++ Zend/Zend.m41 Nov 2002 20:17:36 -
 -230,3 +230,6 

  ])

+AC_DEFUN(LIBZEND_DLSYM_CHECK,[
+
+])



--
- For Sale! -


--
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] MySQL UDF that runs PHP

2002-11-05 Thread David Sklar
Based on Edin Kadribasic's PHP embed SAPI module, I wrote a MySQL UDF that
interprets PHP. You can get it here:

-- http://www.sklar.com/myphp-0.1.tar.gz

I'd be curious for any comments or suggestions folks have.

Thanks,

David Sklar


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




[PHP-DEV] [Sorta OT] Mystery zcontext?

2002-11-05 Thread John Coggeshall

I was digging around the ext/standard today and I wanted to do something
with the file access stuff, however I'm a bit lost on something... I'd
appreciate it if someone could explain this (as it's basically
undocumented).

What is the fourth parameter for the fopen() function? It's listed as a
resource, and there is some mention of using callbacks, etc But I
can't pin it down looking at the code... Anyone care to comment what the
zcontext parameter does? 

John


|-Original Message-
|From: Melvyn Sopacua [mailto:msopacua;idg.nl] 
|Sent: Tuesday, November 05, 2002 12:38 PM
|To: Adam Voigt
|Cc: [EMAIL PROTECTED]
|Subject: Re: [PHP-DEV] Core Component
|
|
|At 12:29 11/5/2002 -0500, Adam Voigt wrote:
|
|Just curious, someone asked me why isn't PEAR (specifically the DB
|abstraction) directly written into the PHP engine (in C or 
|whatever PHP 
|itself is written in) and I couldn't come up with an answer so I 
|thought I'd ask here.
|
|For the exact same reasons people use PHP instead of C.
|
|
|Met vriendelijke groeten / With kind regards,
|
|Webmaster IDG.nl
|Melvyn Sopacua
|
|@Logan I spent a minute looking at my own code by accident. 
|@Logan I was thinking What the hell is this guy doing?
|
|
|-- 
|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] MySQL UDF that runs PHP

2002-11-05 Thread Rasmus Lerdorf
Cool - will play with it a bit here.

On Tue, 5 Nov 2002, David Sklar wrote:

 Based on Edin Kadribasic's PHP embed SAPI module, I wrote a MySQL UDF that
 interprets PHP. You can get it here:

 -- http://www.sklar.com/myphp-0.1.tar.gz

 I'd be curious for any comments or suggestions folks have.

 Thanks,

 David Sklar


 --
 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: mrioux

2002-11-05 Thread Martial Rioux
Hi,
I Request CVS account to contribute a new extension base on smbclient from SAMBA. This 
extension is actualy located in php4/ext/smbc, from my developpement tree. 

Supported functions:
smbc_connect
smbc_disconnect
smbc_open
smbc_close
smbc_read
smbc_write
smbc_seek

I also made basic documentation and samples scripts using this extension.


Thanks for any comments or suggestion for adding this extension to the php cvs tree.

PS: By the time your are grant my cvs account other functions will be supported, I 
Hope! ;-)

Best regards, and thanks for your time

Martial Rioux

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




Re: [PHP-DEV] CVS Account Request: mrioux

2002-11-05 Thread Rasmus Lerdorf
libsmbclient is gpl'ed, correct?  We cannot accept extensions that are
written specifically against a single GPL'ed library.  Sorry.

-Rasmus

On 5 Nov 2002, Martial Rioux wrote:

 Hi,
 I Request CVS account to contribute a new extension base on smbclient from SAMBA. 
This extension is actualy located in php4/ext/smbc, from my developpement tree.

 Supported functions:
 smbc_connect
 smbc_disconnect
 smbc_open
 smbc_close
 smbc_read
 smbc_write
 smbc_seek

 I also made basic documentation and samples scripts using this extension.


 Thanks for any comments or suggestion for adding this extension to the php cvs tree.

 PS: By the time your are grant my cvs account other functions will be supported, I 
Hope! ;-)

 Best regards, and thanks for your time

 Martial Rioux

 --
 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 #19943

2002-11-05 Thread Moriyoshi Koizumi
I looked into it, and I've found you really got a point.

---
?php
$ragged = array();
$ragged[0] = a;
$ragged[0][0] = array(1);
var_dump($ragged);
?
---

The first script causes no leaks, while the second does:
---
?php
$ragged = array();
$ragged[0] = a;
$ragged[0][0] = (string)array(1);
var_dump($ragged);
?
---

Thanks for your insight.


Moriyoshi


Ilia A. [EMAIL PROTECTED] wrote:

 I agree with you that this bug may not be critical, I am not certain why it 
 was marked as such, however I do believe this is a bug that should be fixed.
 If my understand of the situation is correct, the memory leak is the result of 
 original $ragged[$count] = $count; expression. At this point ZE creates a 
 ZVAL that contains a 2 byte string value, number + \0.
 When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the original zval 
 containing a string is converted to an array. During this conversion the 
 string value is not freed and the result is a memory leak.
 
 Ilia
 
 On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
  This appears not a bug, but an expected behaviour for me.
  Let's change it from Critial to Won't Fix or so on.
 
  ---
  ?php
  $ragged = array();
  for ($count = 0; $count  10; $count++) {
  $ragged[$count] = $count;
  $ragged[$count]['idx'] = $count;
  }
  for ($count = 0; $count  10; $count++) {
  printf(single %d: %s\n, $count, $ragged[$count]);
  printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
  }
  ?
  ---
 
  The above snippet is actually a variant of the following code:
  ---
  ?php
  $ragged = array();
  for ($count = 0; $count  10; $count++) {
  $ragged[$count] = (string)$count;
  $ragged[$count]{(int)'idx'} = (string)$count;
  }
  for ($count = 0; $count  10; $count++) {
  printf(single %d: %s\n, $count, $ragged[$count]);
  printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
  }
  ?
  ---
  Then, Cannot use a scalar value as an array warnings are due to
  applications of braces for non-string variables.
  But I can't still explain why leaks occured.
 
  Moriyoshi
 
 
 -- 
 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] gettext change the behaviour of double scalar

2002-11-05 Thread Jean-Pierre Arneodo
Hi,
This is verified with 4.1.2 and 4.2.3
but not with 4.3.Opre2

[config]
Apache 1.3.27
RedHat 7.2
gettext-0.11.15

[myFile.php]
$lang='fr_FR';
putenv(LANG=$lang);
setlocale(LC_ALL,$lang);
bindtextdomain($domain,/MyDir/i18n);
textdomain($domain);

$a=10.12345;
echo $a; // print 10.12345

require('myOtherFile.php');

[myOtherFile.php]
$b=10.12345;
echo $b; // print 10

So, printing a double in a required file
after gettext configuration change the behaviour
of a double scalar.

Can somebody explain this?
Is it a bug?

Thanks!
Jean-Pierre



___
Do You Yahoo!? -- Une adresse yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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




[PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Moriyoshi Koizumi
The attached patch may be a fix for that bug.
Hope it works.

Moriyoshi


Moriyoshi Koizumi [EMAIL PROTECTED] wrote:

 I looked into it, and I've found you really got a point.
 
 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = array(1);
 var_dump($ragged);
 ?
 ---
 
 The first script causes no leaks, while the second does:
 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = (string)array(1);
 var_dump($ragged);
 ?
 ---
 
 Thanks for your insight.
 
 
 Moriyoshi
 
 
 Ilia A. [EMAIL PROTECTED] wrote:
 
  I agree with you that this bug may not be critical, I am not certain why it 
  was marked as such, however I do believe this is a bug that should be fixed.
  If my understand of the situation is correct, the memory leak is the result of 
  original $ragged[$count] = $count; expression. At this point ZE creates a 
  ZVAL that contains a 2 byte string value, number + \0.
  When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the original zval 
  containing a string is converted to an array. During this conversion the 
  string value is not freed and the result is a memory leak.
  
  Ilia
  
  On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
   This appears not a bug, but an expected behaviour for me.
   Let's change it from Critial to Won't Fix or so on.
  
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = $count;
   $ragged[$count]['idx'] = $count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
   }
   ?
   ---
  
   The above snippet is actually a variant of the following code:
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = (string)$count;
   $ragged[$count]{(int)'idx'} = (string)$count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
   }
   ?
   ---
   Then, Cannot use a scalar value as an array warnings are due to
   applications of braces for non-string variables.
   But I can't still explain why leaks occured.
  
   Moriyoshi
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

Index: zend_execute.c
===
RCS file: /repository/Zend/zend_execute.c,v
retrieving revision 1.315
diff -u -r1.315 zend_execute.c
--- zend_execute.c  3 Nov 2002 15:16:45 -   1.315
+++ zend_execute.c  5 Nov 2002 22:44:28 -
@@ -371,7 +371,7 @@
 

T-EA.data.str_offset.str-value.str.val[T-EA.data.str_offset.offset] = 
final_value-value.str.val[0];
if (op2
-op2-op_type == IS_VAR
+op2-op_type != IS_VAR
 
value==Ts[op2-u.var].tmp_var) {
STR_FREE(value-value.str.val);
}

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


Re: [PHP-DEV] CVS Account Request: mrioux

2002-11-05 Thread Moriyoshi Koizumi
Hmm, I'm afraid that I have to mention you a PECL module that seems very 
similar to your module...

Check out this one:
http://cvs.php.net/cvs.php/pear/PECL/smbc


Moriyoshi

Martial Rioux [EMAIL PROTECTED] wrote:

 Hi,
 I Request CVS account to contribute a new extension base on smbclient from SAMBA. 
This extension is actualy located in php4/ext/smbc, from my developpement tree. 
 
 Supported functions:
 smbc_connect
 smbc_disconnect
 smbc_open
 smbc_close
 smbc_read
 smbc_write
 smbc_seek
 
 I also made basic documentation and samples scripts using this extension.
 
 
 Thanks for any comments or suggestion for adding this extension to the php cvs tree.
 
 PS: By the time your are grant my cvs account other functions will be supported, I 
Hope! ;-)
 
 Best regards, and thanks for your time
 
 Martial Rioux
 
 -- 
 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] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Ilia A.
The patch does work and memory leak goes away after it is applied. There is 
another problem that I've just noticed. If you increase the loop from 10 to 
100 then you'll see that the $ragged[$count]['idx'] value is always the 1st 
character of the $ragged[$count] value. 
If a var_dump of an array is made you'll see that the array stucture looks 
something like this:
array(100) {
  [0]=
  string(1) 0
  [1]=
  string(1) 1
  [2]=
  string(1) 2
  [3]=
  string(1) 3
  [4]=
  string(1) 4

And so on, no mention of 'idx'. I believe since idx is not found,value of 0 is 
used, which causes the look up to go after $ragged[$count][0], returning the 
1st character of the $ragged[$count] value.
IMHO the fix for this problem should give the user a warning message 
indicating that they are not doing something correctly. ZE already would give 
you such an error, if were you try:
?php
$z = 1;
$ragged = array();
$ragged[0] = $z;
$ragged[0][0] = array(1);
var_dump($ragged);
?

Ilia

P.S. After your patch is applied the test script you've posted, results in the 
following error:
---
Zend/zend_execute.c(376) : Block 0x084EC268 status:
Beginning:  Cached (allocated on Zend/zend_execute.c:1985, 44 bytes)
  End:  OK
---


On November 5, 2002 05:48 pm, Moriyoshi Koizumi wrote:
 The attached patch may be a fix for that bug.
 Hope it works.

 Moriyoshi

 Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
  I looked into it, and I've found you really got a point.
 
  ---
  ?php
  $ragged = array();
  $ragged[0] = a;
  $ragged[0][0] = array(1);
  var_dump($ragged);
  ?
  ---
 
  The first script causes no leaks, while the second does:
  ---
  ?php
  $ragged = array();
  $ragged[0] = a;
  $ragged[0][0] = (string)array(1);
  var_dump($ragged);
  ?
  ---
 
  Thanks for your insight.
 
 
  Moriyoshi
 
  Ilia A. [EMAIL PROTECTED] wrote:
   I agree with you that this bug may not be critical, I am not certain
   why it was marked as such, however I do believe this is a bug that
   should be fixed. If my understand of the situation is correct, the
   memory leak is the result of original $ragged[$count] = $count;
   expression. At this point ZE creates a ZVAL that contains a 2 byte
   string value, number + \0.
   When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the
   original zval containing a string is converted to an array. During this
   conversion the string value is not freed and the result is a memory
   leak.
  
   Ilia
  
   On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
This appears not a bug, but an expected behaviour for me.
Let's change it from Critial to Won't Fix or so on.
   
---
?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = $count;
$ragged[$count]['idx'] = $count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
}
?
---
   
The above snippet is actually a variant of the following code:
---
?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = (string)$count;
$ragged[$count]{(int)'idx'} = (string)$count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
}
?
---
Then, Cannot use a scalar value as an array warnings are due to
applications of braces for non-string variables.
But I can't still explain why leaks occured.
   
Moriyoshi
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP-DEV] [Sorta OT] Mystery zcontext?

2002-11-05 Thread Wez Furlong
Hi John,

It's for some funky stuff that won't really come into it's own until
version 5 of PHP.

ATM, you can use stream_context_XXX family of functions to do:

o Set notification callbacks.  These can be used to implement progress
bars for event driven applications.

o Set parameters for the various URL wrappers. For http you can set the
user-agent header.

The context can be shared between multiple streams, and once the curl
library has enough hooks, the curlwrappers will use the context to do
things like store session cookies.

There is a documentation bug about this that might have a little bit
more info.

--Wez.

On Tue, 5 Nov 2002, John Coggeshall wrote:


 I was digging around the ext/standard today and I wanted to do something
 with the file access stuff, however I'm a bit lost on something... I'd
 appreciate it if someone could explain this (as it's basically
 undocumented).

 What is the fourth parameter for the fopen() function? It's listed as a
 resource, and there is some mention of using callbacks, etc But I
 can't pin it down looking at the code... Anyone care to comment what the
 zcontext parameter does?

 John



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




Re: [PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Moriyoshi Koizumi
 The patch does work and memory leak goes away after it is applied. There is 
 another problem that I've just noticed. If you increase the loop from 10 to 
 100 then you'll see that the $ragged[$count]['idx'] value is always the 1st 
 character of the $ragged[$count] value. 
 If a var_dump of an array is made you'll see that the array stucture looks 
 something like this:
--snip--
 And so on, no mention of 'idx'. I believe since idx is not found,value of 0 is 
 used, which causes the look up to go after $ragged[$count][0], returning the 
 1st character of the $ragged[$count] value.
 IMHO the fix for this problem should give the user a warning message 
 indicating that they are not doing something correctly. ZE already would give 
 you such an error, if were you try:

IMO this is a expected behaviour at least. Because although this is a 
deprecated manner, [] can be used in place of {} to specify an offset to a 
character of a string in favour of BC, so when $ragged[0] has a string 
value, the reference should be treated as that to a character rather than 
to an array element.

And engine may well complain about the validity when $ragged[0] doesn't 
hold a string value, nor an array value.

 P.S. After your patch is applied the test script you've posted, results in the 
 following error:
 ---
 Zend/zend_execute.c(376) : Block 0x084EC268 status:
 Beginning:  Cached (allocated on Zend/zend_execute.c:1985, 44 bytes)
   End:  OK
 ---

Perhaps my patch was not sufficient... A revised patch is attached. Please 
try this one, and if you like the patch, then commit it with extreme care 
:)

Moriyoshi

 
 On November 5, 2002 05:48 pm, Moriyoshi Koizumi wrote:
  The attached patch may be a fix for that bug.
  Hope it works.
 
  Moriyoshi
 
  Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
   I looked into it, and I've found you really got a point.
  
   ---
   ?php
   $ragged = array();
   $ragged[0] = a;
   $ragged[0][0] = array(1);
   var_dump($ragged);
   ?
   ---
  
   The first script causes no leaks, while the second does:
   ---
   ?php
   $ragged = array();
   $ragged[0] = a;
   $ragged[0][0] = (string)array(1);
   var_dump($ragged);
   ?
   ---
  
   Thanks for your insight.
  
  
   Moriyoshi
  
   Ilia A. [EMAIL PROTECTED] wrote:
I agree with you that this bug may not be critical, I am not certain
why it was marked as such, however I do believe this is a bug that
should be fixed. If my understand of the situation is correct, the
memory leak is the result of original $ragged[$count] = $count;
expression. At this point ZE creates a ZVAL that contains a 2 byte
string value, number + \0.
When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the
original zval containing a string is converted to an array. During this
conversion the string value is not freed and the result is a memory
leak.
   
Ilia
   
On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
 This appears not a bug, but an expected behaviour for me.
 Let's change it from Critial to Won't Fix or so on.

 ---
 ?php
 $ragged = array();
 for ($count = 0; $count  10; $count++) {
 $ragged[$count] = $count;
 $ragged[$count]['idx'] = $count;
 }
 for ($count = 0; $count  10; $count++) {
 printf(single %d: %s\n, $count, $ragged[$count]);
 printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
 }
 ?
 ---

 The above snippet is actually a variant of the following code:
 ---
 ?php
 $ragged = array();
 for ($count = 0; $count  10; $count++) {
 $ragged[$count] = (string)$count;
 $ragged[$count]{(int)'idx'} = (string)$count;
 }
 for ($count = 0; $count  10; $count++) {
 printf(single %d: %s\n, $count, $ragged[$count]);
 printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
 }
 ?
 ---
 Then, Cannot use a scalar value as an array warnings are due to
 applications of braces for non-string variables.
 But I can't still explain why leaks occured.

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

Index: zend_execute.c
===
RCS file: /repository/Zend/zend_execute.c,v
retrieving revision 1.315
diff -u -r1.315 zend_execute.c
--- zend_execute.c  3 Nov 2002 15:16:45 

Re: [PHP-DEV] CVS Account Request: mrioux

2002-11-05 Thread Chris Shiflett
Out of curiosity - why is this?

I assume it is because such an extension would somehow be required to be 
covered under the GPL as well, but I don't understand that. Shouldn't it 
be possible for the PHP extension's code to be licensed any license and 
simply use a GPL library? The extension's code would be copyrighted by 
the author, correct? So, why can't the author decide what terms his/her 
code is licensed under?

Just curious - I've heard this before and have never understood.

Chris

Rasmus Lerdorf wrote:

libsmbclient is gpl'ed, correct?  We cannot accept extensions that are
written specifically against a single GPL'ed library.  Sorry.

-Rasmus




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




Re: [PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Ilia A.
The new appears to work correctly and previously mentioned problem no longer 
occures. I've also ran the test suit after applying the patch and none of the 
tests have been adversly affected, so it does not appear to break any old 
functionality.

Ilia

On November 5, 2002 09:17 pm, Moriyoshi Koizumi wrote:
 Perhaps my patch was not sufficient... A revised patch is attached. Please
 try this one, and if you like the patch, then commit it with extreme care

 :)

 Moriyoshi

  On November 5, 2002 05:48 pm, Moriyoshi Koizumi wrote:
   The attached patch may be a fix for that bug.
   Hope it works.
  
   Moriyoshi
  
   Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
I looked into it, and I've found you really got a point.
   
---
?php
$ragged = array();
$ragged[0] = a;
$ragged[0][0] = array(1);
var_dump($ragged);
?
---
   
The first script causes no leaks, while the second does:
---
?php
$ragged = array();
$ragged[0] = a;
$ragged[0][0] = (string)array(1);
var_dump($ragged);
?
---
   
Thanks for your insight.
   
   
Moriyoshi
   
Ilia A. [EMAIL PROTECTED] wrote:
 I agree with you that this bug may not be critical, I am not
 certain why it was marked as such, however I do believe this is a
 bug that should be fixed. If my understand of the situation is
 correct, the memory leak is the result of original $ragged[$count]
 = $count; expression. At this point ZE creates a ZVAL that
 contains a 2 byte string value, number + \0.
 When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the
 original zval containing a string is converted to an array. During
 this conversion the string value is not freed and the result is a
 memory leak.

 Ilia

 On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
  This appears not a bug, but an expected behaviour for me.
  Let's change it from Critial to Won't Fix or so on.
 
  ---
  ?php
  $ragged = array();
  for ($count = 0; $count  10; $count++) {
  $ragged[$count] = $count;
  $ragged[$count]['idx'] = $count;
  }
  for ($count = 0; $count  10; $count++) {
  printf(single %d: %s\n, $count, $ragged[$count]);
  printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
  }
  ?
  ---
 
  The above snippet is actually a variant of the following code:
  ---
  ?php
  $ragged = array();
  for ($count = 0; $count  10; $count++) {
  $ragged[$count] = (string)$count;
  $ragged[$count]{(int)'idx'} = (string)$count;
  }
  for ($count = 0; $count  10; $count++) {
  printf(single %d: %s\n, $count, $ragged[$count]);
  printf(ragged %d: %s\n, $count,
  $ragged[$count]{(int)'idx'}); }
  ?
  ---
  Then, Cannot use a scalar value as an array warnings are due to
  applications of braces for non-string variables.
  But I can't still explain why leaks occured.
 
  Moriyoshi

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


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




Re: [PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Moriyoshi Koizumi
Ilia, thank you for double-checking.

Since I have no access to Zend module, I'm waiting for that to be 
committed by someone for now... Does it need more review?

Moriyoshi


Ilia A. [EMAIL PROTECTED] wrote:

 The new appears to work correctly and previously mentioned problem no longer 
 occures. I've also ran the test suit after applying the patch and none of the 
 tests have been adversly affected, so it does not appear to break any old 
 functionality.
 
 Ilia
 
 On November 5, 2002 09:17 pm, Moriyoshi Koizumi wrote:
  Perhaps my patch was not sufficient... A revised patch is attached. Please
  try this one, and if you like the patch, then commit it with extreme care
 
  :)
 
  Moriyoshi
 
   On November 5, 2002 05:48 pm, Moriyoshi Koizumi wrote:
The attached patch may be a fix for that bug.
Hope it works.
   
Moriyoshi
   
Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
 I looked into it, and I've found you really got a point.

 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = array(1);
 var_dump($ragged);
 ?
 ---

 The first script causes no leaks, while the second does:
 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = (string)array(1);
 var_dump($ragged);
 ?
 ---

 Thanks for your insight.


 Moriyoshi

 Ilia A. [EMAIL PROTECTED] wrote:
  I agree with you that this bug may not be critical, I am not
  certain why it was marked as such, however I do believe this is a
  bug that should be fixed. If my understand of the situation is
  correct, the memory leak is the result of original $ragged[$count]
  = $count; expression. At this point ZE creates a ZVAL that
  contains a 2 byte string value, number + \0.
  When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the
  original zval containing a string is converted to an array. During
  this conversion the string value is not freed and the result is a
  memory leak.
 
  Ilia
 
  On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
   This appears not a bug, but an expected behaviour for me.
   Let's change it from Critial to Won't Fix or so on.
  
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = $count;
   $ragged[$count]['idx'] = $count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
   }
   ?
   ---
  
   The above snippet is actually a variant of the following code:
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = (string)$count;
   $ragged[$count]{(int)'idx'} = (string)$count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count,
   $ragged[$count]{(int)'idx'}); }
   ?
   ---
   Then, Cannot use a scalar value as an array warnings are due to
   applications of braces for non-string variables.
   But I can't still explain why leaks occured.
  
   Moriyoshi
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php

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


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




Re: [PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV] bug #19943)

2002-11-05 Thread Ilia A.
On November 5, 2002 09:44 pm, Moriyoshi Koizumi wrote:
 Ilia, thank you for double-checking.

 Since I have no access to Zend module, I'm waiting for that to be
 committed by someone for now... Does it need more review?

It would probably be a good idea if more developers review this patch before 
it goes in. If there won't be any objections to the patch, I will commit it 
on your behalf.

Ilia


 Moriyoshi

 Ilia A. [EMAIL PROTECTED] wrote:
  The new appears to work correctly and previously mentioned problem no
  longer occures. I've also ran the test suit after applying the patch and
  none of the tests have been adversly affected, so it does not appear to
  break any old functionality.
 
  Ilia
 
  On November 5, 2002 09:17 pm, Moriyoshi Koizumi wrote:
   Perhaps my patch was not sufficient... A revised patch is attached.
   Please try this one, and if you like the patch, then commit it with
   extreme care
  
   :)
  
   Moriyoshi
  
On November 5, 2002 05:48 pm, Moriyoshi Koizumi wrote:
 The attached patch may be a fix for that bug.
 Hope it works.

 Moriyoshi

 Moriyoshi Koizumi [EMAIL PROTECTED] wrote:
  I looked into it, and I've found you really got a point.
 
  ---
  ?php
  $ragged = array();
  $ragged[0] = a;
  $ragged[0][0] = array(1);
  var_dump($ragged);
  ?
  ---
 
  The first script causes no leaks, while the second does:
  ---
  ?php
  $ragged = array();
  $ragged[0] = a;
  $ragged[0][0] = (string)array(1);
  var_dump($ragged);
  ?
  ---
 
  Thanks for your insight.
 
 
  Moriyoshi
 
  Ilia A. [EMAIL PROTECTED] wrote:
   I agree with you that this bug may not be critical, I am not
   certain why it was marked as such, however I do believe this is
   a bug that should be fixed. If my understand of the situation
   is correct, the memory leak is the result of original
   $ragged[$count] = $count; expression. At this point ZE
   creates a ZVAL that contains a 2 byte string value, number +
   \0.
   When $ragged[$count]['idx'] = 'ragged '.$count; is executed,
   the original zval containing a string is converted to an array.
   During this conversion the string value is not freed and the
   result is a memory leak.
  
   Ilia
  
   On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
This appears not a bug, but an expected behaviour for me.
Let's change it from Critial to Won't Fix or so on.
   
-
   -- ?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = $count;
$ragged[$count]['idx'] = $count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count,
$ragged[$count]['idx']); }
?
-
   --
   
The above snippet is actually a variant of the following
code:
-
   -- ?php
$ragged = array();
for ($count = 0; $count  10; $count++) {
$ragged[$count] = (string)$count;
$ragged[$count]{(int)'idx'} = (string)$count;
}
for ($count = 0; $count  10; $count++) {
printf(single %d: %s\n, $count, $ragged[$count]);
printf(ragged %d: %s\n, $count,
$ragged[$count]{(int)'idx'}); }
?
-
   -- Then, Cannot use a scalar value as an array warnings are
due to applications of braces for non-string variables.
But I can't still explain why leaks occured.
   
Moriyoshi
  
   --
   PHP Development Mailing List http://www.php.net/
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP-DEV] CyberMut and SPPLUS

2002-11-05 Thread nicos
Hello,

I see that CyberMut a paiement system from one of our french bank has
got its own extension. I'm working for SPPLUS one of an another bank in
France. I was wondering if we could also add an extension for it... I just
finished it and it works really fine with PHP-4.2.3 and PHP-4.3.0pre2 after
many tests. I really dont see why CyberMut should have one and not its
concurrent.

Thanks for any comment.

--

M.CHAILLAN Nicolas
[EMAIL PROTECTED]




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




Re: [PHP-DEV] [PATCH] A suggested fix for bug #19943 (Re: [PHP-DEV]bug #19943)

2002-11-05 Thread Andi Gutmans
We'll take a look at this.
Thanks,
Andi

At 07:48 AM 11/6/2002 +0900, Moriyoshi Koizumi wrote:

The attached patch may be a fix for that bug.
Hope it works.

Moriyoshi


Moriyoshi Koizumi [EMAIL PROTECTED] wrote:

 I looked into it, and I've found you really got a point.

 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = array(1);
 var_dump($ragged);
 ?
 ---

 The first script causes no leaks, while the second does:
 ---
 ?php
 $ragged = array();
 $ragged[0] = a;
 $ragged[0][0] = (string)array(1);
 var_dump($ragged);
 ?
 ---

 Thanks for your insight.


 Moriyoshi


 Ilia A. [EMAIL PROTECTED] wrote:

  I agree with you that this bug may not be critical, I am not certain 
why it
  was marked as such, however I do believe this is a bug that should be 
fixed.
  If my understand of the situation is correct, the memory leak is the 
result of
  original $ragged[$count] = $count; expression. At this point ZE 
creates a
  ZVAL that contains a 2 byte string value, number + \0.
  When $ragged[$count]['idx'] = 'ragged '.$count; is executed, the 
original zval
  containing a string is converted to an array. During this conversion the
  string value is not freed and the result is a memory leak.
 
  Ilia
 
  On November 5, 2002 01:45 pm, Moriyoshi Koizumi wrote:
   This appears not a bug, but an expected behaviour for me.
   Let's change it from Critial to Won't Fix or so on.
  
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = $count;
   $ragged[$count]['idx'] = $count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count, $ragged[$count]['idx']);
   }
   ?
   ---
  
   The above snippet is actually a variant of the following code:
   ---
   ?php
   $ragged = array();
   for ($count = 0; $count  10; $count++) {
   $ragged[$count] = (string)$count;
   $ragged[$count]{(int)'idx'} = (string)$count;
   }
   for ($count = 0; $count  10; $count++) {
   printf(single %d: %s\n, $count, $ragged[$count]);
   printf(ragged %d: %s\n, $count, $ragged[$count]{(int)'idx'});
   }
   ?
   ---
   Then, Cannot use a scalar value as an array warnings are due to
   applications of braces for non-string variables.
   But I can't still explain why leaks occured.
  
   Moriyoshi
 
 
  --
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 


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


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


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