Re: [PHP-DB] ocinewcollection recursive call

2003-10-29 Thread Ludányi Levente
Hello!

I tried to use OCINewCollection with PHP 5 beta, but I got the same results.
Has anybody used this function with Oracle8i (8.1.7) on Windows?
What kind of (oracle or php) settings can result this behaviour?

> I'm trying to use the OCINewCollection function, but if I don't specify
the 'schema' parameter for this
> function, then I get the 'ocinewcollection(): OCI8 Recursive call!' error
message, and the page never appears
> (I must restart IIS). If I give a typename, that does not exsits on the
Oracle server, then it ends up with the
> same results.
>
> If I specify the 3. parameter, then I always get the 'type not found'
message (OCI-22303), and the php-
> variable gets bool(false) value.
>

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



Re: [PHP-DB] ocinewcollection recursive call

2003-10-28 Thread Ludányi Levente
Thanks, Chris!

I've already tried to use upper case letters in Oracle names everywhere, but
it didn't solve the problem in my environment.

I use Oracle 8i (8.1.7.0.0) and IIS on a single WinXP computer.
My PHP version is 4.3.3.
I tried this with Apache web server (1.3.12.0.1a) on WinXP too.

Perhaps I will try with the PHP 5 Beta 1, and perhaps I can find a newer
Oracle too.



> I removed the "&", made t1 uppercase (i.e "T1") in the
> OCINewCollection call and got:
>
> aaaobject(OCI-Collection)(1) { ["collection"]=> resource(6) of type
(oci8 collection) } bbb

> I haven't yet tried the other scenarios you mentioned.

> Chris

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



Re: [PHP-DB] ocinewcollection recursive call

2003-10-28 Thread Christopher Jones


Ludányi Levente wrote:
Hello
I'm trying to use the OCINewCollection function, but if I don't specify the 'schema' 
parameter for this function, then I get the 'ocinewcollection(): OCI8 Recursive call!' 
error message, and the page never appears (I must restart IIS). If I give a typename, 
that does not exsits on the Oracle server, then it ends up with the same results.
If I specify the 3. parameter, then I always get the 'type not found' message (OCI-22303), and the php-variable gets bool(false) value.

Oracle:

CREATE TYPE "AR"."T1" AS 
TABLE OF NUMBER(6, 0)

CREATE OR REPLACE  PROCEDURE "AR"."GETTABLE" (
  aaa out t1
)
is
begin
  aaa:=t1(10);
end;
Php:


 echo 'aaa';
 
 $c=OCILogon("ar","ar");
 $s=OCIParse($c,"begin gettable(:b); end;");
 $bb=OCINewCollection($c,"t1");
 echo var_dump($bb);
 OCIBindByName($s,"b",&$bb,-1,OCI_B_SQLT_NTY);
 OCIExecute($s);
 OCIFreeStatement($s);

 echo 'bbb';

?>


I tested your raw script using PHP 4.3.4RC2 on W2K against Oracle 9.2
on Solaris and got:
Warning: Call-time pass-by-reference has been deprecated - argument passed by 
value; If you would like to pass it by reference, modify the declaration of 
ocibindbyname(). If you would like to enable call-time pass-by-reference, you can set 
allow_call_time_pass_reference to true in your INI file. However, future versions may 
not support this any longer. in c:\php\t26.php on line 8
aaa
Warning: ocinewcollection(): OCITypeByName: OCI-22303: type ""."t1" not found in 
c:\php\t26.php on line 6
bool(false)
Warning: ocibindbyname(): Variable must be allocated using OCINewCollection() in 
c:\php\t26.php on line 8
Warning: ociexecute(): OCIStmtExecute: ORA-01008: not all variables bound in 
c:`\php\t26.php on line 9
bbb
I removed the "&", made t1 uppercase (i.e "T1") in the
OCINewCollection call and got:
aaaobject(OCI-Collection)(1) { ["collection"]=> resource(6) of type (oci8 collection) } bbb

I haven't yet tried the other scenarios you mentioned.

Chris

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