Re: [PHP-DEV] AUTOLOAD in PHP

2002-03-21 Thread S.Murali Krishna


Hi Chris
I Intially thought about passing function name as first argument only,
but I don't know whether I done it correctly or not, Its not recognizing
the argument that I pushed in to argument stack. If you help me in how to
do this, it would be really helpful to me.

After some two days of trying that, I switched over to this
method of passing function name.

overload()
--
  When I searched for AUTOLOAD requierment in PHP, I came across
overload() function, but its not working for me, even the property
overloading, Its seems to be not recognizing __get or __set method.

If anything needs to be done for this, please tell me.


On Thu, 21 Mar 2002, Chris Adams wrote:

> On Thursday, March 21, 2002, at 03:41 , S.Murali Krishna wrote:
> > scope, if it finds one, it would set the global variable
> >
> > $php_undef_func_name
> >
> 
> Why not pass the function name as the first parameter? Otherwise, this 
> looks like some interesting code - I'm looking forward to the overload() 
> extension to do similar things with object methods and properties.
> 
> Chris
> 

<[EMAIL PROTECTED]>
---
We must use time wisely and forever realize that the time is 
always ripe to do right."

-- Nelson Mandela
---



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




[PHP-DEV] [PATCH][NEW FEATURE] ext/java and Zend/zend_execute_API.c

2002-03-21 Thread brad lafountain

There are two parts to this patch...
1) it changes zend_execute_API.c/call_user_function_ex to allow
 overloaded object to handle this callback.
2) Takes advantage of the change above allowing java object to
 be searlized and/or "sessionable"

here are two examples...
push("bottom");
$java->push("middle");
$java->push("top");

$stack = serialize($java);
$java2 = unserialize($stack);

$java2->pop();
$java2->push("new top");

echo $java2->tostring();
?>

push($counter++);

echo $javaobj->toString();
?>


Does anyone wanna review/apply the patch?


/* Brad */


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--- zend_execute_API_cvs.c  Thu Mar 21 18:44:34 2002
+++ zend_execute_API.c  Thu Mar 21 18:46:38 2002
@@ -446,8 +446,18 @@
 
original_function_state_ptr = EG(function_state_ptr);
if (zend_hash_find(function_table, function_name_copy.value.str.val, 
function_name_copy.value.str.len+1, (void **) &function_state.function)==FAILURE) {
-   zval_dtor(&function_name_copy);
-   return FAILURE;
+   if((*object_pp)->value.obj.ce->handle_function_call != NULL)
+   {
+   function_state.function = (zend_function *) 
+emalloc(sizeof(zend_function));
+   function_state.function->type = ZEND_OVERLOADED_FUNCTION;
+   function_state.function->common.arg_types = NULL;
+   function_state.function->overloaded_function.function_name = 
+Z_STRVAL_P(function_name); 
+   }
+   else
+   {
+   zval_dtor(&function_name_copy);
+   return FAILURE;
+   }
}
zval_dtor(&function_name_copy);
 
@@ -527,6 +537,28 @@
EG(free_op2) = orig_free_op2;
EG(unary_op) = orig_unary_op;
EG(binary_op) = orig_binary_op;
+   } else if(function_state.function->type == ZEND_OVERLOADED_FUNCTION) {
+   zend_overloaded_element overloaded_element;
+   zend_property_reference property_reference;
+
+   overloaded_element.element = *function_name;
+   overloaded_element.type = OE_IS_METHOD;
+   zval_copy_ctor(&overloaded_element.element);
+
+   property_reference.object = *object_pp;
+   property_reference.type = BP_VAR_NA;
+   property_reference.elements_list = (zend_llist 
+*)emalloc(sizeof(zend_llist));
+   zend_llist_init(property_reference.elements_list, 
+sizeof(zend_overloaded_element), NULL, 0);
+   zend_llist_add_element(property_reference.elements_list, 
+&overloaded_element);
+
+   ALLOC_INIT_ZVAL(*retval_ptr_ptr);
+   Z_OBJCE_PP(object_pp)->handle_function_call(param_count, 
+*retval_ptr_ptr, *object_pp, 1 TSRMLS_CC, &property_reference);
+   INIT_PZVAL(*retval_ptr_ptr);
+
+   zend_llist_destroy(property_reference.elements_list);
+   efree(property_reference.elements_list);
+   efree(function_state.function);
+
} else {
ALLOC_INIT_ZVAL(*retval_ptr_ptr);
((zend_internal_function *) 
function_state.function)->handler(param_count, *retval_ptr_ptr, 
(object_pp?*object_pp:NULL), 1 TSRMLS_CC);


--- java_cvs.c  Thu Mar 21 18:58:50 2002
+++ java1.c Thu Mar 21 18:59:02 2002
@@ -449,6 +449,55 @@
 
 (*jenv)->DeleteLocalRef(jenv, className);
 
+  } else if (!strcmp("__wakeup", function_name->element.value.str.val)) {
+   zval **data;
+   jmethodID invoke;
+   jbyteArray jdata;
+
+   if(zend_hash_find(Z_OBJPROP_P(object), "__data__", sizeof("__data__"), (void 
+**) &data) == FAILURE)
+   php_error(E_ERROR, "Could not unserialize the java object");
+
+jdata = (*jenv)->NewByteArray(jenv, Z_STRLEN_PP(data));
+   (*jenv)->SetByteArrayRegion(jenv, jdata, 0, Z_STRLEN_PP(data), (jbyte 
+*)Z_STRVAL_PP(data));
+
+invoke = (*jenv)->GetMethodID(jenv, JG(reflect_class), "Deserialize", "([BJ)V");
+   if(!invoke)
+   php_error(E_ERROR, "Coulnd't find function");
+
+result = (jlong)(long)object;
+(*jenv)->CallVoidMethod(jenv, JG(php_reflect), invoke, jdata, result);
+
+(*jenv)->DeleteLocalRef(jenv, jdata);
+   zend_hash_del(Z_OBJPROP_P(object), "__data__", sizeof("__data__"));
+
+  } else if (!strcmp("__sleep", function_name->element.value.str.val)) {
+   pval **handle;
+int type;
+jobject obj;
+   zval *data;
+   zval *data_name;
+   jmethodID invoke;
+
+   MAKE_STD_ZVAL(data);
+   MAKE_STD_ZVAL(data_name);
+
+   ZVAL_STRING(data_name, "__data__", 1);
+
+invoke = (*jenv)->GetMethodID(jenv, JG(reflect_class), "Serialize", 
+"(Ljava/lang/Object;J)V");
+
+zend_hash_index_find(Z_OBJPROP_P(object), 0, (void**) &handle);
+obj = z

[PHP-DEV] Re: PHP and UTF

2002-03-21 Thread Rui Hirokawa


Hi,

Currently ext/mbstring has such features.
It is primary focus on multibyte character encoding, 
but it is also support conversion between UTF-8 and singlebyte encodings.

I think Unicode (or some multibyte encodings) support as internal 
character encoding is desired feature for PHP 5/ZE2.

Rui

On Mon, 11 Mar 2002 14:22:44 -0800 (PST)
[EMAIL PROTECTED] (Brad Lafountain) wrote:

> Has it ever been disscuesd to make php
> support different char encodings internally? 
> 
> 
>  - Brad
> 


-- 
-
Rui Hirokawa <[EMAIL PROTECTED]>
 <[EMAIL PROTECTED]>

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




[PHP-DEV] CVS Account Request: coti

2002-03-21 Thread Costel Cotae

I want a CSV account cause i like PHP and maybe with my participation PHP.net can be a 
better site and i can do something for me to do mantaining or translating i'm here. 
Coti

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




[PHP-DEV] CVS Account Request: ernani_joppert

2002-03-21 Thread Ernani Joppert Pontes Martins

I want to help the translation of php manual to the portuguese language.

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




Re: [PHP-DEV] the dl() issue

2002-03-21 Thread Ilia A.

A user should be able to use "auto_prepend_file" option in their .htaccess 
code to automatically load the extensions they need using dl(). In effect 
that would be the same thing as an auto_load extension folder no?

Ilia

On March 21, 2002 04:00 am, Stig S. Bakken wrote:
> I just asked a friend of mine who is using Pair if he could dl()
> modules.  Pair give users their own extension_dir, but no access to
> php.ini, and no way of reloading the server (which would still be
> required for an auto-load extension dir).  So for Pair users, dl() is
> currently the _only_ way to load third-party extensions.
>
> The reason Pair do this, according to my friend, is that in case Apache
> crashes, they will at last know what modules were loaded for all
> processes, only the processes that run PHP scripts doing dl() will crash
> because of bugs in the 3rd party extensions.
>
> Following this train of thought, an auto-load extension folder would not
> be a solution either, because it would still lead to the additional
> vulnerability to Apache processes that Pair avoid this way.
>
> I think we should bring in some people from hosting companies into this
> discussion, to make sure we have all the facts right.  Right now we are
> assuming a bit too much.
>
>  - Stig
>
> On Tue, 2002-03-12 at 12:01, Zeev Suraski wrote:
> > That sounds like a pretty good idea, actually :)
> >
> > Zeev
> >
> > At 11:32 AM 3/12/2002, Stanislav Malyshev wrote:
> > >MK>> For them, digging into the guts of the system, installing PHP
> > >MK>> extensions there and modifying obscure, Apple-supplied
> > > configuration MK>> files is MUCH, MUCH more frightening than just
> > > downloading a php MK>> extension, dropping it into the Sites folder in
> > > their home directory, MK>> and calling dl("extension.bundle"); in their
> > > PHP scripts.
> > >
> > >Might the solution be in the form of some 'auto-load extension folder'?
> > >I.e., folder in which all extensions found there are loaded
> > > automatically?
> > >
> > >--
> > >Stanislav Malyshev, Zend Products Engineer
> > >[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115

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




[PHP-DEV] [PATCH] sprintf() argnum

2002-03-21 Thread Morten Poulsen

Hi,

I discovered a bug in sprintf()'s argument swapping code. It accepts an
argument number of zero, which is invalid. It is handled in different
ways in different libcs, but i figured the best way to handle it in PHP
was to make the functioncall fail. Patch is attached.

Best regards,
Morten

PS. Thanks to mbn for whining :-)

-- 
Morten Poulsen <[EMAIL PROTECTED]>
http://www.afdelingp.dk/


Index: ext/standard/formatted_print.c
===
RCS file: /repository/php4/ext/standard/formatted_print.c,v
retrieving revision 1.46
diff -u -r1.46 formatted_print.c
--- ext/standard/formatted_print.c	28 Feb 2002 08:26:45 -	1.46
+++ ext/standard/formatted_print.c	21 Mar 2002 16:26:35 -
@@ -479,7 +479,12 @@
 temppos = inpos;
 while (isdigit((int)format[temppos])) temppos++;
 if (format[temppos] == '$') {
-	argnum = php_sprintf_getnumber(format, &inpos);
+	if ((argnum = php_sprintf_getnumber(format, &inpos)) == 0) {
+		efree(result);
+		efree(args);
+		php_error(E_WARNING, "%s(): zero is not a valid argument number", get_active_function_name(TSRMLS_C));
+		return NULL;
+	}
 	inpos++;  /* skip the '$' */
 } else {
 	argnum = currarg++;
Index: tests/strings/002.phpt
===
RCS file: /repository/php4/tests/strings/002.phpt,v
retrieving revision 1.3
diff -u -r1.3 002.phpt
--- tests/strings/002.phpt	9 Apr 2001 15:44:24 -	1.3
+++ tests/strings/002.phpt	21 Mar 2002 16:26:36 -
@@ -38,6 +38,7 @@
 printf("printf test 27:%3\$d %d %d\n", 1, 2, 3);
 printf("printf test 28:%2\$02d %1\$2d\n", 1, 2);
 printf("printf test 29:%2\$-2d %1\$2d\n", 1, 2);
+print("printf test 30:"); printf("%0\$s", 1); print("x\n");
 
 ?>
 --EXPECT--
@@ -72,3 +73,4 @@
 printf test 27:3 1 2
 printf test 28:02  1
 printf test 29:2   1
+printf test 30:x



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


[PHP-DEV] Dropping -lpam from standard/config.m4

2002-03-21 Thread Sascha Schumann

Is there any reason why PHP should be by default linked
against -lpam?  IIRC, the initial reason was "link against
PAM, just in case", but so far, no "case" has emerged which I
would be aware of.

In contrast, linking against a found pam library causes
problems when building -static binaries or compiling against
e.g. uClibc.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


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




[PHP-DEV] new as Parameter

2002-03-21 Thread Andre Christ

Hi,

I'd like to know if the following piece of code is compatible with php 4.0.0
higher:



Are there any bugs known of you pass new Class directly ?

Thanks in advance,
André




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




Re: [PHP-DEV] Serving WebDAV with PHP

2002-03-21 Thread Wez Furlong

On 21/03/02, "Björn Schotte" <[EMAIL PROTECTED]> wrote:
> * Chris Adams wrote:
> > I'm trying to build a WebDAV front-end for several projects so users can 
> > do things like edit database content directly. I haven't found a whole 
> > lot in the mailing archives - it looks like there's some interest but no 
> > serious development going. Is anyone working on something I've missed?

Rasmus was working on a branch in CVS for handling apache requests;
I think it was called APACHE_HOOKS.

This could be used for DAV, but most likely needs a bit of work
before it becomes mainstream.

--Wez.


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




Re: [PHP-DEV] Serving WebDAV with PHP

2002-03-21 Thread Björn Schotte

* Chris Adams wrote:
> I'm trying to build a WebDAV front-end for several projects so users can 
> do things like edit database content directly. I haven't found a whole 
> lot in the mailing archives - it looks like there's some interest but no 
> serious development going. Is anyone working on something I've missed?

FlyingDog Software (CMS PowerSlave.de) showed me at the
CeBit that they've written something for PHP to do WebDav.
Would be great if somebody could convince them to release
that part for integrating it into PHP.

-- 
PHP-Support * realitätsnahe Performance-Messungen mit Code-Analyse
Webapplikationsentwicklung * PHP-Schulungen * Consulting

 0700-THINKPHP -*- [EMAIL PROTECTED]

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




Re: [PHP-DEV] - Looking for good php-editor

2002-03-21 Thread Brent R. Matzelle

--- Krister Hansson <[EMAIL PROTECTED]> wrote:
> I'm fairly new as a php developer and I can't seem to find a good
> editor. I've installed and uninstalled about 20 of them and now I'm
> tired of it. Is there anyone (and there should be ;) ) who know of
> an editor I can use. If you do please mail me a link or something

I've used CR Edit for years and nothing beats it as a multi-purpose
editor.

http://www.praven3.com/credit/ 

Brent

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




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

2002-03-21 Thread derick

Daniela,

On Thu, 21 Mar 2002, Daniela Mariaschi wrote:

> ok,  I will commit that fix on rendering numeric/decimal number on the
> PHP_4_2_0 branch
> in the afternoon  as soon as possible ...

I think that Ludovico Magnocavallo already merged this. Can you please 
check?

> 
> I would like to ask you if  I have also  to commit in PHP_4_2_0 the new
> function
> ibase_fetch_assoc  I committed last week  or  if   it's better according to
> you  to postpon it.

Please postpone that, new functions not going into the release branch is 
the policy.

regards,
Derick

> > > <[EMAIL PROTECTED]> wrote in message
> >
> > > news:[EMAIL PROTECTED]...
> > > > Hello Daniela,
> > > >
> > > > I thought that I fixed it already:
> > > >
> > > > http://news.php.net/article.php?group=php.cvs&article=9742
> > > >
> > > > And you reverted now this note (from the same bug):
> > > >
> > > >[6 Mar 6:21am] [EMAIL PROTECTED]
> > > > Hi; I am the original fixer...
> > > > Noticed that
> > > >
> > > > for (i = 0; i < -scale; i++)
> > > > number /= 10;
> > > >
> > > > can be substituted with
> > > >
> > > > number /= - 10 *  scale;
> > > >
> > > > with a boost on performance. (remember that interbase
> > > > stores the "scale" as a negative number).
> > > >
> > > >
> > > > can you have a look at it?
> > > >
> > > >
> > > > Derick
> > > >
> > > >
> > > > On Tue, 19 Mar 2002, Daniela Mariaschi wrote:
> > > >
> > > > > daniela Tue Mar 19 10:29:18 2002 EDT
> > > > >
> > > > >   Modified files:
> > > > > /php4/ext/interbase interbase.c
> > > > >   Log:
> > > > >   fixed floating number incorrectly rendered (as mentioned by
> > > [EMAIL PROTECTED] in BUG #14755)
> > > > >
> > > > > Index: php4/ext/interbase/interbase.c
> > > > > diff -u php4/ext/interbase/interbase.c:1.80
> > > php4/ext/interbase/interbase.c:1.81
> > > > > --- php4/ext/interbase/interbase.c:1.80 Sat Mar 16 13:43:41 2002
> > > > > +++ php4/ext/interbase/interbase.c Tue Mar 19 10:29:17 2002
> > > > > @@ -17,7 +17,7 @@
> > > > >
> > > +--+
> > > > >   */
> > > > >
> > > > > -/* $Id: interbase.c,v 1.80 2002/03/16 18:43:41 wez Exp $ */
> > > > > +/* $Id: interbase.c,v 1.81 2002/03/19 15:29:17 daniela Exp $ */
> > > > >
> > > > >
> > > > >  /* TODO: Arrays, roles?
> > > > > @@ -595,7 +595,7 @@
> > > > >
> > > > >  php_info_print_table_start();
> > > > >  php_info_print_table_row(2, "Interbase Support", "enabled");
> > > > > - php_info_print_table_row(2, "Revision", "$Revision: 1.80 $");
> > > > > + php_info_print_table_row(2, "Revision", "$Revision: 1.81 $");
> > > > >  #ifdef COMPILE_DL_INTERBASE
> > > > >  php_info_print_table_row(2, "Dynamic Module", "yes");
> > > > >  #endif
> > > > > @@ -1787,13 +1787,14 @@
> > > > >  val->type = IS_STRING;
> > > > >
> > > > >  if (scale) {
> > > > > - int i, len;
> > > > > - char dt[20];
> > > > > + int j, f = 1;
> > > > >  double number = (double) ((ISC_INT64) (*((ISC_INT64 *)data)));
> > > > > -
> > > > > - number /= - 10 * scale;
> > > > > + char dt[20];
> > > > > + for (j = 0; j < -scale; j++) {
> > > > > + f *= 10;
> > > > > + }
> > > > >  sprintf(dt, "%%0.%df", -scale);
> > > > > - val->value.str.len = sprintf (string_data, dt, number);
> > > > > + val->value.str.len = sprintf (string_data, dt, number/f );
> > > > >  } else {
> > > > >  val->value.str.len = sprintf (string_data, "%Ld",
> > > > >  (ISC_INT64) (*((ISC_INT64 *)data)));
> > > > >
> > > > >
> 
> 
> 
> 

---
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] AUTOLOAD in PHP

2002-03-21 Thread S.Murali Krishna


Hi,
As I told in my Previous Post that I have added a feauture in PHP
which is similar to AUTOLOAD feauture in Perl Modules. 

I had sent a unified diff output along with this.

According to that if a user tried to call a undefined function,
PHP Zend Engine would search for a function named '__autoload' in current
scope, if it finds one, it would set the global variable 

$php_undef_func_name  

with name of the called function and call the __autoload()  function with
passed arguments.

Its working fine for me. If it seems to be good, we could discuss
on this. 

<[EMAIL PROTECTED]>
---
We must use time wisely and forever realize that the time is 
always ripe to do right."

-- Nelson Mandela
---


diff -bBr php-4.1.2/Zend/zend_execute.c ./php/php-4.1.2/Zend/zend_execute.c
1555a1556
> if (zend_hash_find(active_function_table, "__autoload", 
>sizeof("__autoload"), (void **) &function)==FAILURE) {
1556a1558,1566
>  } else {
> zval *undef_func ;
> 
> ALLOC_ZVAL(undef_func);
> convert_to_string(undef_func);
> undef_func->value.str.val = (char *) 
>estrndup(function_name->value.str.val, function_name->value.str.len);
> undef_func->value.str.len = function_name->value.str.len 
>;
> undef_func->type = IS_STRING;
> zend_hash_update(EG(active_symbol_table), 
>"php_undef_func_name", sizeof("php_undef_func_name"), &undef_func, sizeof(zval *), 
>NULL);
1557a1568,1569
> }
>   


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


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

2002-03-21 Thread Daniela Mariaschi


> On Tue, 19 Mar 2002, Ludovico Magnocavallo wrote:
> > Derick Daniela patch allows tests 3-6 in ext/interbase/tests to pass

> Ah okay. Can you also make sure the patches go into yhe PHP_4_2_0 branch
> so that they are available in the new PHP CVS release?
>
> Derick


Hello Derick, sorry for my delay ...

ok,  I will commit that fix on rendering numeric/decimal number on the
PHP_4_2_0 branch
in the afternoon  as soon as possible ...

I would like to ask you if  I have also  to commit in PHP_4_2_0 the new
function
ibase_fetch_assoc  I committed last week  or  if   it's better according to
you  to postpon it.

Daniela


>
> > <[EMAIL PROTECTED]> wrote in message
>
> > news:[EMAIL PROTECTED]...
> > > Hello Daniela,
> > >
> > > I thought that I fixed it already:
> > >
> > > http://news.php.net/article.php?group=php.cvs&article=9742
> > >
> > > And you reverted now this note (from the same bug):
> > >
> > >[6 Mar 6:21am] [EMAIL PROTECTED]
> > > Hi; I am the original fixer...
> > > Noticed that
> > >
> > > for (i = 0; i < -scale; i++)
> > > number /= 10;
> > >
> > > can be substituted with
> > >
> > > number /= - 10 *  scale;
> > >
> > > with a boost on performance. (remember that interbase
> > > stores the "scale" as a negative number).
> > >
> > >
> > > can you have a look at it?
> > >
> > >
> > > Derick
> > >
> > >
> > > On Tue, 19 Mar 2002, Daniela Mariaschi wrote:
> > >
> > > > daniela Tue Mar 19 10:29:18 2002 EDT
> > > >
> > > >   Modified files:
> > > > /php4/ext/interbase interbase.c
> > > >   Log:
> > > >   fixed floating number incorrectly rendered (as mentioned by
> > [EMAIL PROTECTED] in BUG #14755)
> > > >
> > > > Index: php4/ext/interbase/interbase.c
> > > > diff -u php4/ext/interbase/interbase.c:1.80
> > php4/ext/interbase/interbase.c:1.81
> > > > --- php4/ext/interbase/interbase.c:1.80 Sat Mar 16 13:43:41 2002
> > > > +++ php4/ext/interbase/interbase.c Tue Mar 19 10:29:17 2002
> > > > @@ -17,7 +17,7 @@
> > > >
> > +--+
> > > >   */
> > > >
> > > > -/* $Id: interbase.c,v 1.80 2002/03/16 18:43:41 wez Exp $ */
> > > > +/* $Id: interbase.c,v 1.81 2002/03/19 15:29:17 daniela Exp $ */
> > > >
> > > >
> > > >  /* TODO: Arrays, roles?
> > > > @@ -595,7 +595,7 @@
> > > >
> > > >  php_info_print_table_start();
> > > >  php_info_print_table_row(2, "Interbase Support", "enabled");
> > > > - php_info_print_table_row(2, "Revision", "$Revision: 1.80 $");
> > > > + php_info_print_table_row(2, "Revision", "$Revision: 1.81 $");
> > > >  #ifdef COMPILE_DL_INTERBASE
> > > >  php_info_print_table_row(2, "Dynamic Module", "yes");
> > > >  #endif
> > > > @@ -1787,13 +1787,14 @@
> > > >  val->type = IS_STRING;
> > > >
> > > >  if (scale) {
> > > > - int i, len;
> > > > - char dt[20];
> > > > + int j, f = 1;
> > > >  double number = (double) ((ISC_INT64) (*((ISC_INT64 *)data)));
> > > > -
> > > > - number /= - 10 * scale;
> > > > + char dt[20];
> > > > + for (j = 0; j < -scale; j++) {
> > > > + f *= 10;
> > > > + }
> > > >  sprintf(dt, "%%0.%df", -scale);
> > > > - val->value.str.len = sprintf (string_data, dt, number);
> > > > + val->value.str.len = sprintf (string_data, dt, number/f );
> > > >  } else {
> > > >  val->value.str.len = sprintf (string_data, "%Ld",
> > > >  (ISC_INT64) (*((ISC_INT64 *)data)));
> > > >
> > > >




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




[PHP-DEV] Serving WebDAV with PHP

2002-03-21 Thread Chris Adams

I'm trying to build a WebDAV front-end for several projects so users can 
do things like edit database content directly. I haven't found a whole 
lot in the mailing archives - it looks like there's some interest but no 
serious development going. Is anyone working on something I've missed?

Please correct me if I'm wrong on this:
Currently way to handle DAV requests in PHP because the PHP module 
declines the OPTIONs method and you can't get the raw body of the 
request, so you can't parse requests by hand.

There are two obvious possibilities:
1) Modify the apache sapi to accept the OPTIONS method and provide 
a function to extract the raw request body so that the various requests 
can be parsed within PHP.

2) Use a lightweight webdav server (e.g. one of the Python or Perl 
implementations) to proxy for PHP so that in-bound requests are POSTed 
to a PHP script.

Only #1 seems to be usable for much beyond proof-of-concept work and 
it's still a kludge, even if the gory parts are sensibly wrapped in an 
object.

I think there has to be an easier way of doing this that I'm missing. 
Any suggestions?

Chris


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




[PHP-DEV] Submitter of Session Patches

2002-03-21 Thread Sascha Schumann

Please don't forgot to Cc the maintainers of the session
extension on all related discussions (Andrei and me).

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


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




[PHP-DEV] Not removing --without-pcre-regex

2002-03-21 Thread Sascha Schumann

The right solution to the issue I reported is fixing
aggregation.c.  The pcre-library is quite heavy code-wise, so
for a slim PHP, I do want to have the option to disable it.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


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




Re: [PHP-DEV] Win32 snmp ext

2002-03-21 Thread Hartmut Holzgraefe

Hunter, Ray wrote:
> I am trying to build the php_snmp extension on my windows box and it 
> says that I am missing the php.h file.  Where can I find this header file?

on UNIX it gets installed into /usr/local/include/php/main/php.h
and standalone extensions configure scripts use the php-config
script that gets installed into /usr/local/bin/php-config
(or whatever path prefix you installed to instead of /usr/local)

on Windows you have to configure Visual Studios include pathes yourself,
the file you are looking for is located in the php4 sources in
php4/main/php.h

(just wondering: doesn't windows have a search function anymore?)

PS: please, please, please do yourself and others a favour and stop
 polluting lists with useless HTML markup, unless you feel fine
 with being ignored by a growing number of people

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77


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




Re: [PHP-DEV] the dl() issue

2002-03-21 Thread Stig S. Bakken

I just asked a friend of mine who is using Pair if he could dl()
modules.  Pair give users their own extension_dir, but no access to
php.ini, and no way of reloading the server (which would still be
required for an auto-load extension dir).  So for Pair users, dl() is
currently the _only_ way to load third-party extensions.

The reason Pair do this, according to my friend, is that in case Apache
crashes, they will at last know what modules were loaded for all
processes, only the processes that run PHP scripts doing dl() will crash
because of bugs in the 3rd party extensions. 

Following this train of thought, an auto-load extension folder would not
be a solution either, because it would still lead to the additional
vulnerability to Apache processes that Pair avoid this way.

I think we should bring in some people from hosting companies into this
discussion, to make sure we have all the facts right.  Right now we are
assuming a bit too much.

 - Stig

On Tue, 2002-03-12 at 12:01, Zeev Suraski wrote:
> That sounds like a pretty good idea, actually :)
> 
> Zeev
> 
> At 11:32 AM 3/12/2002, Stanislav Malyshev wrote:
> >MK>> For them, digging into the guts of the system, installing PHP
> >MK>> extensions there and modifying obscure, Apple-supplied configuration
> >MK>> files is MUCH, MUCH more frightening than just downloading a php
> >MK>> extension, dropping it into the Sites folder in their home directory,
> >MK>> and calling dl("extension.bundle"); in their PHP scripts.
> >
> >Might the solution be in the form of some 'auto-load extension folder'?
> >I.e., folder in which all extensions found there are loaded automatically?
> >
> >--
> >Stanislav Malyshev, Zend Products Engineer
> >[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115


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




Re: [PHP-DEV] - Looking for good php-editor

2002-03-21 Thread Peter Petermann

>I'm fairly new as a php developer and I can't seem to find a good editor.
I've installed and uninstalled about 20 of them and now I'm tired of it. Is
there anyone
>(and there should be ;) ) who know of an editor I can use. If you do please
mail me a link or something
Try Weaverslave

http://www.weaverslave.de

regards,
Peter Petermann

--
Homepage: www.cyberfly.net
PHP Usergroups: www.phpug.de - [EMAIL PROTECTED]
PHP Infos: www.php-center.de - [EMAIL PROTECTED]
VL-SRM Homepage: www.vl-srm.net - [EMAIL PROTECTED]


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




Re: [PHP-DEV] - Looking for good php-editor

2002-03-21 Thread Sebastian Bergmann

Krister Hansson wrote:
> I'm working in Win2k

  Then you should definitely give Weaverslave [1] a try.

  -- 
  [1] http://www.weaverslave.de/

-- 
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] - Looking for good php-editor

2002-03-21 Thread Markus Fischer

On Thu, Mar 21, 2002 at 09:20:23AM +0100, Krister Hansson wrote : 
> Hi there!!
> 
> I'm fairly new as a php developer and I can't seem to find a good editor. I've 
>installed and uninstalled about 20 of them and now I'm tired of it. Is there anyone 
>(and there should be ;) ) who know of an editor I can use. If you do please mail me a 
>link or something
> 
> I'm working in Win2k

I'm prefering gvim/win32 .

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

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