Re: [PHP-DEV] [PATCH] to reflect installation values unknown at build time on Win32

2002-05-01 Thread Sebastian Bergmann

Preston L. Bannister wrote:
 There are values known at compile time on Unix that are *not* known
 at compile time on Win32.  Rather than compile in something misleading
 (and very likely wrong), better to *not* supply a value.

  I'd like to rename the file to config.w32.h.in and let MSVC rename
  config.w32.h.in to config.w32.h, if config.w32.h does not yet exist.

  This way, people can configure their paths for instance.

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

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

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




Re: [PHP-DEV] Re: mirrors.inc/countries.inc - Where is it?

2002-05-01 Thread Alexander Skwar

»Jim Winstead« sagte am 2002-04-30 um 22:12:21 - :
 they're generated files, not under cvs control. they just define some
 arrays -- you can view the files directly at

Thanks.

 questions about the php.net sites should generally be directed to the
 php-mirrors list.

Ah, okay.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
   Uptime: 7 days 3 hours 42 minutes

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




[PHP-DEV] resource problem, advice wanted

2002-05-01 Thread Stig Venaas

This is a bit involved, I'll try to explain. I'm trying to fix a
problem in the LDAP extension, but not sure how best to do it.

The issue is that code like

$e = ldap_first_entry($ds, ldap_read($ds,$dn,objectClass=*));
$a = ldap_get_attributes($ds, $e);

crashes.

What happens is that ldap_read() returns a resource. After
ldap_first_entry() is executed, the resource returned by
ldap_read() is freed because it is not referred any more,
at least it looks that way to the Zend. The destructor for
that resource will free the result obtained by ldap_read().
The problem is that the resource returned by ldap_first_entry()
is simply a pointer inside the data obtained with ldap_read(),
but this has now been freed, so when ldap_get_attributes()
tries to access it, it's already freed. The solution would be
to make sure that the result resource created by ldap_read()
is not freed as long as there exists entry resources created
by ldap_first_entry() etc. Or that the result destructor for
the resource created by ldap_read() does not free it, and
have the entry destructor (created by ldap_first_entry() etc)
free the memory if it is the last entry resource for that
result resource. That would require some additional data
structures and refcounting though. Maybe a Zend variable could
be used and let Zend do the ref counting, perhaps I could
increase the refcount for the result resource each time I
create an entry resource, and decrease it again in the
entry destructor? Anyone got some advice?

BTW, the following code works

$info = ldap_read($ds,$dn,objectClass=*);
$e = ldap_first_entry($ds, $info);
$a = ldap_get_attributes($ds, $e);

since $info is not freed until the script finishes. This is
why this bug hasn't been found before (AFAIK).

Stig

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




[PHP-DEV] convert access to JAVA PHP mysql Xml Soap

2002-05-01 Thread Jacky Kenna


Hi  We are a publishing company based in London. We have developed a
multi-user
MS Access contact management and bookkeeping database system which we want
to adapt / re-write such that it can be used over the web ( ASP) using
Internet
Explorer (or similar) from any location, as our clients would like to use
it.

We are therefore looking for someone to develope or who will head a team of
developers and
co-ordinate this project. If you are interested in working with us on this,
please e-mail [EMAIL PROTECTED] with a brief outline of your knowledge
and experience of programming languages and I will get back to you as soon
as possible.

Jacky Kenna
Managing Director, PDA
0207 384 1985
[EMAIL PROTECTED]




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




RE: [PHP-DEV] config.w32.h

2002-05-01 Thread Joseph Tate

1.  I think it's ok.

2.  I'd create a batch file that does the renaming, and then set it up to
run in a custom build step.  You can set those up through the Custom Build
tab in the Project settings dialog.

Joseph

 -Original Message-
 From: Sebastian Bergmann [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 29, 2002 1:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] config.w32.h


   As you may know, I worked a bit on config.w32.h recently.

   I'd like to rename the file to config.w32.h.in and let MSVC rename
   config.w32.h.in to config.w32.h, if config.w32.h does not yet exist.

   Two questions:

 1.) Is this okay?

 2.) How do I do this? :-)

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

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

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


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




[PHP-DEV] news.php.net shows unterminated string

2002-05-01 Thread Derick Rethans

Hello,

while browsing http://news.php.net/group.php?group=php.general I saw the 
following error:

Warning: String is not zero-terminated (Úèfî ) (source: 
zend_execute_API.c:583) in /usr/local/www/news.php.net/common.inc(80) : 
regexp code on line 0

Warning: String is not zero-terminated (Úèfî ) (source: 
zend_execute_API.c:274) in /usr/local/www/news.php.net/common.inc on line 
80


Which version of PHP is running on this machine? I'll see if I can fix 
this error then.


regards,
Derick


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




[PHP-DEV] Re: news.php.net shows unterminated string

2002-05-01 Thread J Smith


[root@corduroy php-4.2.1RC1]# lynx -head -dump http://news.php.net
HTTP/1.1 200 OK
Date: Wed, 01 May 2002 14:37:45 GMT
Server: Apache/1.3.20 (Unix) PHP/4.2.0RC2
X-Powered-By: PHP/4.2.0RC2
Connection: close
Content-Type: text/html; charset=iso-8859-1

J


Derick Rethans wrote:

 Hello,
 
 while browsing http://news.php.net/group.php?group=php.general I saw the
 following error:
 
 Warning: String is not zero-terminated (Úèfî ) (source:
 zend_execute_API.c:583) in /usr/local/www/news.php.net/common.inc(80) :
 regexp code on line 0
 
 Warning: String is not zero-terminated (Úèfî ) (source:
 zend_execute_API.c:274) in /usr/local/www/news.php.net/common.inc on line
 80
 
 
 Which version of PHP is running on this machine? I'll see if I can fix
 this error then.
 
 
 regards,
 Derick


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




[PHP-DEV] Re: Xdebug extension availability

2002-05-01 Thread Yasuo Ohgaki

Derick Rethans wrote:
 Hello,
 
 I'm happy to announce the availability of the xdebug extension. This 
 extension modifies the php error handler to show stack traces. With this 
 you can exactly see how the current function was called, even the 
 parameters show up (if they are constants). I'm still working on variable 
 parameters. 

Nice extension. I was thinking to make a similar one.

Can you put it into PECL?

Or better yet, I would like to see them as standard
function. It seems there may be license problem, though.

--
Yasuo Ohgaki





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




Re: [PHP-DEV] Re: Xdebug extension availability

2002-05-01 Thread derick

On Wed, 1 May 2002, Yasuo Ohgaki wrote:

 Nice extension. I was thinking to make a similar one.
 
 Can you put it into PECL?

I can, but I don't want it yet. I want to wait until the extension 
stabilized some more, and PECL is more ready.

 
 Or better yet, I would like to see them as standard
 function. It seems there may be license problem, though.

Licence problem? I'm using the PHP Licence for now.

regards,

Derick

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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: Xdebug extension availability

2002-05-01 Thread derick

On Wed, 1 May 2002, Yasuo Ohgaki wrote:

 I saw
 
 /* The contents of this file are subject to the Vulcan Logic Public
   * License Version 1.1 (the License); you may not use this file
   * except in compliance with the License. You may obtain a copy of
   * the License at http://www.vl-srm.net/vlpl/
 
 in srm_llist.[ch]
 
 I don't read the license statement, so I cannot tell if there
 will be a problem or not.

Ah ok, it's BSD style, modelled after the PHP one. So that won't be a 
problem.

Derick

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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: Xdebug extension availability

2002-05-01 Thread derick

Hello,

On Wed, 1 May 2002, Adam Wright wrote:

 Very interesting! Possibly stupid question - Will it co-exist happily with
 other Zend extensions (ala the Optimiser/Decoder)?

Didn't try yet, but will do soon.

regards,
Derick

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Yasuo Ohgaki [EMAIL PROTECTED]
 Cc: PHP Developers Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, May 01, 2002 3:59 PM
 Subject: Re: [PHP-DEV] Re: Xdebug extension availability
 
 
  On Wed, 1 May 2002, Yasuo Ohgaki wrote:
 
   I saw
  
   /* The contents of this file are subject to the Vulcan Logic Public
 * License Version 1.1 (the License); you may not use this file
 * except in compliance with the License. You may obtain a copy of
 * the License at http://www.vl-srm.net/vlpl/
  
   in srm_llist.[ch]
  
   I don't read the license statement, so I cannot tell if there
   will be a problem or not.
 
  Ah ok, it's BSD style, modelled after the PHP one. So that won't be a
  problem.
 
  Derick
 
  ---
   Did I help you? Consider a gift:
http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
  ---
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
 
 
 

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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] config.w32.h

2002-05-01 Thread Sebastian Bergmann

Joseph Tate wrote:
 2.  I'd create a batch file that does the renaming, and then set it up 
 to run in a custom build step.  You can set those up through the 
 Custom Build tab in the Project settings dialog.

# Begin Source File

SOURCE=..\main\config.w32.h.in

# Begin Custom Build
InputPath=..\main\config.w32.h.in

..\main\config.w32.h.in : $(SOURCE) $(INTDIR) $(OUTDIR)
copy ..\main\config.w32.h.in ..\main\config.w32.h  nul 

# End Custom Build
# End Source File

  should do the trick, but doesn't.

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

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

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




[PHP-DEV] wrong version

2002-05-01 Thread andrey

I found that in the php4.2.0 zip I downloaded from a mirror

  Now that version 4.1 introduces a safer sapi module, we recommend
  that you configure PHP as a module in Apache.

in install.txt.
May someone grep from 4.1 and change them to 4.2 everywhere it is suitable.

Regards,
Andrey


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




[PHP-DEV] Bug or Feature: ini_get() return value

2002-05-01 Thread Ian Thurlbeck


Dear All

Is this a bug or a feature?

Tested on Apache 1.3.22 + PHP 4.1.2  and
Apache 2.0.35 + PHP 4.2.0RC4

With php.ini setting some_var=On I get the following:

ini_get(some_var) returns 1

Fair enough.

If you set some_var=Off the results are:

ini_get(some_var) returns 

i.e. ini_get() returns an empty string or undefined or something, whereas I 
was expecting 0 - is this a bug?

Many thanks

Ian

-- 
Ian Thurlbeckhttp://www.stams.strath.ac.uk/
Statistics and Modelling Science, University of Strathclyde
Livingstone Tower, 26 Richmond Street, Glasgow, UK,  G1 1XH
Tel: +44 (0)141 548 3667   Fax: +44 (0)141 552 2079


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




[PHP-DEV] $_USER -- just a thought

2002-05-01 Thread Hank Marquardt

I've been having difficulty with $GLOBALS in a fashion similar to that
reported in bug #16065 -- I'm using debian-unstable packages of 4.1.2,
maybe it'll go away with the 4.2 packages, but I digress 

What I'm trying to do is save state of the user's variables at a given
point in time and as far as I can tell that's only in the $GLOBALS array
today ... everything else is clean to save, the $_GET|POST|SESSION|COOKIE... stuff, 
but the user's stuff is a problem.

So it got me wondering/thinking that it might be nice to have a $_USER
array available that has this stuff ...

Any chance it already exists, or might be made available?
-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C

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




Re: [PHP-DEV] $_USER -- just a thought

2002-05-01 Thread Markus Fischer

Hi,

That is what $_SESSION is for. This really is a question for
[EMAIL PROTECTED] (next time).

- Markus

On Wed, May 01, 2002 at 11:16:53AM -0500, Hank Marquardt wrote : 
 I've been having difficulty with $GLOBALS in a fashion similar to that
 reported in bug #16065 -- I'm using debian-unstable packages of 4.1.2,
 maybe it'll go away with the 4.2 packages, but I digress 
 
 What I'm trying to do is save state of the user's variables at a given
 point in time and as far as I can tell that's only in the $GLOBALS array
 today ... everything else is clean to save, the $_GET|POST|SESSION|COOKIE... stuff, 
but the user's stuff is a problem.
 
 So it got me wondering/thinking that it might be nice to have a $_USER
 array available that has this stuff ...
 
 Any chance it already exists, or might be made available?
 -- 
 Hank Marquardt [EMAIL PROTECTED]
 http://web.yerpso.net
 GPG Id: 2BB5E60C
 Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
 
 -- 
 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
Mind if I MFH ? What QA did you do on it? the usual? ah... none :)

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




Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Daniel Beulshausen

At 17:44 01.05.2002 +0200, Sebastian Bergmann wrote:
Daniel Beulshausen wrote:
  what's the reason to rename the file?

   As I pointed out in a previous posting, this way we could put
   config.w32.h into .cvsignore and let it be created from a
   config.w32.h.in file if it doesn't exist.

   This way, people can configure their Win32 build.

do you mean constants like PHP_EXTENSION_DIR?
they should be changed to use the windows registry anyway...
for any other compile time configuration option i don't think that's wise 
to do.

daniel

/*--
Daniel Beulshausen - [EMAIL PROTECTED]
Using PHP on Windows? http://www.php4win.com


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




Re: [PHP-DEV] Bug or Feature: ini_get() return value

2002-05-01 Thread derick

Hello Ian,

On Wed, 1 May 2002, Ian Thurlbeck wrote:

 Is this a bug or a feature?
 
 Tested on Apache 1.3.22 + PHP 4.1.2  and
 Apache 2.0.35 + PHP 4.2.0RC4
 
 With php.ini setting some_var=On I get the following:
 
 ini_get(some_var) returns 1
 
 Fair enough.
 
 If you set some_var=Off the results are:
 
 ini_get(some_var) returns 
 
 i.e. ini_get() returns an empty string or undefined or something, whereas I 
 was expecting 0 - is this a bug?

 is the representatation of FALSE. Try var_dump (ini_get(some_var)); 
and you will see it is correct. Doing echo FALSE will also show the empty 
string, so it's perfectly normal.

regards,
Derick

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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] $_USER -- just a thought

2002-05-01 Thread derick

On Wed, 1 May 2002, Hank Marquardt wrote:

 I've been having difficulty with $GLOBALS in a fashion similar to that
 reported in bug #16065 -- I'm using debian-unstable packages of 4.1.2,
 maybe it'll go away with the 4.2 packages, but I digress 
 
 What I'm trying to do is save state of the user's variables at a given
 point in time and as far as I can tell that's only in the $GLOBALS array
 today ... everything else is clean to save, the $_GET|POST|SESSION|COOKIE... stuff, 
but the user's stuff is a problem.
 
 So it got me wondering/thinking that it might be nice to have a $_USER
 array available that has this stuff ...
 
 Any chance it already exists, or might be made available?

$_REQUEST is a combination of $_GET, $_POST and $_COOKIE.

Derick

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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] config.w32.h

2002-05-01 Thread Andi Gutmans

At 19:20 29/04/2002 +0200, Sebastian Bergmann wrote:
   As you may know, I worked a bit on config.w32.h recently.

   I'd like to rename the file to config.w32.h.in and let MSVC rename
   config.w32.h.in to config.w32.h, if config.w32.h does not yet exist.

   Two questions:

 1.) Is this okay?

 2.) How do I do this? :-)


Is it really necessary?

Andi


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




Re: [PHP-DEV] $_USER -- just a thought

2002-05-01 Thread Hank Marquardt

Allow me to elaborate --

I basically am looking for whatever is *not* in the existing $_ arrays.
The application is to save state in a 'crash and burn' function as much
as possible about the crash event ... I'm serializing it all and writing
to a file (or email or db ) I've already got all the $_ stuff, I'm
looking for the incidentals ... the loop counters, the current state of
bind variables, ... all the user stuff that isn't in $_SESSION -- right
now as far as I can tell that is just in $GLOBALS ... the stuff at the
very end if you iterate it. ... just seemed like that should be $_USER
to me; so I asked:)

On Wed, May 01, 2002 at 06:42:17PM +0200, [EMAIL PROTECTED] wrote:
 On Wed, 1 May 2002, Hank Marquardt wrote:
 
  I've been having difficulty with $GLOBALS in a fashion similar to that
  reported in bug #16065 -- I'm using debian-unstable packages of 4.1.2,
  maybe it'll go away with the 4.2 packages, but I digress 
  
  What I'm trying to do is save state of the user's variables at a given
  point in time and as far as I can tell that's only in the $GLOBALS array
  today ... everything else is clean to save, the $_GET|POST|SESSION|COOKIE... 
stuff, but the user's stuff is a problem.
  
  So it got me wondering/thinking that it might be nice to have a $_USER
  array available that has this stuff ...
  
  Any chance it already exists, or might be made available?
 
 $_REQUEST is a combination of $_GET, $_POST and $_COOKIE.
 
 Derick
 
 ---
  Did I help you? Consider a gift:
   http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
 ---
   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
 

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP  PHP II -- Starting March 25, 2002 
*** See http://www.hwg.org/services/classes

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




Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Andi Gutmans

Ignore my previous Email. I think it's fine..

Andi

At 17:44 01/05/2002 +0200, Sebastian Bergmann wrote:
Daniel Beulshausen wrote:
  what's the reason to rename the file?

   As I pointed out in a previous posting, this way we could put
   config.w32.h into .cvsignore and let it be created from a
   config.w32.h.in file if it doesn't exist.

   This way, people can configure their Win32 build.

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

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

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


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




Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Sebastian Bergmann

Daniel Beulshausen wrote:
 do you mean constants like PHP_EXTENSION_DIR?

  For instance, yes.

 they should be changed to use the windows registry anyway...

  Feel free to do it :)

 for any other compile time configuration option i don't think that's 
 wise to do.

  Well, not everyone needs all of the extensions we're currently building
  per default.

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

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

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




[PHP-DEV] new patch to session.c some new API

2002-05-01 Thread Thies C. Arntzen


hi,

here's the new version of the patch that exposes the
URL-Rewriter (what a cool piece of software) script and
C-Space via an api:

from PHP:
output_add_rewrite_var($varname, $value);
output_remove_rewrite_var($varname);

add/remove a var from an internal list of all vars that
should be transparently rewritten in the HTML output.

from C:
int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len 
TSRMLS_DC);
int php_url_scanner_remove_var(char *name, int name_len TSRMLS_DC);

the value will be automatically ULR-Encoded for you!

the session module has been adjusted to use the new API,
which simplyfies it a bit (no longer need to fiddle with the
output-system)

so the guts of this patch is to make the URL-Rewriter
usable by more than just the session-module! (which i really
need)

comments? 
tc

sample-code:

?php
output_add_rewrite_var(a, pallo);
output_add_rewrite_var(b, ichdu und der  \rest\);
session_start();
?
a href=/hallo.phphallo/a
forminput type=text/form
?php
ob_flush(); 
session_destroy();
output_remove_rewrite_var(a);
?
a href=/hallo.phphallo/a
forminput type=text/form

output: (reformatted for readablity)

a 
href=/hallo.php?a=pallob=ich%26du+und+der+%3E+%22rest%22PHPSESSID=b55ee1d3161a5cb966d89ef336415ffchallo/a
form
input type=hidden name=a value=pallo /
input type=hidden name=b value=ich%26du+und+der+%3E+%22rest%22 /
input type=hidden name=PHPSESSID value=b55ee1d3161a5cb966d89ef336415ffc /
input type=texti
/form

a href=/hallo.php?b=ich%26du+und+der+%3E+%22rest%22hallo/a
form
input type=hidden name=b value=ich%26du+und+der+%3E+%22rest%22 /
input type=text
/form



Index: ext/session/php_session.h
===
RCS file: /repository/php4/ext/session/php_session.h,v
retrieving revision 1.77
diff -u -r1.77 php_session.h
--- ext/session/php_session.h   28 Apr 2002 11:45:45 -  1.77
+++ ext/session/php_session.h   1 May 2002 17:15:20 -
 -115,7 +115,6 
zend_bool use_cookies;
zend_bool use_trans_sid;/* contains the INI value of whether to use 
trans-sid */
zend_bool apply_trans_sid;  /* whether or not to enable trans-sid for the 
current request */
-   zend_bool output_handler_registered;
 } php_ps_globals;
 
 typedef php_ps_globals zend_ps_globals;
 -171,8 +170,6 
 
 #define PS_SERIALIZER_ENTRY(x) \
{ #x, PS_SERIALIZER_ENCODE_NAME(x), PS_SERIALIZER_DECODE_NAME(x) }
-
-PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC);
 
 void php_set_session_var(char *name, size_t namelen, zval *state_val, 
php_unserialize_data_t *var_hash TSRMLS_DC);
 int php_get_session_var(char *name, size_t namelen, zval ***state_var TSRMLS_DC);
Index: ext/session/session.c
===
RCS file: /repository/php4/ext/session/session.c,v
retrieving revision 1.299
diff -u -r1.299 session.c
--- ext/session/session.c   28 Apr 2002 11:45:45 -  1.299
+++ ext/session/session.c   1 May 2002 17:15:20 -
 -79,34 +79,6 
 
 static ps_module *_php_find_ps_module(char *name TSRMLS_DC);
 static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
-static void php_session_end_output_handler(TSRMLS_D);
-
-static void php_session_output_handler(char *output, uint output_len, char 
**handled_output, uint *handled_output_len, int mode TSRMLS_DC)
-{
-   if ((PS(session_status) == php_session_active)) {
-   *handled_output = url_adapt_ext_ex(output, output_len, 
PS(session_name), PS(id), handled_output_len, (zend_bool) (modePHP_OUTPUT_HANDLER_END 
? 1 : 0) TSRMLS_CC);
-   } else {
-   *handled_output = NULL;
-   }
-}
-
-
-static void php_session_start_output_handler(uint chunk_size TSRMLS_DC)
-{
-   php_url_scanner_activate(TSRMLS_C);
-   php_url_scanner_ex_activate(TSRMLS_C);
-   php_start_ob_buffer(NULL, chunk_size, 1 TSRMLS_CC);
-   php_ob_set_internal_handler(php_session_output_handler, chunk_size, trans sid 
session, 1 TSRMLS_CC);
-   PS(output_handler_registered) = 1;
-}
-
-
-static void php_session_end_output_handler(TSRMLS_D)
-{
-   php_url_scanner_ex_deactivate(TSRMLS_C);
-   php_url_scanner_deactivate(TSRMLS_C);
-}
-
 
 static PHP_INI_MH(OnUpdateSaveHandler)
 {
 -956,7 +928,7 
 
PS(session_status) = php_session_active;
if (PS(apply_trans_sid)) {
-   php_session_start_output_handler(4096 TSRMLS_CC);
+   php_url_scanner_add_var(PS(session_name), strlen(PS(session_name)), 
+PS(id), strlen(PS(id)));
}
 
php_session_cache_limiter(TSRMLS_C);
 -1404,21 +1376,13 
 /* }}} */
 
 
-PHPAPI void session_adapt_url(const char *url, size_t urllen, char **new, size_t 
*newlen TSRMLS_DC)
-{
-   if (PS(apply_trans_sid)  (PS(session_status) == php_session_active)) {

Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Daniel Beulshausen

At 18:35 01.05.2002 +0200, Sebastian Bergmann wrote:
Daniel Beulshausen wrote:
  do you mean constants like PHP_EXTENSION_DIR?

   For instance, yes.

  they should be changed to use the windows registry anyway...

   Feel free to do it :)

this isn't going to be a big task, i'll put it onto my todo.

  for any other compile time configuration option i don't think that's
  wise to do.

   Well, not everyone needs all of the extensions we're currently building
   per default.

as the built-in extensions don't require you to fetch external libraries, 
it doesn't hurt to build them.
i find it much more annoying if you can't be sure wether the 
distributed/used build supports extension x or y per default.

daniel

/*--
Daniel Beulshausen - [EMAIL PROTECTED]
Using PHP on Windows? http://www.php4win.com


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




RE: [PHP-DEV] config.w32.h

2002-05-01 Thread Preston L. Bannister

From: Daniel Beulshausen [mailto:[EMAIL PROTECTED]]
 
 At 18:35 01.05.2002 +0200, Sebastian Bergmann wrote:
 Daniel Beulshausen wrote:
   do you mean constants like PHP_EXTENSION_DIR?
 
For instance, yes.
 
   they should be changed to use the windows registry anyway...
 
Feel free to do it :)
 
 this isn't going to be a big task, i'll put it onto my todo.


I'd rather strongly suggest this value not be in the registry.

What happens in the case were two different applications are installed
on the same machine, and both use PHP - but different versions and with
different libraries?  You really don't want machine-global settings.

This isn't a theoretical question! :)  

We will be using PHP in our application and need to be certain that 
any changes the customer makes to there global use of PHP does not
crater out application.  We can get this assurance by using a local
copy of PHP in our application, with a local php.ini file.

Instead I'd suggest that the settings stay in php.ini, but that PHP
look for php.ini first local to the installation of php.exe.

I posted a (tested!) patch a few days back to do exactly this.

--
Preston L. Bannister
http://members.cox.net/preston.bannister/
pbannister on Yahoo Messenger

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




Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Shane Caraveo



  they should be changed to use the windows registry anyway...

   Feel free to do it :)
 
 
 this isn't going to be a big task, i'll put it onto my todo.
 

It's already done, been there for a long time.  php.ini values are 
configurable via registry, and can be done on a per-domain basis.  It is 
kind of a pain to deal with configuration that way though.

Shane



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




Re: [PHP-DEV] config.w32.h

2002-05-01 Thread Daniel Beulshausen

At 11:19 01.05.2002 -0700, Shane Caraveo wrote:


  they should be changed to use the windows registry anyway...

   Feel free to do it :)

this isn't going to be a big task, i'll put it onto my todo.

It's already done, been there for a long time.  php.ini values are 
configurable via registry, and can be done on a per-domain basis.  It is 
kind of a pain to deal with configuration that way though.

i'm not talking about the per directory stuff, these are mostly non php.ini 
settings.
things like PEAR_INSTALLDIR, PHP_BINDIR etc should be stored in the 
registry IMO.

daniel

/*--
Daniel Beulshausen - [EMAIL PROTECTED]
Using PHP on Windows? http://www.php4win.com


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




Re: [PHP-DEV] config.w32.h...registry configuration

2002-05-01 Thread Shane Caraveo

Daniel Beulshausen wrote:
 At 11:19 01.05.2002 -0700, Shane Caraveo wrote:
 
 
  they should be changed to use the windows registry anyway...

   Feel free to do it :)


 this isn't going to be a big task, i'll put it onto my todo.


 It's already done, been there for a long time.  php.ini values are 
 configurable via registry, and can be done on a per-domain basis.  It 
 is kind of a pain to deal with configuration that way though.
 
 
 i'm not talking about the per directory stuff, these are mostly non 
 php.ini settings.
 things like PEAR_INSTALLDIR, PHP_BINDIR etc should be stored in the 
 registry IMO.
 
 daniel

Well, the specific example I saw was the extension dir, which is an ini 
setting.  I would argue that pear_installdir could also be an ini 
setting.  bindir does need some solution outside the ini file, maybe, 
but I think there could be some way to work around that.  The reason I 
am *kind of* arguing against using the registry for these is due to 
having multiple installations of PHP.  I currently have 6, 5 installs 
and my compiled version, so that I can test things.  Dealing with 
php.ini in that situation is bad enough, adding registry configuration 
on top of that will make it even a bigger pain.
Shane


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




RE: [PHP-DEV] config.w32.h

2002-05-01 Thread Preston L. Bannister

From: Daniel Beulshausen [mailto:[EMAIL PROTECTED]]

 At 18:35 01.05.2002 +0200, Sebastian Bergmann wrote:
 Daniel Beulshausen wrote:
   do you mean constants like PHP_EXTENSION_DIR?
 
For instance, yes.
 
   they should be changed to use the windows registry anyway...
 
Feel free to do it :)

 this isn't going to be a big task, i'll put it onto my todo.

From: Sebastian Bergmann [mailto:[EMAIL PROTECTED]]

 Preston L. Bannister wrote:
  Instead I'd suggest that the settings stay in php.ini, but that PHP
  look for php.ini first local to the installation of php.exe.

   The settings we're talking about are not in php.ini.


Perhaps I misunderstood.

Are we talking about (for example) changing this value?

main\main.c(270):
STD_PHP_INI_ENTRY(extension_dir, PHP_EXTENSION_DIR, PHP_INI_SYSTEM, 
OnUpdateStringUnempty, extension_dir, php_core_globals,
core_globals)


Or these?

main\main.c(1000):
REGISTER_MAIN_STRINGL_CONSTANT(PEAR_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_STRINGL_CONSTANT(PHP_EXTENSION_DIR, PHP_EXTENSION_DIR, 
sizeof(PHP_EXTENSION_DIR)-1, CONST_PERSISTENT | CONST_CS);




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




Re: [PHP-DEV] $_USER -- just a thought

2002-05-01 Thread Steve Meyers

Try get_defined_vars()

Hank Marquardt wrote:

 Allow me to elaborate --
 
 I basically am looking for whatever is *not* in the existing $_ arrays.
 The application is to save state in a 'crash and burn' function as much
 as possible about the crash event ... I'm serializing it all and writing
 to a file (or email or db ) I've already got all the $_ stuff, I'm
 looking for the incidentals ... the loop counters, the current state of
 bind variables, ... all the user stuff that isn't in $_SESSION -- right
 now as far as I can tell that is just in $GLOBALS ... the stuff at the
 very end if you iterate it. ... just seemed like that should be $_USER
 to me; so I asked:)
 
 On Wed, May 01, 2002 at 06:42:17PM +0200, [EMAIL PROTECTED] wrote:
 On Wed, 1 May 2002, Hank Marquardt wrote:
 
  I've been having difficulty with $GLOBALS in a fashion similar to that
  reported in bug #16065 -- I'm using debian-unstable packages of 4.1.2,
  maybe it'll go away with the 4.2 packages, but I digress 
  
  What I'm trying to do is save state of the user's variables at a given
  point in time and as far as I can tell that's only in the $GLOBALS
  array today ... everything else is clean to save, the
  $_GET|POST|SESSION|COOKIE... stuff, but the user's stuff is a problem.
  
  So it got me wondering/thinking that it might be nice to have a $_USER
  array available that has this stuff ...
  
  Any chance it already exists, or might be made available?
 
 $_REQUEST is a combination of $_GET, $_POST and $_COOKIE.
 
 Derick
 
 ---
  Did I help you? Consider a gift:
   http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
 ---
   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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] config.w32.h...registry configuration

2002-05-01 Thread Daniel Beulshausen

At 11:41 01.05.2002 -0700, Shane Caraveo wrote:
Daniel Beulshausen wrote:
At 11:19 01.05.2002 -0700, Shane Caraveo wrote:

  they should be changed to use the windows registry anyway...

   Feel free to do it :)


this isn't going to be a big task, i'll put it onto my todo.


It's already done, been there for a long time.  php.ini values are 
configurable via registry, and can be done on a per-domain basis.  It is 
kind of a pain to deal with configuration that way though.

i'm not talking about the per directory stuff, these are mostly non 
php.ini settings.
things like PEAR_INSTALLDIR, PHP_BINDIR etc should be stored in the 
registry IMO.
daniel

Well, the specific example I saw was the extension dir, which is an ini 
setting.  I would argue that pear_installdir could also be an ini 
setting.  bindir does need some solution outside the ini file, maybe, but 
I think there could be some way to work around that.  The reason I am 
*kind of* arguing against using the registry for these is due to having 
multiple installations of PHP.  I currently have 6, 5 installs and my 
compiled version, so that I can test things.  Dealing with php.ini in that 
situation is bad enough, adding registry configuration on top of that will 
make it even a bigger pain.

one could use the version string as a subkey, this would enable you to use 
different php.inis for different versions.

daniel

/*--
Daniel Beulshausen - [EMAIL PROTECTED]
Using PHP on Windows? http://www.php4win.com


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




RE: [PHP-DEV] config.w32.h

2002-05-01 Thread Andi Gutmans

I also prefer configuration files over registry.

Andi

At 11:04 01/05/2002 -0700, Preston L. Bannister wrote:
From: Daniel Beulshausen [mailto:[EMAIL PROTECTED]]
 
  At 18:35 01.05.2002 +0200, Sebastian Bergmann wrote:
  Daniel Beulshausen wrote:
do you mean constants like PHP_EXTENSION_DIR?
  
 For instance, yes.
  
they should be changed to use the windows registry anyway...
  
 Feel free to do it :)
 
  this isn't going to be a big task, i'll put it onto my todo.


I'd rather strongly suggest this value not be in the registry.

What happens in the case were two different applications are installed
on the same machine, and both use PHP - but different versions and with
different libraries?  You really don't want machine-global settings.

This isn't a theoretical question! :)

We will be using PHP in our application and need to be certain that
any changes the customer makes to there global use of PHP does not
crater out application.  We can get this assurance by using a local
copy of PHP in our application, with a local php.ini file.

Instead I'd suggest that the settings stay in php.ini, but that PHP
look for php.ini first local to the installation of php.exe.

I posted a (tested!) patch a few days back to do exactly this.

--
Preston L. Bannister
http://members.cox.net/preston.bannister/
pbannister on Yahoo Messenger

--
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] config.w32.h...registry configuration

2002-05-01 Thread Shane Caraveo

Daniel Beulshausen wrote:
 At 11:41 01.05.2002 -0700, Shane Caraveo wrote:
 
 Daniel Beulshausen wrote:

 At 11:19 01.05.2002 -0700, Shane Caraveo wrote:

  they should be changed to use the windows registry anyway...

   Feel free to do it :)



 this isn't going to be a big task, i'll put it onto my todo.



 It's already done, been there for a long time.  php.ini values are 
 configurable via registry, and can be done on a per-domain basis.  
 It is kind of a pain to deal with configuration that way though.


 i'm not talking about the per directory stuff, these are mostly non 
 php.ini settings.
 things like PEAR_INSTALLDIR, PHP_BINDIR etc should be stored in the 
 registry IMO.
 daniel


 Well, the specific example I saw was the extension dir, which is an 
 ini setting.  I would argue that pear_installdir could also be an ini 
 setting.  bindir does need some solution outside the ini file, maybe, 
 but I think there could be some way to work around that.  The reason I 
 am *kind of* arguing against using the registry for these is due to 
 having multiple installations of PHP.  I currently have 6, 5 installs 
 and my compiled version, so that I can test things.  Dealing with 
 php.ini in that situation is bad enough, adding registry configuration 
 on top of that will make it even a bigger pain.
 
 
 one could use the version string as a subkey, this would enable you to 
 use different php.inis for different versions.
 
 daniel

That would only solve that particular situation, what about multiple 
installations of the same version, or seperate configurations for the 
same installation?  This is the reason I start to dislike the ini file 
all together.

Shane







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




Re: [PHP-DEV] config.w32.h...registry configuration

2002-05-01 Thread Zeev Suraski

At 23:11 01/05/2002, Shane Caraveo wrote:
That would only solve that particular situation, what about multiple 
installations of the same version, or seperate configurations for the same 
installation?

We can have PHP look for php.ini in the directory where php.exe is 
located.  This would allow you to easily configure different INI settings 
for different versions.
That's kind of what I wanted to do years ago, but ended up making it look 
for php.ini in the CWD, which is not all that helpful.

Zeev


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




Re: [PHP-DEV] Re: Xdebug extension availability

2002-05-01 Thread php4

Addressed to: [EMAIL PROTECTED]
  PHP Developers Mailing List [EMAIL PROTECTED]

** Reply to note from [EMAIL PROTECTED] Wed, 1 May 2002 16:50:37 +0200 (CEST)
   
 On Wed, 1 May 2002, Yasuo Ohgaki wrote:
   
  Nice extension. I was thinking to make a similar one.
  
  Can you put it into PECL?
   
 I can, but I don't want it yet. I want to wait until the extension 
 stabilized some more, and PECL is more ready.

Please, Please, Please when this is ready put it in ext/.  I've wanted
this for a long time, and I've seen enough requests from others to know
I'm not the only one.  Having a stack trace available will be a great
help in debugging!


Thanks,

Rick

Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

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




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

2002-05-01 Thread Markus Fischer

Hi,

I've documented the major functions now for ext/sockets, but
there's still a bunch to do. I'm not going to do more
documentation on sockets anytime soon as my spare time is
too limited. Feel free to enhance the existing documentation
and/or add the new ones.

- Markus

ps: btw, I didn't paid much attention to what the API was 
4.3 as this extension is still marked experimental so it's
simply not necessary and I suggest going for CVS HEAD too so
we have a stable sockets with 4.3 and the documentation too.

On Fri, Apr 19, 2002 at 07:52:05PM +1000, Peter wrote : 
 Hello Marcus,
 PHP functions regularly change from the old system of returning a negative value to 
using false. The PHP 
 documentation for sockets show all the sockets functions using a negative number. In 
4.1.12 there are at least two 
 functions changed to return false for an error. I could update those pages now as I 
worked on sockets with 4.1.2 today.
 
 I might test the same code with RC4 on Sunday. Either way, some pages would be 
updated and gain examples.
 
 Peter
 
 
 4/19/02 4:25:40 PM, Markus Fischer [EMAIL PROTECTED] wrote:
 
 On Fri, Apr 19, 2002 at 05:43:13AM -, Peter Moulding wrote : 
  The documentation seems to be behind 4.1.2 and lacking a few
  examples I could provide. If you want help updating the
  documentation and expanding the examples, I can contribute the
  odd hour some weeks. I have several pages of updates to
  contribute for sockets based on PHP 4.1.2.
 
 Based on 4.1.2 ? Updating the docs then would not be a good
 idea. They changed quite a lot since 4.1.2 and some
 parameters/return values in current CVS HEAD are already
 different (the joy of development ...)
 
 [sorry if I maybe missunderstood the sockets thing
 completely].
 
 Er, anyway, contributors are always welcome ;-)
 
 - Markus
 
 -- 
 Please always Cc to me when replying to me on the lists.
 GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 Mind if I MFH ? What QA did you do on it? the usual? ah... none :)
 
 
 
 
 
 -- 
 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
Mind if I MFH ? What QA did you do on it? the usual? ah... none :)

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




[PHP-DEV] Xdebug extension availability

2002-05-01 Thread Derick Rethans

Hello,

I'm happy to announce the availability of the xdebug extension. This 
extension modifies the php error handler to show stack traces. With this 
you can exactly see how the current function was called, even the 
parameters show up (if they are constants). I'm still working on variable 
parameters. 

Besides the stack traces the extension also provides the following 
functions:

array xdebug_get_function_stack()
- Returns an array which resembles a stack tracestring 

xdebug_call_function()
- The name of the caller function

string xdebug_call_file()
- The file in which the caller function was run

int xdebug_call_line()
- The line in the caller file from which the current function was started

See the website @ http://www.jdimedia.nl/derick/xdebug.php for more 
information and the download location.


regards,
Derick

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  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]Memory leaking when calling an overloaded class member

2002-05-01 Thread brad lafountain

I get this error:

f:\php-4.2.0\zend\zend_execute.c(1503) :  Freeing 0x00DDD278 (11 bytes),
script=test2.php
f:\php-4.2.0\zend\zend_variables.c(106) : Actual location (location was
relayed)
Last leak repeated 1 time

i took alook at the code..

here is where it creates the memory
tmp = *function_name;
zval_copy_ctor(tmp);


here shoud be the delete..
zval_dtor(tmp);
EX(fbc) = function;
overloaded_function_call_cont:
FREE_OP(EX(Ts), EX(opline)-op2, EG(free_op2));

but as you see the goto overloaded_function_call_cont; 
skips the free.

Patch is supplied

_brad_



__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--- zend_execute_cvs.c  Wed May  1 19:22:11 2002
+++ zend_execute.c  Wed May  1 19:22:53 2002
 -1563,9 +1563,9 
if (zend_hash_find(active_function_table, 
function_name-value.str.val, function_name-value.str.len+1, (void **) 
function)==FAILURE) {
zend_error(E_ERROR, Call to undefined 
function:  %s(), function_name-value.str.val);
}
-   zval_dtor(tmp);
EX(fbc) = function;
 overloaded_function_call_cont:
+   zval_dtor(tmp);
FREE_OP(EX(Ts), EX(opline)-op2, 
EG(free_op2));
}
NEXT_OPCODE();



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


Re: [PHP-DEV] [PATCH]Memory leaking when calling an overloaded class member

2002-05-01 Thread brad lafountain

Ignore the patch
I really should compile and test the patch before i submit it..

It sill is a leak tho.. Ill repatch... Ill also test it this time :)

- brad
--- brad lafountain [EMAIL PROTECTED] wrote:
 I get this error:
 
 f:\php-4.2.0\zend\zend_execute.c(1503) :  Freeing 0x00DDD278 (11 bytes),
 script=test2.php
 f:\php-4.2.0\zend\zend_variables.c(106) : Actual location (location was
 relayed)
 Last leak repeated 1 time
 
 i took alook at the code..
 
 here is where it creates the memory
 tmp = *function_name;
 zval_copy_ctor(tmp);
 
 
 here shoud be the delete..
 zval_dtor(tmp);
 EX(fbc) = function;
 overloaded_function_call_cont:
 FREE_OP(EX(Ts), EX(opline)-op2, EG(free_op2));
 
 but as you see the goto overloaded_function_call_cont; 
 skips the free.
 
 Patch is supplied
 
 _brad_
 
 
 
 __
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness
 http://health.yahoo.com --- zend_execute_cvs.c   Wed May  1 19:22:11 2002
 +++ zend_execute.cWed May  1 19:22:53 2002
 @@ -1563,9 +1563,9 @@
   if (zend_hash_find(active_function_table, 
function_name-value.str.val,
 function_name-value.str.len+1, (void **) function)==FAILURE) {
   zend_error(E_ERROR, Call to undefined 
function:  %s(),
 function_name-value.str.val);
   }
 - zval_dtor(tmp);
   EX(fbc) = function;
  overloaded_function_call_cont:
 + zval_dtor(tmp);
   FREE_OP(EX(Ts), EX(opline)-op2, 
EG(free_op2));
   }
   NEXT_OPCODE();
 
  -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php


__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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




Re: [PHP-DEV] [PATCH]Memory leaking when calling an overloaded class member

2002-05-01 Thread brad lafountain

Ya know.. i might just give up here...

Ignore this.. i realized that my handler should free this memory..

 - Brad

i hate people like me!

--- brad lafountain [EMAIL PROTECTED] wrote:
 Ignore the patch
 I really should compile and test the patch before i submit it..
 
 It sill is a leak tho.. Ill repatch... Ill also test it this time :)
 
 - brad
 --- brad lafountain [EMAIL PROTECTED] wrote:
  I get this error:
  
  f:\php-4.2.0\zend\zend_execute.c(1503) :  Freeing 0x00DDD278 (11 bytes),
  script=test2.php
  f:\php-4.2.0\zend\zend_variables.c(106) : Actual location (location was
  relayed)
  Last leak repeated 1 time
  
  i took alook at the code..
  
  here is where it creates the memory
  tmp = *function_name;
  zval_copy_ctor(tmp);
  
  
  here shoud be the delete..
  zval_dtor(tmp);
  EX(fbc) = function;
  overloaded_function_call_cont:
  FREE_OP(EX(Ts), EX(opline)-op2, EG(free_op2));
  
  but as you see the goto overloaded_function_call_cont; 
  skips the free.
  
  Patch is supplied
  
  _brad_
  
  
  
  __
  Do You Yahoo!?
  Yahoo! Health - your guide to health and wellness
  http://health.yahoo.com --- zend_execute_cvs.c Wed May  1 19:22:11 2002
  +++ zend_execute.c  Wed May  1 19:22:53 2002
  @@ -1563,9 +1563,9 @@
  if (zend_hash_find(active_function_table,
 function_name-value.str.val,
  function_name-value.str.len+1, (void **) function)==FAILURE) {
  zend_error(E_ERROR, Call to undefined 
function:  %s(),
  function_name-value.str.val);
  }
  -   zval_dtor(tmp);
  EX(fbc) = function;
   overloaded_function_call_cont:
  +   zval_dtor(tmp);
  FREE_OP(EX(Ts), EX(opline)-op2, 
EG(free_op2));
  }
  NEXT_OPCODE();
  
   -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 __
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness
 http://health.yahoo.com


__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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




[PHP-DEV] Re: new patch to session.c some new API

2002-05-01 Thread Yasuo Ohgaki

Thies C. Arntzen wrote:
 so the guts of this patch is to make the URL-Rewriter
 usable by more than just the session-module! (which i really
 need)

This sounds cool to me, too.
C API would be very useful for my private extension.

--
Yasuo Ohgaki


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




[PHP-DEV] feature proposal: string types (complete with a patch)

2002-05-01 Thread vdhome

Dear PHP developers,

I propose a feature that I call string types. I have also already
coded a first version of it that you can try. There's a bug for it
here: http://bugs.php.net/?id=16480 and a homepage with a description
and a patch here: http://nebuchadnezzar.zion.cz/php_strings.php
Please be patient when downloading. The server is behind a 64k line.
:-(

About the feature: It introduces five types of strings: plain string,
SQL string, HTML string, URL (query) string and undefined (unknown
type) string. The difference is in escaping characters that have
special meaning in SQL (quotes, nul), HTML (ampersand, less-than,
greater-than, double-quote) and URL (nearly everything except plain
letters and digits). The conversion is done automatically when
requested. This language extension is fully backwards-compatible;
users who don't know about the new features (or don't want to know)
need not worry: their existing scripts should work the same without
any change. For users who do know about this and want to use it, I
believe this new feature should bring significant improvement of code
readability, reduction of code size and reduced probability of bugs.

I think that the best explanation is by example, so see this:

$data = pa string with 'apostrophes', \double-quotes\ etc.;
mysql_query(sINSERT INTO table VALUES ('$data'));

Because we include a plain string in an SQL string, the plain string
is automatically converted to an SQL string, i.e. AddSlashes is
applied to it. Strings from GET/POST/COOKIE have the right type,
which makes it possible to easily write scripts that do not depend on
the setting of magic_quotes_gpc. (An SQL string included in another
SQL string is not converted, of course.)

Another one:

$data = pa string with less-than, greater-than, ampersand;
echo hINPUT TYPE=HIDDEN NAME=parameter VALUE=\$data\;

Here, the $data string is automatically HtmlSpecialChars'ed when
included in a HTML string.

Read more about it on the above mentioned homepage. Try it, test it,
tell me what you think about it! Just remember that this is alpha
code, and it is very little tested. I make no guarantees whatsoever,
except that it has bugs. :-)

Please cc me in any replies. I am not subscribed to the list (so in
fact, I don't know if it will allow me to post this). I realize that
this is not a good practice, but I couldn't handle the loads of mail -
 and according to http://www.php.net/mailing-lists.php this list
isn't available in digest form. :-(

Thanks for your attention.

Vaclav Dvorak  ([EMAIL PROTECTED])
http://nebuchadnezzar.zion.cz/

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




Re: [PHP-DEV] Xdebug extension availability

2002-05-01 Thread php4

Addressed to: Derick Rethans [EMAIL PROTECTED]
  PHP Developers Mailing List [EMAIL PROTECTED]

** Reply to note from Derick Rethans [EMAIL PROTECTED] Wed, 1 May 2002 16:20:52 
+0200 (CEST)
   
 Hello,
   
 I'm happy to announce the availability of the xdebug extension. This 
 extension modifies the php error handler to show stack traces. With
 this  you can exactly see how the current function was called, even the
  parameters show up (if they are constants). I'm still working on
 variable  parameters. 

Does this require 4.2.0 or something?  I just tried to apply this to
4.1.2 and I get:

/configure enable-xdebug

..
..
..

checking whether to enable eXtended debugging support... yes, shared
/configure: line 902 syntax error near unexpected token
'PHP_NEW_EXTENSION(xdebug,'
/configure: line 902 '  PHP_NEW_EXTENSION(xdebug, xdebug.c srm_list.c,
$ext_shared)'

I also tried to use this module static by adding the cdebug directory in
php4/ext/, running ./buildconf then ./configure.  I get the same errors
on a different line of configure.

(I prefer an all static build for my servers.)


Thanks,
Rick


Who still hopes to see this a standard part of PHP as soon as possible!



Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

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




Re: [PHP-DEV] Xdebug extension availability

2002-05-01 Thread php4

Addressed to: Derick Rethans [EMAIL PROTECTED]
  PHP Developers Mailing List [EMAIL PROTECTED]

** Reply to note from Derick Rethans [EMAIL PROTECTED] Wed, 1 May 2002 16:20:52 
+0200 (CEST)

I just looked at the message I just sent, and in a few places 
I see /configure where I swear I typed ./configure.







Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

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