[PHP-DEV] patch for imagecopyresampled()

2002-09-29 Thread Tim
This patch fixes a problem with imagecopyresampled() when copying an image with a non-constant alpha layer. If nobody objects, I'll commit this. Tim Index: gd.c === RCS file: /repository/php4/ext/gd/libgd/gd.c,v retrieving

Re: [PHP-DEV] php/embed

2002-09-29 Thread derick
On Sun, 29 Sep 2002, Edin Kadribasic wrote: I have just committed initial work on enabling embedding PHP into C/C++ applications. It is mostly complete, but there a few pieces missing, namely the installation part. The modification of the build system adds another target, so in order to

Re: [PHP-DEV] php/embed

2002-09-29 Thread Yasuo Ohgaki
[EMAIL PROTECTED] wrote: On Sun, 29 Sep 2002, Edin Kadribasic wrote: I have just committed initial work on enabling embedding PHP into C/C++ applications. It is mostly complete, but there a few pieces missing, namely the installation part. The modification of the build system adds another

[PHP-DEV] (critical?) object comparison recursion bug

2002-09-29 Thread Wez Furlong
The code below produces: Fatal error: Nesting level too deep - recursive dependency? in test.php on line 24 This is should not happen since the objects being compared are the same object, so there should be no need to recusively compare the objects. Additionally, I think the comparison should

[PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Wez Furlong
Here's a patch for the ZE which shortcuts the recursive comparisions if the object properties hash tables are at the same address (therefore, the objects are the same object). This should save a few cycles for non-recursive objects too. Additionally, when comparing hash tables, this patch

[PHP-DEV] auto_prepend/append: does the PHP engine cache the file in memory?

2002-09-29 Thread Jean-Christian Imbeault
Sorry if this is the wrong place to ask ... but I searched the docs/archives and couldn't find a definite answer so I though I might ask the developers. I did see something about PWEE but it wasn't' clear enough. Does using the auto_prepend config option in the php.ini file cause PHP to

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache thefile in memory?

2002-09-29 Thread derick
On Sun, 29 Sep 2002, Jean-Christian Imbeault wrote: Sorry if this is the wrong place to ask ... but I searched the docs/archives and couldn't find a definite answer so I though I might ask the developers. I did see something about PWEE but it wasn't' clear enough. Does using the

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Jean-Christian Imbeault
[EMAIL PROTECTED] wrote: It would indeed more efficient, but PHP reparses and executes the auto_prepend/auto_append files every time a script is started. Shucks ... I take it that you are familiar enough with the source so that I can take this to be a pretty definitive answer? If so ...

Re: [PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Wez Furlong
That last patch was the wrong file, based on an earlier version :-/ Here is the correct patch, which will raise a warning instead of a fatal error, which at least gives the user the option of suppressing the problem by using error_reporting(). --Wez. Index: Zend/zend_hash.c

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Christoph Grottolo
If so ... maybe you can suggest something to me then? What about setting server variables? You can set them once, they stay in memory and your scripts can read them. Just an idea... Christoph -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit:

Re: [PHP-DEV] php/embed

2002-09-29 Thread Edin Kadribasic
On Sunday 29 September 2002 11:45, [EMAIL PROTECTED] wrote: On Sun, 29 Sep 2002, Edin Kadribasic wrote: I have just committed initial work on enabling embedding PHP into C/C++ applications. It is mostly complete, but there a few pieces missing, namely the installation part. The

Re: [PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Zeev Suraski
Do we really need a new #define there? I think it's quite alright to bail out in that situation as well... The check for the hashtables is fine though :) Zeev At 15:30 29/09/2002, Wez Furlong wrote: that last patch was the wrong file, based on an earlier version :-/ here is the correct patch,

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Pierre-Alain Joye
On Sun, 29 Sep 2002 21:32:04 +0900 Jean-Christian Imbeault [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: It would indeed more efficient, but PHP reparses and executes the auto_prepend/auto_append files every time a script is started. Shucks ... I take it that you are familiar

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Jean-Christian Imbeault
Christoph Grottolo wrote: What about setting server variables? You can set them once, they stay in memory and your scripts can read them. Just an idea... Hum ... very interesting! I have no idea how to set Apache server vars but I'll definitely look into it! Thanks, great tip! Jc --

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Jean-Christian Imbeault
Pierre-Alain Joye wrote: If you need more than configuration stuffs (means constants or variables only without any calculations/tests), using bytecodes caches like zend, phppa, or others bytecodes cache tools. I've looked into zend and it sounds great, just not free. Thanks for mentioning

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Jean-Christian Imbeault
Christoph Grottolo wrote: What about setting server variables? You can set them once, they stay in memory and your scripts can read them. Just an idea... Tried it and it works. Now I just need to find out what the max size on an Apache environment variable. Thanks! Jc -- PHP Development

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Jean-Christian Imbeault
Pierre-Alain Joye wrote: If you need only constants/variable, use php_value in your php.ini/httpd.conf, or set an environment variable. I tried using php_value but it seems that it can only be used (in the Apache httpd.conf file) to set *real* php config variables. I tried: IfModule

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Wez Furlong
On 09/29/02, Jean-Christian Imbeault [EMAIL PROTECTED] wrote: Shucks ... I take it that you are familiar enough with the source so that I can take this to be a pretty definitive answer? Yep. If so ... maybe you can suggest something to me then? I find myself including() the same

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Wez Furlong
BTW: if you keep your various HTML chunks in their own separate files, using readfile() to output them will optimially make use of your OS ability to cache files. In PHP 4.3 (due for release fairly soon), there is also file_get_contents() which uses the same mechanism but returns the contents as

[PHP-DEV] [PATCH] [ZE] More useful error message for class redeclaration [final version]

2002-09-29 Thread Wez Furlong
And here is the final version of my class redeclaration patch. class Foo {} class Foo {} - Fatal error: Cannot redeclare class foo (previously declared in /home/wez/source/php/PHPDEV/wez.declare.class.php:3) in /home/wez/source/php/PHPDEV/wez.declare.class.php on line 5 class Directory {} -

Re: [PHP-DEV] php/embed

2002-09-29 Thread Alan Knowles
Going on a 'semi-consistant' naming structure on unix, would libphp.so.4.3.0 (softlinked to libphp.so) be an idea. this should be really good when working with bcompiler_load_exe() :) Regards Alan Edin Kadribasic wrote: On Sunday 29 September 2002 11:45, [EMAIL PROTECTED] wrote: On Sun,

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Zeev Suraski
At 17:11 29/09/2002, Jean-Christian Imbeault wrote: Pierre-Alain Joye wrote: If you need only constants/variable, use php_value in your php.ini/httpd.conf, or set an environment variable. I tried using php_value but it seems that it can only be used (in the Apache httpd.conf file) to set

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread Rasmus Lerdorf
I tried using php_value but it seems that it can only be used (in the Apache httpd.conf file) to set *real* php config variables. Correct. Why don't you write yourself a little trivial PHP extension that sets stuff in the MINIT hook? With the ext/ext_skel tool it is really very easy to do if

[PHP-DEV] Re: autoconf version

2002-09-29 Thread Sascha Schumann
FYI, autoconf 2.5x contains a cache system which aims at giving back some of the speed the heavy macro usage took away. The cache system does not properly maintain dependencies (e.g. it apparently does not track sinclude() usage) and thus autoconf 2.5x will sometimes use

Re: [PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Wez Furlong
The problem is that it makes it difficult to use recursive objects; consider this code: class A { var $b; function A() { $this-b = new B($this); } } class B { var $a; function B($a) { $this-a = $a; } } $one = new A; $two = new A; $three = $one; if ($one == $three) { echo this

[PHP-DEV] CVS Account Request: coldocean

2002-09-29 Thread Wei-ching Kao
I want to translate the document into traditional chinese -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Sebastian Bergmann
Wez Furlong wrote: I suppose that what I'm really after is an is_same_object test, rather than a is_equal_object or is_identical_object. With the Zend Engine 2 you can use the === operator to check if to variables reference the same object. -- Sebastian Bergmann

[PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Edin Kadribasic
Hi Sascha, Without going into the specifics of my implementation of embeddable phplib at this point, don't you think the author of the implementation should be at least asked for his motivation for doing things in a particular way before you just go ahead and change everything? Edin On

[PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Sascha Schumann
On Sun, 29 Sep 2002, Edin Kadribasic wrote: Hi Sascha, Without going into the specifics of my implementation of embeddable phplib at this point, don't you think the author of the implementation should be at least asked for his motivation for doing things in a particular way before you just

[PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Edin Kadribasic
On Sunday 29 September 2002 21:38, Sascha Schumann wrote: On Sun, 29 Sep 2002, Edin Kadribasic wrote: Hi Sascha, Without going into the specifics of my implementation of embeddable phplib at this point, don't you think the author of the implementation should be at least asked for his

Re: [PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Rasmus Lerdorf
Edin, as far as I can tell from looking at Sascha's changes, he has made it cleaner and more general. Sascha did also write most of the build chain, so in a sense you are the one that went and changed everything on him. -Rasmus On Sun, 29 Sep 2002, Edin Kadribasic wrote: Hi Sascha, Without

Re: [PHP-DEV] [PATCH] [ZE] (critical?) object comparison recursion bug

2002-09-29 Thread Wez Furlong
But I need this functionality with the current ZE :-/ --Wez. On 09/29/02, Sebastian Bergmann [EMAIL PROTECTED] wrote: Wez Furlong wrote: I suppose that what I'm really after is an is_same_object test, rather than a is_equal_object or is_identical_object. With the Zend Engine 2 you can

Re: [PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Edin Kadribasic
On Sunday 29 September 2002 22:13, Rasmus Lerdorf wrote: Edin, as far as I can tell from looking at Sascha's changes, he has made it cleaner and more general. Sascha did also write most of the build chain, so in a sense you are the one that went and changed everything on him. Does this mean

Re: [PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Rasmus Lerdorf
On Sun, 29 Sep 2002, Edin Kadribasic wrote: On Sunday 29 September 2002 22:13, Rasmus Lerdorf wrote: Edin, as far as I can tell from looking at Sascha's changes, he has made it cleaner and more general. Sascha did also write most of the build chain, so in a sense you are the one that

Re: [PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Edin Kadribasic
On Sunday 29 September 2002 22:25, Rasmus Lerdorf wrote: No, but you were annoyed that Sascha didn't ask you before changing your stuff. Did you ask him before changing his? I just think it goes both ways and you stepped on his toes as much as he stepped on yours. Adding another target to

Re: [PHP-DEV] PHP Embedded (phplib)

2002-09-29 Thread Derick Rethans
On Sun, 29 Sep 2002, Rasmus Lerdorf wrote: Edin, as far as I can tell from looking at Sascha's changes, he has made it cleaner and more general. Sascha did also write most of the build chain, so in a sense you are the one that went and changed everything on him. He removed a useful

[PHP-DEV] PHP CVS sometimes give sources instead parsed script

2002-09-29 Thread Holger Schopohl
Hi, with the current cvs version, my webserver results sometimes the source code instead of the parsed script. Is a knows problem ? I'm using glibc 2.1.3 gcc 2.95 and this configure parameter: CFLAGS=-O3 -mcpu=i686 -march=i686 -fomit-frame-pointer nice -n 18 ./configure --enable-memory-limit

Re: [PHP-DEV] PHP CVS sometimes give sources instead parsed script

2002-09-29 Thread Derick Rethans
Hi, can you do the test that's in the last comment in bug 19324 (http://bugs.php.net/?id=19324). regards, Derick On Sun, 29 Sep 2002, Holger Schopohl wrote: Hi, with the current cvs version, my webserver results sometimes the source code instead of the parsed script. Is a knows

[PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Sascha Schumann
But sometimes they add desired functionality. Like building CLI at the same time as another SAPI module. This hack has worked quite well for the past half a year or so and it is generaly considered very stable. At least I have not heard that there were problems with it. The CLI build is

[PHP-DEV] Trimming Cc lines (don't)

2002-09-29 Thread Sascha Schumann
If you are discussing something with me, don't remove my address from the Cc line, or I won't see your email. I'm not subscribed to any PHP mailing list at this time and only occasionally browse news.php.net. - Sascha -- PHP Development Mailing List http://www.php.net/ To

[PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Edin Kadribasic
On Sunday 29 September 2002 23:14, Sascha Schumann wrote: [snip] Well, the install target did not work, because you made no visible effort to integrate your SAPI module with the rest of PHP. Yes I made no effort to integrate SAPI into the make install chain as I was not quite

[PHP-DEV] emalloc v. malloc

2002-09-29 Thread Jon Parise
Could someone please describe the differences between malloc() and emalloc()? I'd like to know when I should be using one instead of the other. I don't see this topic mentioned in the coding standards, and they appear to be used interchangeably (although not mixed) throughout the current code.

Re: [PHP-DEV] emalloc v. malloc

2002-09-29 Thread Rasmus Lerdorf
This is one of those Use the source, Luke questions. malloc() is the normal system malloc() and emalloc() is a #define which points to _emalloc() which is the internal safety net version. When you get memory from emalloc(), even if you forget to free it, you won't leak because it will be

[PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Sascha Schumann
Ok, my notes include now: - PHP_SELECT_SAPI will be extended to also cover ZTS PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, zts]]]) zts is either empty -- works with non-ZTS only (common case) or 1 - ZTS only or 2 - works with both (e.g. CGI, embed)

Re: [PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Jon Parise
On Mon, Sep 30, 2002 at 02:38:18AM +0200, Sascha Schumann wrote: - The meaning of PHP_NEW_EXTENSION's sapi_class parameter will be extended to allow a *list* of SAPI module names with which the extension can be compiled. And the absence of this list parameter will infer all

Re: [PHP-DEV] Re: PHP Embedded (phplib)

2002-09-29 Thread Sascha Schumann
On Sun, 29 Sep 2002, Jon Parise wrote: On Mon, Sep 30, 2002 at 02:38:18AM +0200, Sascha Schumann wrote: - The meaning of PHP_NEW_EXTENSION's sapi_class parameter will be extended to allow a *list* of SAPI module names with which the extension can be compiled. And the

Re: [PHP-DEV] auto_prepend/append: does the PHP engine cache the

2002-09-29 Thread George Schlossnagle
Just as a note about all this: if you have a deep 'standard' include tree (same 30-40 files), there is a decent amount of overhead just from parsing all the include files, even with inexpensive code. Your OS should do a reasonable job (or a really good job if it's Unix based) at caching