[PHP-DEV] problem with session id's

2002-12-03 Thread vsv3
Hi to all. 

When i start some sessions with PHP4.1.2, in the same PC sometimes 
the browser, get confused with the sessions and the las who has been 
connected, get the information of the first one.

Can anyone explain me because occurs this??

Thx.

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




RE: [PHP-DEV] pecl extensions

2002-12-03 Thread John Coggeshall

Brad:

I'm going to take a real stab in the dark here and say that you know
Shane Caraveo. I was at PHPCon with him presenting in October and I was
talking about an idea I had to implement opengl in PHP... He said that
someone by the name of Brad (at least, that's what I recall) was working
on a extension and I should get in touch with him... Well, needless to
say I forgot until just now...

What is the status of this extension? Is it experimental, stable, etc?
Just curious...

John


-Original Message-
From: Brad LaFountain [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 8:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] pecl extensions


I know I'm going to piss people off by asking this but how do 
I create a new pecl package? I think I want going to put 
php_opengl in there. See if gets anymore use.

 - Brad

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
http://mailplus.yahoo.com

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



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




Re: [PHP-DEV] [PATCH] +3 for Win32 CoInitalize/CoUninitialize CallMove, Please Apply

2002-12-03 Thread Derick Rethans
On Fri, 29 Nov 2002, Michael Sisolak wrote:

 We got +3 on applying this but missed it for 4.3.0 RC2.  Will someone
 with the correct karma please apply it to the 4.3.0 tree?

This one is applied.

Derick

 --- Michael Sisolak [EMAIL PROTECTED] wrote:
  Date: Mon, 25 Nov 2002 10:32:13 -0800 (PST)
  From: Michael Sisolak [EMAIL PROTECTED]
  Subject: [PATCH 4.3.0] Win32 CoInitalize/CoUninitialize Call Move
  To: [EMAIL PROTECTED]
  
  While stess testing the recent threading fixes under the ISAPI module
  I
  was seeing a lot of instability in IIS after the testing finished. 
  While the PHP pages would continue to load, no ASP pages would
  anymore.
   I have tracked this down to the placement of the Win32
  CoInitialize()
  and CoUninitialize() calls.  In the current 4.3.0 release candidate
  CoInitialize() and CoUninitialize() are only called once per thread
  (from the basic_globals_ctor/_dtor in basic_functions.c).  According
  to
  Microsoft, however, at
 
 http://msdn.microsoft.com/library/en-us/iisref/html/psdk/asp/devs0hm5.asp:
  
  COM initialization, from CoInitialize or CoInitializeEx, affects the
  thread in which it's called. For this reason, you cannot initialize
  COM
  unless you uninitialize it before returning from your callback
  function. [ . . .] CoInitialize and CoUninitialize need to be called
  in
  order. If one is called twice in a row, by different ISAPIs on the
  same
  thread, your users may see error 270.
  
  This is exactly the error I am seeing: if I load an ASP page in a
  thread that has processed PHP pages I get the 270 error (reported as
  Error -2147417842 (0x8001010e)).  I moved the CoInitilize call to
  PHP_RINIT_FUNCTION(basic) and CoUninitialize to
  PHP_RSHUTDOWN_FUNCTION(basic) and reran my stress testing.  After
  100,000 PHP page loads IIS now remains stable and able to process
  both
  ASP and PHP pages.
  
  I ran this by Zeev and he suggested that some kind of just-in-time
  COM
  initialization, but I'm not going to have the time to get to this
  full
  solution until later.  In the meantime for 4.3.0 I request that the
  attached patch is applied that moves the CoInitialize or
  CoInitializeEx
  calls to be per-request.  This is the last little fix that all the
  multi-threading bug fixing to make the ISAPI rock solid in 4.3.0
  requires.  I've done a lot of testing and feel very confident about
  including this patch.
  
  Michael Sisolak
  [EMAIL PROTECTED]
 
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


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




[PHP-DEV] overridden php.ini directives in CLI version

2002-12-03 Thread Brad Bulger

shouldn't 'output_buffering' be overridden to 0 (off) in the CLI SAPI?
doesn't help to override 'implicit_flush' but not that one. especially
since there's no way to turn off the ini-level output buffering from
a script.  you can't end it with ob_end_*() and you can't set it with
ini_set(). whereas anyone who wants output buffering in a script
can always turn it on themselves.

i know it defaults to off in php.ini-dist, but don't underestimate the
appeal of the word 'recommended'...

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




[PHP-DEV] Bug or Not?

2002-12-03 Thread Adam Voigt




I have some data that can't contain certain character's, so I have

something akin to the following:



function getProper($string)

{

	$string = strip_tags($string);

	$string = str_replace(][,#93;#91;,$string);

	$string = str_replace(',#39;,$string);

	$string = str_replace(\,#34;,$string);



	return($string);

}



Now, I have page which submit's to page2.php, on page2.php I have a

foreach loop on the $_POST array, for each iteration it prints the hidden

input in HTML, but before that it passes each value through the above function.

Now, when I view source everything is as expected, I see #39; instead of

a single quote and everything, when I hit submit, and am now on page3.php,

I do: print_r($_POST) and all the values have been re-interpreted into there

original values (so instead of #39, I see a single quote (in view-source to)) and

my DB queriy is failing because of this, I can get around this by moving my replace

step to the page with the DB query, but I was wondering is this a bug or expected

behavior? Maybe it's just me, but if PHP is doing this, I wouldn't think it should be

interpreting the values you pass back and forth at all, just pass them.



Thanks.





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DEV] RFC: error_codes

2002-12-03 Thread Marcus Börger
After main discussion about this seems over here is a proposal for error codes.
When the solution is accepted by the majority i will commit it and write 
something
together in CODING_STANDARDS. Maybe i can receive some notes on that, too.

marcus

Here is an example output (error_code=EXIF-006):
[marcus@zaphod php4-HEAD]$ sapi/cli/php -d exif.encode_unicode=vx
Unknown(0) : Warning - Unknown(): EXIF-006 Illegal encoding ignored: 'vx'

Here is the patch:

cvs -z3 -q diff main.c php.h (in directory S:\php4-HEAD\main\)
Index: main.c
===
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.518
diff -u -r1.518 main.c
--- main.c  21 Nov 2002 14:56:06 -  1.518
+++ main.c  3 Dec 2002 15:34:46 -
@@ -385,18 +385,33 @@
 /* }}} */

 /* {{{ php_verror */
-/* php_verror is called from php_error_docrefn functions.
+/* php_verror is called from php_error_docrefn functions and
+ * calls itself php_verror_ex with NO error_code.
+ */
+PHPAPI void php_verror(const char *docref, const char *params, int type, 
const char *format, va_list args TSRMLS_DC)
+{
+   php_verror_ex(NULL, docref, params, type, format, args TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ php_verror_ex */
+/* php_verror_ex is called from php_error_docrefn and php_error_exn 
functions.
  * Its purpose is to unify error messages and automatically generate 
clickable
  * html error messages if correcponding ini setting (html_errors) is 
activated.
  * See: CODING_STANDARDS for details.
  */
-PHPAPI void php_verror(const char *docref, const char *params, int type, 
const char *format, va_list args TSRMLS_DC)
+PHPAPI void php_verror_ex(const char *error_code, const char *docref, 
const char *params, int type, const char *format, va_list args TSRMLS_DC)
 {
char *buffer = NULL, *docref_buf = NULL, *ref = NULL, *target = NULL;
char *docref_target = , *docref_root = ;
char *function, *p;
+   char *error_code_separator1 = error_code ?  : ;
+   char *error_code_separator2 = error_code ?   : ;
int buffer_len = 0;
-
+
+   if (!error_code) {
+   error_code = ;
+   }
buffer_len = vspprintf(buffer, 0, format, args);
if (buffer) {
if (docref  docref[0] == '#') {
@@ -442,9 +457,9 @@
}
}
if (PG(html_errors)) {
-   php_error(type, %s(%s) [a 
href='%s%s%s'%s/a]: %s, get_active_function_name(TSRMLS_C), params, 
docref_root, docref, docref_target, docref, buffer);
+   php_error(type, %s(%s) [a 
href='%s%s%s'%s/a]: %s%s%s%s, get_active_function_name(TSRMLS_C), 
params, docref_root, docref, docref_target, docref, error_code_separator1, 
error_code, error_code_separator2, buffer);
} else {
-   php_error(type, %s(%s) [%s%s%s]: %s, 
get_active_function_name(TSRMLS_C), params, docref_root, docref, 
docref_target, buffer);
+   php_error(type, %s(%s) [%s%s%s]: 
%s%s%s%s, get_active_function_name(TSRMLS_C), params, docref_root, docref, 
docref_target, error_code_separator1, error_code, error_code_separator2, 
buffer);
}
if (target) {
efree(target);
@@ -453,7 +468,7 @@
docref = get_active_function_name(TSRMLS_C);
if (!docref)
docref = Unknown;
-   php_error(type, %s(%s): %s, docref, params, buffer);
+   php_error(type, %s(%s): %s%s%s%s, docref, params, 
error_code_separator1, error_code, error_code_separator2, buffer);
}

if (PG(track_errors)  EG(active_symbol_table)) {
@@ -475,6 +490,18 @@
 }
 /* }}} */

+/* {{{ php_error_ex */
+/* See: CODING_STANDARDS for details. */
+PHPAPI void php_error_ex(const char *error_code, const char *docref 
TSRMLS_DC, int type, const char *format, ...)
+{
+   va_list args;
+
+   va_start(args, format);
+   php_verror_ex(error_code, docref, , type, format, args TSRMLS_CC);
+   va_end(args);
+}
+/* }}} */
+
 /* {{{ php_error_docref */
 /* See: CODING_STANDARDS for details. */
 PHPAPI void php_error_docref(const char *docref TSRMLS_DC, int type, 
const char *format, ...)
@@ -487,6 +514,18 @@
 }
 /* }}} */

+/* {{{ php_error_ex1 */
+/* See: CODING_STANDARDS for details. */
+PHPAPI void php_error_ex1(const char *error_code, const char *docref 
TSRMLS_DC, const char *param1, int type, const char *format, ...)
+{
+   va_list args;
+
+   va_start(args, format);
+   php_verror_ex(error_code, docref, param1, type, format, args 
TSRMLS_CC);
+   va_end(args);
+}
+/* }}} */
+
 /* {{{ php_error_docref1 */
 /* See: CODING_STANDARDS for details. */
 PHPAPI void php_error_docref1(const char *docref TSRMLS_DC, const char 

[PHP-DEV] Re: Multiple MSSQL Crashes in 4.3.0RC2

2002-12-03 Thread Michael Sisolak
Frank Kromann has investigated these issues and has made fixes in the
CVS version of ext/mssql.

Michael

--- Michael Sisolak [EMAIL PROTECTED] wrote:
 Testing my existing SQL Server based sites with 4.3.0RC2 resulted in
 many memory access violations and crashes.  I believe that I have
 tracked these down to two different changes made to the MSSQL
 extension
 since 4.2.3:
 
 1) In version 1.82 of php_mssql.c there were 6 mallocs that were
 changed from emalloc(res_length + 1); to emalloc(res_length);.  I
 believe, however, that the code that uses those memory blocks in at
 least four of the cases required that extra space.  This is the code
 as
 it is now for two of the changes in 4.3.0RC2:
 
   res_buf = (unsigned char *) emalloc(res_length);
   bin = ((DBBINARY *)dbdata(mssql_ptr-link, offset));
   memcpy(res_buf, bin, res_length);
   res_buf[res_length] = '\0';
 
 It's the setting of res_buf[res_length] illegal, as that would be
 beyond the bounds of emalloc(res_length)?  Also this code (appearing
 in
 two of the changes):
 
   res_length = 19;
   res_buf = (unsigned char *) emalloc(res_length);
   sprintf(res_buf, %d-%02d-%02d %02d:%02d:%02d ,  . . .
 
 Since the length of the character string is going to be 19
 characters,
 isn't the sprintf going to write an ASCIIZ ending beyond the size of
 res_buf?
 
 Does the way emalloc() works take care of these problems?  Adding the
 + 1 back to these four emalloc() calls stopped one set of crashes.
 
 2) In version 1.83 of php_mssql.c the mssql_query() function was
 altered from:
 
   if ((num_fields = dbnumcols(mssql_ptr-link)) = 0) {
   RETURN_TRUE;
   }
 
 to:
 
   if ((num_fields = dbnumcols(mssql_ptr-link)) = 0 
 !dbdataready(mssql_ptr-link)) {
   RETURN_TRUE;
   }
 
 The CVS comment indicates that this change was for fixing the
 mssql_query to handle multiple results correct if the first result
 does
 not return any data.  If I now call mssql_query() with a query that
 doesn't return any values (like a SQL-T EXEC call), however, PHP will
 crash (removing the new dbdataready() check eliminates the crash).
 
 Michael Sisolak
 [EMAIL PROTECTED]
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP-DEV] Bug or Not?

2002-12-03 Thread Marcus Börger
At 16:34 03.12.2002, Adam Voigt wrote:

I have some data that can't contain certain character's, so I have
something akin to the following:

function getProper($string)
{
$string = strip_tags($string);
$string = str_replace(][,#93;#91;,$string);
$string = str_replace(',#39;,$string);
$string = str_replace(\,#34;,$string);

return($string);
}

Now, I have page which submit's to page2.php, on page2.php I have a
foreach loop on the $_POST array, for each iteration it prints the hidden
input in HTML, but before that it passes each value through the above 
function.
Now, when I view source everything is as expected, I see #39; instead of
a single quote and everything, when I hit submit, and am now on page3.php,
I do: print_r($_POST) and all the values have been re-interpreted into there
original values (so instead of #39, I see a single quote (in view-source 
to)) and
my DB queriy is failing because of this, I can get around this by moving 
my replace
step to the page with the DB query, but I was wondering is this a bug or 
expected
behavior? Maybe it's just me, but if PHP is doing this, I wouldn't think 
it should be
interpreting the values you pass back and forth at all, just pass them.

Thanks.


Your browser interprets the page2.php and replaces the entities #nn; 
with their
charaters. So what page3.php receives are the plain characters and not the 
entities.

Anyway this is for [EMAIL PROTECTED]

marcus


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



Re: [PHP-DEV] Re: Multiple MSSQL Crashes in 4.3.0RC2

2002-12-03 Thread Derick Rethans
On Tue, 3 Dec 2002, Michael Sisolak wrote:

 Frank Kromann has investigated these issues and has made fixes in the
 CVS version of ext/mssql.

Are these fixes merged into the branch?

Derick

 --- Michael Sisolak [EMAIL PROTECTED] wrote:
  Testing my existing SQL Server based sites with 4.3.0RC2 resulted in
  many memory access violations and crashes.  I believe that I have
  tracked these down to two different changes made to the MSSQL
  extension
  since 4.2.3:
  
  1) In version 1.82 of php_mssql.c there were 6 mallocs that were
  changed from emalloc(res_length + 1); to emalloc(res_length);.  I
  believe, however, that the code that uses those memory blocks in at
  least four of the cases required that extra space.  This is the code
  as
  it is now for two of the changes in 4.3.0RC2:
  
  res_buf = (unsigned char *) emalloc(res_length);
  bin = ((DBBINARY *)dbdata(mssql_ptr-link, offset));
  memcpy(res_buf, bin, res_length);
  res_buf[res_length] = '\0';
  
  It's the setting of res_buf[res_length] illegal, as that would be
  beyond the bounds of emalloc(res_length)?  Also this code (appearing
  in
  two of the changes):
  
  res_length = 19;
  res_buf = (unsigned char *) emalloc(res_length);
  sprintf(res_buf, %d-%02d-%02d %02d:%02d:%02d ,  . . .
  
  Since the length of the character string is going to be 19
  characters,
  isn't the sprintf going to write an ASCIIZ ending beyond the size of
  res_buf?
  
  Does the way emalloc() works take care of these problems?  Adding the
  + 1 back to these four emalloc() calls stopped one set of crashes.
  
  2) In version 1.83 of php_mssql.c the mssql_query() function was
  altered from:
  
  if ((num_fields = dbnumcols(mssql_ptr-link)) = 0) {
  RETURN_TRUE;
  }
  
  to:
  
  if ((num_fields = dbnumcols(mssql_ptr-link)) = 0 
  !dbdataready(mssql_ptr-link)) {
  RETURN_TRUE;
  }
  
  The CVS comment indicates that this change was for fixing the
  mssql_query to handle multiple results correct if the first result
  does
  not return any data.  If I now call mssql_query() with a query that
  doesn't return any values (like a SQL-T EXEC call), however, PHP will
  crash (removing the new dbdataready() check eliminates the crash).
  
  Michael Sisolak
  [EMAIL PROTECTED]
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
  http://mailplus.yahoo.com
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


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




Re: [PHP-DEV] Re: Multiple MSSQL Crashes in 4.3.0RC2

2002-12-03 Thread Edin Kadribasic
 On Tue, 3 Dec 2002, Michael Sisolak wrote:

  Frank Kromann has investigated these issues and has made fixes
in the
  CVS version of ext/mssql.

 Are these fixes merged into the branch?

Just did that.

Edin


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




Re: [PHP-DEV] pecl extensions

2002-12-03 Thread Brad LaFountain

--- Alan Knowles [EMAIL PROTECTED] wrote:
 Brad LaFountain wrote:
 
 I know I'm going to piss people off by asking this but how do I create a new
 pecl package? I think I want going to put php_opengl in there. See if gets
 anymore use.
 
 
 upload it to pear/PECL/opengl.. (You should have karma for that already)
 
 you nead a pear account re: the web site for uploading releases.
 http://pear.php.net/?devme=
 and then refresh the page.
 I think you have to apply for an account on the pear page - (If it 
 messes up cause you've already got a CVS account just report it here and 
 somebody will fix it:)
 
 after that just set up a package.xml file as per the other PECL folders 
 and do
 pear package
 then upload the resulting file-rev.tar.gz
 

 Thanks i'll try that soon.

 P.S. Hows the SOAP going :)

 Well after formatting my computer I finally have my dev envrionment back up. I
started to get back to it. I havn't put that much time into it. Don't worry I
won't let it die, unless it already is dead :).

 - Brad



__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP-DEV] pecl extensions

2002-12-03 Thread Andrey Hristov

  P.S. Hows the SOAP going :)

  Well after formatting my computer I finally have my dev envrionment back
up. I
 started to get back to it. I havn't put that much time into it. Don't
worry I
 won't let it die, unless it already is dead :).

Please don't let it die... :)


Andrey


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




RE: [PHP-DEV] pecl extensions

2002-12-03 Thread Brad LaFountain

--- John Coggeshall [EMAIL PROTECTED] wrote:
 
 Brad:
 
 I'm going to take a real stab in the dark here and say that you know
 Shane Caraveo. I was at PHPCon with him presenting in October and I was
 talking about an idea I had to implement opengl in PHP... He said that
 someone by the name of Brad (at least, that's what I recall) was working
 on a extension and I should get in touch with him... Well, needless to
 say I forgot until just now...

 Yeah I know that shady guy Shane.

 
 What is the status of this extension? Is it experimental, stable, etc?
 Just curious...

 Well, it's defintly experimental. There are bindings for opengl and glut. You
can run some sample apps that use the glut api. Its pretty cool. Me and Marcus
were working on off screen redndering with OSMesa. That would allow you to
render a scene without needing to display it somewhere, caputre the content and
spit it out as an image. That worked pretty decent, it worked on windows but i
had issues with it running under linux. It could reneder a sceen and spit out a
png. I remember Andrei told me that there were issues using the api with
gtk-opengl but im sure they could be addressed.

 - Brad

 
 John
 
 
 -Original Message-
 From: Brad LaFountain [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, December 02, 2002 8:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] pecl extensions
 
 
 I know I'm going to piss people off by asking this but how do 
 I create a new pecl package? I think I want going to put 
 php_opengl in there. See if gets anymore use.
 
  - Brad
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
 http://mailplus.yahoo.com
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




[PHP-DEV] bug of the day: $this

2002-12-03 Thread Balazs Nagy
Hi,

$this stays defined when an instantatiated member function calls a
non-instantiated member function.

Here's the tester:

?php

class a {
function test() { var_dump($this); }
function objtest($obj) { $obj-test(); }
function btest() { b::test(); }
}

class b {
function test() { var_dump($this); }
function objtest($obj) { $obj-test(); }
function atest() { b::test(); }
}

print A::test:\n;
a::test();
print A::btest:\n;
a::btest();
print B::test:\n;
b::test();
print B::atest:\n;
b::atest();

$a = new a;
$b = new b;
print \$A-test:\n;
$a-test();
print \$A-btest:\n;
$a-btest();
print \$A-objtest(\$B):\n;
$a-objtest($b);
print \$B-test:\n;
$b-test();
print \$B-atest:\n;
$b-atest();
print \$B-objtest(\$A):\n;
$b-objtest($a);
?

Sample output (php-4.3.0RC2, compiled with ./configure; make):

kotta:~/src/php-4.3.0RC2% ./sapi/cli/php ~/test.php
A::test:
NULL
A::btest:
NULL
B::test:
NULL
B::atest:
NULL
$A-test:
object(a)(0) {
}
$A-btest:
object(a)(0) {
}
$A-objtest($B):
object(b)(0) {
}
$B-test:
object(b)(0) {
}
$B-atest:
object(b)(0) {
}
$B-objtest($A):
object(a)(0) {
}


-- 
jul

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




RE: [PHP-DEV] pecl extensions

2002-12-03 Thread John Coggeshall
 Yeah I know that shady guy Shane.

Heh. He is shady, isn't he? ;)

 Well, it's defintly experimental. There are bindings for 
opengl and glut. You can run some sample apps that use the 
glut api. Its pretty cool. Me and Marcus were working on off 
screen redndering with OSMesa. That would allow you to render 
a scene without needing to display it somewhere, caputre the 
content and spit it out as an image. That worked pretty 
decent, it worked on windows but i had issues with it running 
under linux. It could reneder a sceen and spit out a png. I 
remember Andrei told me that there were issues using the api 
with gtk-opengl but im sure they could be addressed.

My thoughts on it were exactly where you are going with it. However, why
do you need OSMesa in order to do off-screen renderings? It would seem
to me you should be able to render directly to a backbuffer and copy the
bitmap into a GD buffer... Or am I missing something?

John


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




RE: [PHP-DEV] pecl extensions

2002-12-03 Thread Brad LaFountain

--- John Coggeshall [EMAIL PROTECTED] wrote:
  Yeah I know that shady guy Shane.
 
 Heh. He is shady, isn't he? ;)
 
  Well, it's defintly experimental. There are bindings for 
 opengl and glut. You can run some sample apps that use the 
 glut api. Its pretty cool. Me and Marcus were working on off 
 screen redndering with OSMesa. That would allow you to render 
 a scene without needing to display it somewhere, caputre the 
 content and spit it out as an image. That worked pretty 
 decent, it worked on windows but i had issues with it running 
 under linux. It could reneder a sceen and spit out a png. I 
 remember Andrei told me that there were issues using the api 
 with gtk-opengl but im sure they could be addressed.
 
 My thoughts on it were exactly where you are going with it. However, why
 do you need OSMesa in order to do off-screen renderings? It would seem
 to me you should be able to render directly to a backbuffer and copy the
 bitmap into a GD buffer... Or am I missing something?

 Well from my understanding, that just doesn't work, this backbuffer that you
are talking about IS OSMesa. Again I'm no opengl guru but thats why OSMesa was
created is for this type of rendering. Maybe OSMesa is just used for offscreen
HARDWARE rendering, If you can find some docs/info how to do this maybe I can
look into it. I do have a working sample of osmesa working. if you goto
sf.net/projects/phpopengl there is a link that says phpopeng/osmesa in action,
that link is broken cause i havn't paid for my dynamic ip account recently. if
you wanna see it work ill give you my ip when i get home.

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


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




[PHP-DEV] [PHP] imagick v0.9.0.1 RELEASED

2002-12-03 Thread Michael Montero
imagick, the PHP ImageMagick module, has been moved and can be found here:

http://pear.php.net/package-info.php?pacid=76

All releases will occur at this location from now on.  The site:

http://magick.communityconnect.com/

Will continue to point to the above PHP URL.

Christian and I released version 0.9.0.1.  It contains support for image 
lists and almost all of the image processing functions - image effects, 
special effects, etc.

Contact either myself or Christian ([EMAIL PROTECTED]) if you have comments, 
suggestions or to report bugs.

Thanks.

-- 
Michael C. Montero
Chief Technology Officer
Community Connect Inc. Co-founder
[EMAIL PROTECTED]

-=-=-=-=-=  Community Connect Inc.  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The Premier Source of Interactive Online Communities149 Fifth Avenue
http://www.CommunityConnectInc.com/ New York, NY 10010

http://www.AsianAvenue.com/ http://www.BlackPlanet.com/
Click into Asian AmericaThe World Is Yours

http://www.MiGente.com/ http://www.DiversityJobMarket.com/
The Power of LatinosIn partnership with The New
York Times

-  Your Message May Appear Below This Line



-- 
PHP General 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: bug of the day: $this

2002-12-03 Thread Ivan Ristic
Balazs Nagy wrote:

Hi,

$this stays defined when an instantatiated member function calls a
non-instantiated member function.


  Correct. I actually find it quite interesting. :)
  It can be useful at times, I have used it in my
  libraries as a feature.

  There is an interesting article on the subject:
  http://www.advogato.org/article/470.html

--
Ivan Ristic, http://www.webkreator.com


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




[PHP-DEV] Handling fatal and parse errors (just a link :)

2002-12-03 Thread Ivan Ristic

Hi, since we are not going to patch PHP to support redirection
on fatal errors or the 500 error code, here is a link to the
technique you can use (works with 4.2.3) to handle these
errors.

I already posted a note about this but discovered that the
old approach no longer works, and I had to rewrite it. The
example code can be downloaded from the article.

http://www.webkreator.com/php/configuration/handling-fatal-and-parse-errors.html

--
Ivan Ristic, http://www.webkreator.com



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




Re: [PHP-DEV] Re: bug of the day: $this

2002-12-03 Thread Markus Fischer
I think issue is/will be adressed in ZendEngine2 but I could
be wrong. I suggest inquiring at the engine2 list.

On Tue, Dec 03, 2002 at 08:53:25PM +, Ivan Ristic wrote : 
 Balazs Nagy wrote:
 Hi,
 
 $this stays defined when an instantatiated member function calls a
 non-instantiated member function.
 
   Correct. I actually find it quite interesting. :)
   It can be useful at times, I have used it in my
   libraries as a feature.
 
   There is an interesting article on the subject:
   http://www.advogato.org/article/470.html

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




Re: [PHP-DEV] Re: bug of the day: $this

2002-12-03 Thread Balazs Nagy
On Tue, 2002-12-03 at 21:53, Ivan Ristic wrote:
 Balazs Nagy wrote:
  Hi,
  
  $this stays defined when an instantatiated member function calls a
  non-instantiated member function.
 
Correct. I actually find it quite interesting. :)
It can be useful at times, I have used it in my
libraries as a feature.
 
There is an interesting article on the subject:
http://www.advogato.org/article/470.html

Now, please tell me how can you decide whether the member function is
called as an object element (eg. $obj-func()) or as a class element
(eg. class::func()).

Basic functionality is killed with this so-called feature.  The right
way should be a call stack, with for example a $_STACK array, or through
stack functions (eg. this_object(), previous_object()).
-- 
jul

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




Re: [PHP-DEV] Re: bug of the day: $this

2002-12-03 Thread Ivan Ristic


$this stays defined when an instantatiated member function calls a
non-instantiated member function.


  Correct. I actually find it quite interesting. :)
  It can be useful at times, I have used it in my
  libraries as a feature.

  There is an interesting article on the subject:
  http://www.advogato.org/article/470.html



Now, please tell me how can you decide whether the member function is
called as an object element (eg. $obj-func()) or as a class element
(eg. class::func()).


  You mean from the function itself? You can't, as far as I
  can tell. That is why this works best if you have a helper
  class with all static methods. Once nice example that
  comes to mind is a method that persists objects to the
  database.

  But never mind that, I am not trying to justify the
  existence of this quirk so there is no point in
  discussing it.



Basic functionality is killed with this so-called feature.


  Although I did use it as such, I wouldn't actually call
  this a feature, and would prefer to have it removed from
  ZE2.


Bye,
Ivan


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




[PHP-DEV] Patch for Bug #20681: object lookup with array_search()

2002-12-03 Thread Moriyoshi Koizumi
Hi,

I'm trying to make a slight change on array_search(), which allows object
lookup with array_search() in ZendEngine2.

I think this feature doesn't break backwards compatiblity.

If there seems no problem, I'll commit the patch and close that PR.

Moriyoshi

Index: ext/standard/array.c
===
RCS file: /repository/php4/ext/standard/array.c,v
retrieving revision 1.206
diff -u -r1.206 array.c
--- ext/standard/array.c3 Dec 2002 15:02:06 -   1.206
+++ ext/standard/array.c4 Dec 2002 07:21:07 -
@@ -1056,12 +1056,12 @@
zend_get_parameters_ex(ZEND_NUM_ARGS(), value, array, strict) == 
FAILURE) {
WRONG_PARAM_COUNT;
}
-   
+#ifndef ZEND_ENGINE_2  
if (Z_TYPE_PP(value) == IS_OBJECT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Wrong datatype for first 
argument);
RETURN_FALSE;
}
-   
+#endif
if (Z_TYPE_PP(array) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Wrong datatype for second 
argument);
RETURN_FALSE;

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