Re: [PHP-DEV] RPC Extension

2003-03-16 Thread Brad LaFountain
Other issues:
1) Passing This to callbacks
Also I think we should pass getThis() to the handlers too
rpc_call(zval *this, rpc_string, void *, zval *, int, zval *** TSRMLS_DC);

2) Return object types
I see that the rpc layer is actually trying to register a new zend class
for every new Com("someclass"); and someclass will actually be a class... now
how does that work for return values. 
$j = new Java("java.util.Vector"); // now $j will be of type 'Vector'
$j->add("string");
$e = $j->elements(); 
/*
 now this returns type 'Enumeration' but since it wasn't called new Java()
*/
how do you register 'Enumeration' so it will be created like Vector was.

A similar thing is exceptions.. Do we want to auto register exceptions..
you could so something like this

try {
 $j = new Java("java.util.Stack");
 $j->pop();
} catch(java:util:EmptyStackException $e) {
 $e->printStackTrace();
}

3) Namespaces
RPC should probally auto-register the class with a namespace too. 
rpc_name(rpc_string hash, rpc_string *name, rpc_string *ns, void *data, int
type);

so in the case of java.util.Vector we could register Vector in the java:util
namespace.

4) Segfault
RPC was segfaulting in rpc_objects_new()

I changed this part...
zend_ts_hash_init(&intern->function_table, 0, NULL, NULL, TRUE);
/*  intern->function_table.reader = 0;
intern->function_table.mx_reader = tsrm_mutex_alloc();
intern->function_table.mx_writer = tsrm_mutex_alloc();*/
5) Possible Feature
>From what i understand too you can do stuff like this...

$c1 = new com('test');
$c2 = new test();

$j1 = new java('java.util.Stack');
$j2 = new java:util:Stack();

Right (if we implemented the namespace thing)?

now what i find interesting if we can come up with a way to get rid of the
inital
$j1 = new java('java.util.Stack');
and skip right to doing this
$j2 = new java:util:Stack();

I don't know if thats possible.. maybe with some of the autoload() ideas, or
even better having the rpc layer set a namespace that it 'listens to' and every
time a new (defined ns)::Class() is called then it would call the extensions
ctor and try to register the class

ex..
$j = new com:some_com_class(); // where the com extension registerd for the com
ns
or
$j = new php_java:java:utils::Vector(); // and the java ext registered php_java

well anyways it would be pretty cool.

.
.
.

If you couldn't tell im trying to convert ext/java to ext/rpc/java. I got the
functions down, im still learning what ext/rpc is actually doing. But i'll
really need the zend *this; to go forward just from the way the old ext/java
works.

 - Brad

--- Brad LaFountain <[EMAIL PROTECTED]> wrote:
> I was just playing with the RPC extension.
> 
> Don't you think that the rpc layer should pass along TSRMLS_CC to
> all of the callbacks?
> 
> rpc_call(rpc_string, void *, zval *, int, zval *** TSRMLS_CC);
> 
> - Brad
> 
> __
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



[PHP-DEV] RPC Extension

2003-03-16 Thread Brad LaFountain
I was just playing with the RPC extension.

Don't you think that the rpc layer should pass along TSRMLS_CC to
all of the callbacks?

rpc_call(rpc_string, void *, zval *, int, zval *** TSRMLS_CC);

- Brad

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



[PHP-DEV] Apache2 as service, php4.3.1 and Interbase 6.0

2003-03-16 Thread Dr. I. Schueler
Hi!
I am trying to setup Apache2, php4.3.1 and Interbase 6.0 to work together on a Windows 
2000 Professional system. When I use Apache2 as a console application, everything 
seems to work ok, but when I use it as a service it does not see the the Interbase 
database anymore (php errror - Warning: ibase_connect(): unavailable database in ...)
I do not understand why the script works with Apache2 as console and do not work with 
Apache2 as service.
Could someone help me? Tx!